You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The presence of convertLatLonXY_Yahoo is an anachronism left over from obsoleting support for the Yahoo! API. Given that that API is now firmly in the Dead Pool, I'll remove this call from the code base.
Where getDegreesFromGoogleZoomLevel and getGoogleZoomLevelFromDegrees are concerned, my gut feel is that we shouldn't move these into the Google provider implementation as they will then be specific to that provider and that provider only. This seems to run counter to the overall "write the code once and change provider with just two lines of code" ethos of Mapstraction.
They could live in mxn.core.js if the basic algorithm is constant across providers. I haven't checked but somehow I doubt it. I'll take a look at how the other providers calculate this and then see whether this is something we can support across all providers, or even have it implemented in Google and simply a no-op, unimplemented call in the other providers.
In the meantime, this is now part of the Release 3.0 milestone, so it doesn't get forgotten.
Sorry, I wasn't clear. I didn't mean expose them publicly as part of the provider, I mean't that if they're being used in the Google provider code they should just be private functions in that code somewhere.
In that case they can probably be obsoleted entirely. Neither getDegreesFromGoogleZoomLevel or getGoogleZoomLevelFromDegrees are referenced in the Google v3 provider implementation (nor in the old Google v2 provider implementation either). The only place they live is in mxn.js.
Furthermore, if you look at the comments around line 427, both these function make an assumption about the relationship of zoom level to pixels to degrees.
It's looking more and more like these can just be made to go away.
mxn.js has some provider specific functions that should probably be either moved into the appropriate provider file or removed all together.
convertLatLonXY_Yahoo
getDegreesFromGoogleZoomLevel
getGoogleZoomLevelFromDegrees
The text was updated successfully, but these errors were encountered: