Posts

Showing posts with the label google maps

Xamarin.forms.Maps - Tap to get a position on the map...

Image
Xamarin.Forms.Map component Xamarin.Forms.Maps is a great component. It gives you the possibility to deal with maps and geolocation problematics in a few lines of code. This "Map" component internally use native map controls for iOS, Android and Windows Phone: You can display and locate "Pins" with custom information on the map. I suggest you to read the reference links above. Display pins with custom information The problem But actually, in my mind, the Map control miss a very important feature: --> Tap  on the map to get the relative location (to put a new pin, to get the relative address...) The workaround Use renderers Actually, to solve this problem, we need to implement custom renderers for iOS and Android. Maybe this feature will be implemented later by Xamarin... So here is my solution (3 code files below): - ExtMap.cs : overloaded map control that will contain our "Tapped" event to get the tapped location