locationdataharvester/mylocationsengine/src/maptileinterface.cpp
changeset 35 59575560d1e6
parent 31 8db05346071b
child 41 b3dd5ec3089d
--- a/locationdataharvester/mylocationsengine/src/maptileinterface.cpp	Tue Jul 06 14:10:28 2010 +0300
+++ b/locationdataharvester/mylocationsengine/src/maptileinterface.cpp	Wed Aug 18 09:43:18 2010 +0300
@@ -196,8 +196,8 @@
     int convertedy = (1 - convertedtemp / pi) * totalMapHeight / 2.0;
 
     //Get the image row,col
-    TInt iMapTileImageRow = convertedy / 256.0;
-    TInt iMapTileImageCol = convertedx / 256.0;
+    TInt iMapTileImageRow = ( convertedy / 256.0 ) * 1000;
+    TInt iMapTileImageCol = ( convertedx / 256.0 ) * 1000;
     
     TBuf<KImagePathSize> mImagePath;
 
@@ -205,8 +205,11 @@
     mImagePath.AppendNum(iMapTileImageCol);
     mImagePath.Append(KFileExtn);   
     
-    iFilePath = iFilePath->ReAllocL(iFilePath->Length() + mImagePath.Length() );
-    iFilePath->Des().Append(mImagePath);
+    if( iFilePath )
+    {
+        iFilePath = iFilePath->ReAllocL(iFilePath->Length() + mImagePath.Length() );
+        iFilePath->Des().Append(mImagePath);    
+    }
 }
 
 // -----------------------------------------------------------------------------