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

How to refresh info window on iOS Google Maps

$
0
0

I've having problems refreshing my info Window on iOS google maps, I always see the information of the previous marker.
I'm using a renderer where I do all the changes I need.
I'm using Google Maps component 1.9.1.

After searching on internet I believe what im watching is a Screenshot taken with the previous cached information?
But i don't seem to have access to this screenshot on the renderer's infoWindow

the marker seems to have the correct information and I can animate the camera to its position correctly.

private MapView myMapView;

 protected override void OnElementChanged(ElementChangedEventArgs<GMapView> e)
        {
...
myMapView.MarkerInfoWindow = new GMSInfoFor(markerInfoWindow);
...
}

 UIView markerInfoWindow(UIView view, Marker marker)
        {
            View infoWindow = googleMap.InfoWindow;

            var renderer = RendererFactory.GetRenderer(infoWindow);
            var layoutWidth = FeaturesController.ScreenSize.Bounds.Width * 0.9;
            var layoutHeight = FeaturesController.ScreenSize.Bounds.Height * 0.39;
            renderer.NativeView.Bounds = new CGRect(0, 0, (nfloat)layoutWidth, (nfloat)layoutHeight);
            renderer.NativeView.BackgroundColor = Color.White.ToUIColor();
            renderer.NativeView.SetNeedsDisplay();

            return renderer.NativeView;
        }

How can I refresh the info Window?


Viewing all articles
Browse latest Browse all 89864

Trending Articles



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