Closed kevinpthorne closed 1 year ago
Could I get a screenshot? Is the launchCoordinates
supposed to drop a pin on the coords. given or not? I guess this is also a question of intended functionality.
According to apple documentation, you need to have BOTH q
AND ll
set to place a pin.
The ll parameter can also represent a pin location when you use the q parameter to specify a name.
So if you want to always place a pin (and I think you usually do), the solution would be to use ll
just as before, and if no label is set for q
, stringify the coordinates to pass it again as q
.
Same issue on iOS search with coordinates doesn't place a pin on map
+1 for adding this, perhaps as a conditional option to be added, a pin just feels like a nice addition
Hey, I'm a bit late to the party, but unfortunately I can't test anything because I don't have an Apple device. Isn't it enough to specify a label for the pin as the third parameter of launchCoordinates
?
Actually yes, the pin is now added in iOS Maps. I am using this code:
ElevatedButton( onPressed: () => MapsLauncher.launchCoordinates( locationsViewModel.selectedLocation!.lat, locationsViewModel.selectedLocation!.long, locationsViewModel.selectedLocation!.locname), child: const Text("Åk till loppisen!"), style: const ButtonStyle( backgroundColor: MaterialStatePropertyAll<Color>(darkGreenColor), ), ),
Alright, seeing as no one probably ever wants to open the map without a pin, I will add a default label. Hope this resolves the issue.
Running the following only centers the map on iOS Apple Maps:
Changing the Apple Maps URL creation to use
q
instead ofll
drops the pin as hoped for.I tried using
sll
as documented but it just refused to work. I would like for someone else to verify this, though.