I could go very in depth with this but I found an article that more or less sums it up. Take a look here and let me know if you have any questions. It is one for bing maps but it uses the same projection so you can use the same code: http://msdn.microsoft.com/en-us/library/bb259689.aspx
<http://msdn.microsoft.com/en-us/library/bb259689.aspx>Google's API has a lot of these functions built in to it so you can retrieve them a lot easier. But the math stays the same. Let me know if you have any questions. On Fri, Oct 15, 2010 at 9:55 AM, spyro.boy <spyro....@gmail.com> wrote: > yes, very much. I've tried all sorts of things and I've pretty much > given up, but if you can help, it'd be very much appreciated. > > On Oct 14, 10:33 am, Nathan Raley <nlrale...@gmail.com> wrote: > > Are you having problems with the conversion from lat/lng to Pixel X,Y and > > Tile X,Y? If so let me know and I can offer some help. > > > > On Wed, Oct 13, 2010 at 4:20 PM, spyro.boy <spyro....@gmail.com> wrote: > > > alright so, since posting I've tried my hand at this and the code > > > seems different. I'll just re-establish things in a clearer way. > > > > > I've generated a set of 256x256 tiles from a very large image (approx. > > > 7000x3000) . the file naming convention is tile-ZOOM-X-Y.png. getting > > > the google maps api to display these tiles as a base map wasn't > > > difficult. > > > > > the things I'm trying to accomplish now is figuring out how to center > > > the map based on a pixel coordinate of the original image (i.e. the > > > 7000x3000 unsplit image) mapped to the tiled google map. > > > > > a second thing I'd like to figure out is how to stop the map from > > > going into areas that tiles don't exist. if this has to be controlled > > > by a constant, that's fine. i.e. if I have 50 tiles width-wise, I > > > don't want it to move past the 50th tile, or past the 0th tile. same > > > with the vertical. > > > > > I've put a conditional in the getTileUrl that just checks if coord.x > > > (or y) is less than 0, but internally the google map still thinks it's > > > in the negative range. I can't imagine moving back into the the > > > positives will do any good with that conditional in place. > > > > > I've read the API reference and the tutorials and none of it seems > > > very clear to me. > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Google Maps JavaScript API v3" group. > > > To post to this group, send email to > > > google-maps-js-api...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > google-maps-js-api-v3+unsubscr...@googlegroups.com<google-maps-js-api-v3%2bunsubscr...@googlegroups.com> > <google-maps-js-api-v3%2bunsubscr...@googlegroups.com<google-maps-js-api-v3%252bunsubscr...@googlegroups.com> > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps JavaScript API v3" group. > To post to this group, send email to > google-maps-js-api...@googlegroups.com. > To unsubscribe from this group, send email to > google-maps-js-api-v3+unsubscr...@googlegroups.com<google-maps-js-api-v3%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to google-maps-js-api...@googlegroups.com. To unsubscribe from this group, send email to google-maps-js-api-v3+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.