On May 18, 3:44 pm, biswa rajgarh <[email protected]> wrote: > Hi, > > Can any body give me the formulae of how can we convert pixel to mile > or meter .
I'm sure you're aware that the scale varies with latitude, and vertical scale is the same as horizontal scale only at the Equator. You can convert from pixels to metres with something like this: map.fromDivPixelToLatLng(new GPoint(0,0)).distanceFrom (map.fromDivPixelToLatLng(new GPoint(0,1))); [that should be all on one line] Miles to pixels requires to find the point 1 mile away from your start point, and then use map.fromLatLngToDivPixel to convert those points to pixel coordinates in order that you can find the number of pixels between them. There are some useful scripts here: http://www.movable-type.co.uk/scripts/latlong.html Andrew --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
