July 10, 201411 yr Ok so I have I am having a problem with my Google maps multiple location map everything works perfectly if I have 10 locations or less, the map appears in my web viewer with the pins but any more then 10 locations and my map wont load, Ive tried multiple different locations and the magic number is 10. I do have a Google api and I am filling my Variable locations with a script all the works. but any more then 10 locations I get nothing any ideas? API Removed & Locations removed data:text/html,<!DOCTYPE html> <html><head><meta charset='utf-8'><title></title> <meta name='viewport' content='initial-scale=1.0, user-scalable=yes'> <style type='text/css'> html { height: 100% }body { height: 100%; margin: 0; padding: 0 }#map-canvas { height: 100% }</style> <script src='https://maps.googleapis.com/maps/api/js?key=*****&sensor=false'></script><script> var geocoder; var map; function initialize() { geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng( 37.555555 , -77.000000 ); var mapOptions = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var locations = [ ]; var i; for (i = 0; i < locations.length; i++) { geocoder.geocode( { 'address': locations }, function(results, status) { map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location });});}} google.maps.event.addDomListener(window, 'load', initialize); </script> </head><body><div id='map-canvas'></div></body></html>
Create an account or sign in to comment