[Google Maps Library] google maps polyline issue on Iphone

Forge Component
(17)
Published on 2 Oct (2 weeks ago) by Labs
17 votes
Published on 2 Oct (2 weeks ago) by Labs

we have an application using the google maps mobile plugin. we are facing a strange issue in a screen where we are showing a route including 2 markers, A as start and B as end of the route. Initially the route is shown properly, however after showing about 20 routes, the routes no longer are shown on the map. we are using a javascript to draw the polyline on the map, please find the javascript below. This issue is only apearing on Iphones, on android phones we do not see this issue. In our search for a solution we have removed the polyline, showing only start and end markers on the map.This works fine, even after over 20 routes. So it seems the polyline is causing some issues after a while. 

we are using outsystems in the cloud and version is Version 10.0.828.0.

any help is greatly appreciated,

regards, Hille

function addMarkersToMap(data, colors, bounds, start, end, containerId) {
   
        var map = new google.maps.Map(document.getElementById(containerId), {
          zoom: 2,
          center: {lat: 0, lng: -180},
          disableDefaultUI: true,
          mapTypeId: 'roadmap'
        });
       
        /* use bounds to determine the zoom */
        map.fitBounds(bounds);
       
        var marker = new google.maps.Marker ({
            position: start,
            map: map,
            title: 'A',
            label: 'A'
        });
       
        var marker2 = new google.maps.Marker ({
            position: end,
            map: map,
            title: 'B',
            label: 'B'
        });
               
        var Path = new google.maps.Polyline({
          path: data,
          geodesic: true,
          //strokeColor: colors[1],
          strokeOpacity: 1.0,
          strokeWeight: 5
        });
       
         Path.setMap(map);
}