Closed bitfabrikken closed 7 years ago
Good catch! Fixed the general crash in https://github.com/hansemannn/ti.googlemaps/commit/5724119e1008c80bd695075715f3902446df096e. For the fitBounds
method, I need to validate it before pushing the new 2.7.2 version. It's already bumped, so please try it out.
Ok, so here is the deal for fitBounds
:
bounds
property always has to be setbounds
property includes coordinate1
and coordinate2
coordinate1
and coordinate2
include latitude
and longitude
It looks correct from the implementation-side, so I'll check and update the docs.
Updated the readme with examples for all methods.
Works now :) Could you possible make it so you can see latitude, longitude and zoom on the cameraUpdate object?
Possible yes, but I won't do it, because not all methods use a latitude / longitude to specify a location, so it would rather irritate than help.
@hansemannn ok, perhaps you have an idea to achieve this then?
Create and show a map with annotations and immediately show it centered and bounded to those annotations.
Best I can come up with now is to first show the map, then use the cameraUpdate.fitBounds - but that causes the map to be shown first and then "snap" into place
@bitfabrikken Listen to the render-events (either regionchanged
or complete
of the map and call the method inside there. Add the event listeners to those on-open and remove them on-focus, so the states are clean.
@hansemannn thanks :)
No matter which method I use on cameraUpdate, the app crashes. I think there might be a generel bug here causing it, or maybe I'm using it incorrectly?
Errors
Example