Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
We've been happily flushing out nodes on a map with the nice Terratype() html helper. However, we'd like more control over the zoom level - that is to set the current zoom to the bounding box of n hits from a search.
We didn't spot any obvious way to do this, so we set about hacking our way to the Google API Map object(s), but alas the closure is so (well) welded tight that it's difficult to expose them via the DOM. (Due to defer, we can't run scripts at the right time)
Any way to get the bb-zoom already?
And would you consider adding some kind of event/port we can extend the map behaviour from?
We're currently making a Mercator projection serverside - think it'll work. But there's a huge opportunity for extensions here. ;)
Great idea, yeah, I'm always keen to hear ideas. This one I like a lot, and can see many wanting it. plus, and this is my own interests, but I like ideas that effect all map providers and not ones that just benefit Google Maps for example.
Consider this on my to-do list, I can't promise anything in the short term, but when I find myself with a free day.
We'll paste the solution here if we find a viable one.
Fitting to a bounding box is definitely something that would make Terratype massively more useful - it's something I commonly need to do, and with no access to the provider's native API it's impossible to work around.
New version 1.0.15 now contains an AutoFit field in Options that automatically will re-centers and selects the appropriate zoom level required to show all map icons at once.
Fantastic - thanks Jonathan!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted