plugins
plugins copied to clipboard
nativescript/google-maps not centering map to marker at iOS
I'm adding a marker to the map within the onReady Event of my map.
Problem:
- after adding a marker to the map, the app centers to the added Marker at android ==> ok
- after adding a marker to the map, the app centers to Stonehenge at iOS ==> NOT ok
Funny part is, that the marker is at the map and at the defined position. Only the map is not centered to the marker (and no, i'm not testing the app at Stonehenge ;) )
Tested with Device (iPhone 13).
How can i center my map to given lat / lon coordinates? As i could not find any documentation this might be a problem at my side.
You can try the following
const position = map.cameraPosition;
position.target = {
lat: 10.495829,
lng: -61.382675
};
position.zoom = 10;
map.cameraPosition = position;
Thanks, but that also does not position the map center to my marker. Tried with fixed coordinates as you wrote.
tried it that way.
Still centered to Stonehenge at iOS devices. The Marker is correctly added.