Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Xamarin forms maps IOS key and Xamarin forms Map UWP Zoom keys not disabling

Hi

Sorry for odd questions but need to ask the question some where for clarification :(

So I am using Xamarin forms Maps within my PCL project for Android, Apple and Microsoft and in the notes on line I can see where to put the code to use the google maps API for Android but am not sure where to put it for the IOS version? But am Initialising as it says in the notes. Interestingly so far on test the iPhone still lets me access the map as well as UWP as I have not added the API key there either and so makes me wonder if access to the map on an iPhone and UWP is free or is it just using the same key somewhere that I use for the android? I ask the question as im worried that when I release it if I don't have the proper key on the iPhone or on UWP side then the map may not work but then I don't want to add the keys if it works any ways and don't want to get charged triple :(

Which makes me wonder if I actually need Google maps at all as I just want a map to show at the users location and phones do store their local users map data on the phone but sadly when I remove the Google key on the android side it does stop the map working for android only.

So im expecting an answer on the lines that yes your app will not display a map on iPhone or UWP unless you put in a key and for iPhone this is where you put it? which I assume is AppDelegate.cs and may be Xamarin.FormsMaps.Init("INSERT_AUTHENTICATION_TOKEN_HERE"); I suppose I just want clarification, just in case some one tell me I can do all this for free :)

My second question is that I have disabled zoom and scroll on my map as I don't want the end user to be able to move the map about and this works perfectly on Android and Apple but the UWP still zooms as there are zoom buttons on the right, see pic below, does any one have any thoughts to remove that I may have missed or could this be a bug perhaps. im thinking of creating a customer renderer for the map for UWP but seems unnecessary work if it works on Android and Apple

https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/map/setup

Best Answer

Answers

Sign In or Register to comment.