That solved my problem completely. Thank you so much! On Sep 8, 9:54 am, Andrew Leach <[email protected]> wrote: > On 8 September 2010 13:42, chaoskreator <[email protected]> wrote: > > > Hmmm... I did as you suggested, plotting 0, -90 on my map, and it > > popped up in a very strange spot. > > It should have popped up vertically centred, a quarter of the way in > from the left. <pause> Yes: just where you have it. > > This is because GLatLng needs your 750-pixel square to be divided into > 360 degrees left-to-right (from -180 to +180) and 180 degrees > top-to-bottom (from -90 to +90) just like the Earth. > > So (0,-90) is on the Equator and half-way between the Prime Meridian > and the left-hand edge. > > To convert horizontally [longitude], divide your 750 pixels into 360 > degrees and then move the origin: > d = p*360/750 - 180 > Vertical [latitude] conversion is a bit more difficult because your > origin is at the top. > d = 90 - p*180/750 > > Taking a point at say (300,599), those formulae give you GLatLng(-53.76,-36) > > It's a straightforward arithmetic relationship because of your > Euclidean geometry; there's no fancy projection mathematics to deal > with.
-- 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.
