Using a latitude and longitude array to create bookmarks on a Google Maps map API

0

Problems importing latitudes and longitudes to a map with Google Maps API

My problem boils down to reading latitudes and longitudes of an external .JSON file and creating bookmarks on a google map.

My code is as follows:

function displayMarker() {
  for( i = 0; i < 71; i++ ) {
        var position = new google.maps.LatLng(neighborhoodsLatitude[i],neighborhoodsLongitude[i]);
        marker = new google.maps.Marker({
            position: position,
            map: map
        });
      }

However, when executing the function in the browser , the bookmarks are not located and the following error appears in the console:

[Violation] 'setTimeout' handler took 62ms

Does anyone have any idea why it is not working?

    
asked by Juan Camilo Cardenas Gomez 12.05.2018 в 06:46
source

0 answers