How to add a KML Layer to Xamarin forms map

Multi tool use


How to add a KML Layer to Xamarin forms map
I am new to Xamarin forms. I want to add a KML layer to my map. I am using a custom map to develop my map. How can I implement a KML layer using geojson for coordinate values?
I tried this code for adding the KML layer:
var layer=new KMLayer(map,Resourse.Raw.sample.json,Android.App.Application.Context);
layer.AddLayerToMap();
But this didn't work.
Please help me...
@BrunoCaceiro I got an exception like this "Unexpected token (position:TEXT {n "type": "F...@244055:2 in java.io.InputStreamReader@398b818)"
– Lakshya
4 hours ago
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
What error are you getting?
– Bruno Caceiro
16 hours ago