194 TReal convertedtemp = log(tan(( aLatitude + 90) * pi |
194 TReal convertedtemp = log(tan(( aLatitude + 90) * pi |
195 / 360.0)); |
195 / 360.0)); |
196 int convertedy = (1 - convertedtemp / pi) * totalMapHeight / 2.0; |
196 int convertedy = (1 - convertedtemp / pi) * totalMapHeight / 2.0; |
197 |
197 |
198 //Get the image row,col |
198 //Get the image row,col |
199 TInt iMapTileImageRow = convertedy / 256.0; |
199 TInt iMapTileImageRow = ( convertedy / 256.0 ) * 1000; |
200 TInt iMapTileImageCol = convertedx / 256.0; |
200 TInt iMapTileImageCol = ( convertedx / 256.0 ) * 1000; |
201 |
201 |
202 TBuf<KImagePathSize> mImagePath; |
202 TBuf<KImagePathSize> mImagePath; |
203 |
203 |
204 mImagePath.AppendNum(iMapTileImageRow); |
204 mImagePath.AppendNum(iMapTileImageRow); |
205 mImagePath.AppendNum(iMapTileImageCol); |
205 mImagePath.AppendNum(iMapTileImageCol); |
206 mImagePath.Append(KFileExtn); |
206 mImagePath.Append(KFileExtn); |
207 |
207 |
208 iFilePath = iFilePath->ReAllocL(iFilePath->Length() + mImagePath.Length() ); |
208 if( iFilePath ) |
209 iFilePath->Des().Append(mImagePath); |
209 { |
|
210 iFilePath = iFilePath->ReAllocL(iFilePath->Length() + mImagePath.Length() ); |
|
211 iFilePath->Des().Append(mImagePath); |
|
212 } |
210 } |
213 } |
211 |
214 |
212 // ----------------------------------------------------------------------------- |
215 // ----------------------------------------------------------------------------- |
213 // CMapTileInterface::GeocodeComplete() |
216 // CMapTileInterface::GeocodeComplete() |
214 // Geocode completion notification |
217 // Geocode completion notification |