V
V
v3shin2015-04-07 11:40:31
JavaScript
v3shin, 2015-04-07 11:40:31

How to bypass Invalid array length on google maps?

Good day to all. There is such a problem - I'm trying to use api v2 google maps, but it gives an error Invalid array length. How can it be fixed or bypassed?

<!doctype html>
<html>
<head>
  <style type="text/css">
      html { height: 100% }
      body { height: 100%; margin: 0; padding: 0 }
      #map_canvas { height: 100% }
    </style>
    <script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=[ключ_api_v3;можно и без него]"></script>
    <script type="text/javascript">
      function initialize() {
        var mapOptions = {
          center: new google.maps.LatLng(-34.397, 150.644),
          zoom: 8,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        var map = new google.maps.Map(document.getElementById("map_canvas"),
            mapOptions);
      }
    </script>
</head>
<body onload="initialize()">
  <div id="map_canvas" style="width:100%; height:100%"></div>
</body>
</html>

The reason I'm using the old api is because of a third party script that uses GPolygon. If you can somehow transfer the map to api v3, I will only be happy.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question