charlenni / Mapsui.Forms

Xamarin.Forms wrapper around Mapsui
MIT License
6 stars 3 forks source link

InfoLayer not working on Mapsui.Forms 2.0.0 beta 17 #12

Open mattmiley opened 5 years ago

mattmiley commented 5 years ago

I can't get infolayer working in my forms project. Only testing with android right now.

` private void RefreshLayer(ILayer features, IStyle style, string layerName, bool ClearCache) { var selectedLayers = MapControl.Map.Layers.FirstOrDefault(l => l.Name == layerName); if (selectedLayers != null) { features.IsMapInfoLayer = true; MapControl.Map.Layers.Remove(selectedLayers); MapControl.Map.Layers.Add(features); MapControl.Info += MapOnInfo;

//THEN THIS NEVER GETS CALLED WHILE TAPPING ON LINES private void MapOnInfo(object sender, MapInfoEventArgs e) { if (e.MapInfo?.Feature != null) { var item = e.MapInfo?.Feature; item = item; } } `