Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Xamarin.Forms with Native Maps

$
0
0

I started my project using Xamarin.Forms.Maps, but found it difficult and/or impossible to implement tap functionality to the map using the default Xamarin.Forms.Maps implementation. If I am understanding things correctly, I have two options.

Option 1 is dependency injection. This seems to be best practice. Using dependency injection I would create the proper class in the android/ios project and write the code needed to create the map for each platform. This class would house the platform specific code necessary for creating the map, handling the events, etc

Option 2 is to write the code in the actual platform project via whatever views/controllers. I was able to make this work, but unable to figure out how to use it in conjunction with Xamarin.Forms

Any thoughts on if either of the above are best suited or if there is another approach that I am missing?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>