I would like to tap on the map and move the Marker1 to that tapped location.
On iOS 15, neither A or B method worked.
What's the proper way to move Marker1 on map when tapped on iOS?
Stonez56
I would like to tap on the map and move the Marker1 to that tapped location.
On iOS 15, neither A or B method worked.
What's the proper way to move Marker1 on map when tapped on iOS?
Stonez56
How are your Marker centers set?
I think, they are the default value:
I updated Map appaerances to have them centered both AnchorHorizontal and AnchorVertical.
Most of the time, Marker1 won't show up.
However, from time to time, Marker1 did appear, but there's a time lag of seconds to minutes before it showed up on the map.
This is really really strange!
iPhone SE, iOS 15
MIT App Inventor 2, v2.64.5 (build 1)
mapTest1.aia (2.8 KB)
You are using ios. I can't test this on ios; however on Android I use Map1.CenterFromString and a ZoomLevel Block instead of Map1.PanTo.
Using PanTo offten glitches the OpenStreetMap so that it does not pan properly. Using CenterFromString ALWAYS works. this might help the Tap to work properly OR perhaps the issue is just another ios bug that needs to be fixed.
Try your code on an Android or an emulator and see what happens.
@SteveJG Thanks for the tip, but the my main issue was not able to move the Marker to the map where I tapped.
On Android, the Marker showed up as soon as I tapped on the map, but the "CenterFromString" didn't actually place latitude and longitude on the center of screen. Does this happen on your device as well?
Do you mean place the map Marker on the center of screen? If you include the
Marker.SetLocation block in your code, the block will place the Marker on the center of the Map component map, which is not necessarily the center of your device screen if you have Buttons and Labels also on the Screen.
To make sure the icon Marker is placed with its pointer on the center of the Map component, also use this Block in your code:
Be aware, several properties of Map still do not behave on the ios version the way they do on Android.
I did those you mentioned, but on iOS they didn't work. Maybe I will just wait for new releases.
I have seen it