Googlemaps marker problema di OVER_QUERY_LIMIT

rikka@3

Nuovo Utente
13 Nov 2013
6
0
0
Ciao a tutti .. premetto che non so molto di html e sbattendomi qua e la per i forum
ho creato una mappa con l'inserimento multiplo di marker

adesso mi visualizza tutto correttamente, ho un solo piccolissimo problema che mi visualizza massimo 12 marker dopo mi restituisce questo errore

geocode not successful -reason OVER_QUERY_LIMIT


ho provato a mettere uno sleep(2) nel mezzo ma non cambia nulla..
esiste un modo per evitare questo errore? anche pagando un servizio..

QUESTO E' IL MIO CODICE
HTML:
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps JavaScript API v3 Example: Geocoding Simple</title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> 
<script type="text/javascript">
var geocoder; var map; var tag =""; var address ="";
var indirizzo = [ 'San Diego, CA', 'Firenze, Italia','Cortona, Italia','Perugia, Italia','Roma, Italia','Napoli, Italia','Milano, Italia','Parma, Italia','Ferrara, Italia','Udine, Italia','Messina, Italia','Torino, Italia','Lecce, Italia'];
var descrizione = [ '11', '22','33','44','55','66','77','88','99','10','11','12','13'];  
function Geocode(address) {
    geocoder.geocode({
        'address': address
    }, function(results, status) {
        if (status === google.maps.GeocoderStatus.OK) {
            var result = results[0].geometry.location;
            var marker = new google.maps.Marker({
                position: result,
                map: map
            });
        } else if (status === google.maps.GeocoderStatus.OVER_QUERY_LIMIT) {    
            setTimeout(function() {
                Geocode(address);
            }, 200);
        } else {
            alert("Geocode was not successful for the following reason:" 
                  + status);
        }
    });
}
function initialize() {  geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng(-34.397, 150.644);
                var myOptions = {zoom: 8,
center: latlng, mapTypeControl: true, mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
navigationControl: true, mapTypeId: google.maps.MapTypeId.ROADMAP };
                
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); y = 0;

for (i in indirizzo) { address=indirizzo[i];   geocoder.geocode( { 'address': address}, function(results, status)    				   
if (status == google.maps.GeocoderStatus.OK) { if (status != google.maps.GeocoderStatus.ZERO_RESULTS) { map.setCenter(results[0].geometry.location);
tag = descrizione[y]; 
var infowindow = new google.maps.InfoWindow( { content: '<b>'+ tag +'</b>', size: new google.maps.Size(150,50) }); 
var marker = new google.maps.Marker({ position: results[0].geometry.location, map: map, 
icon: new google.maps.MarkerImage( "http://chart.googleapis.com/chart?chst=d_bubble_text_small&chld=bb|"+ tag +"|FFBB00|000000", null, null, new google.maps.Point(0, 42))		});                        
y++; google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); } 
else {alert("No results found");} }  else { alert("Geocode not successful -reason: " + status);} }); } }
</script> 
</head> 
<body style="margin:0px; padding:0px;" onload="initialize()">
<div id="map_canvas" style="width:100%; height:100%">
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-162157-1"; urchinTracker(); </script>
</body>
</html>
 
Ultima modifica di un moderatore:

borgo italia

Super Moderatore
Membro dello Staff
SUPER MOD
MOD
4 Feb 2008
16.046
150
63
PR
www.borgo-italia.it
ciao
non credo che sia un problema html/css quindi ti sposto nella sezione js che mi sembra più adatta.
comunque anche se non conosco gli script di Googlemaps, sembrerebbe che google non ti permetta di inserire più di 12 marker e se è così non puoi farci nulla
poi racchiudi sempre il codice tra gli appositi tag
 
Discussioni simili
Autore Titolo Forum Risposte Data
N [GoogleMaps] markers dinamici con infoWindow Javascript 0
borgo italia utilizzo di googlemaps Leggi, Normative e Fisco 0
maxnegri Icon Multi Marker Personalizzate Google Maps Javascript 0
A [Javascript] Marker personalizzati su mappa leaflet Javascript 0
A [Javascript] Mostrare un marker se è vicino al risultato di ricerca con google maps Javascript 3
F Marker Gmap jQuery 0
F Aggiornare marker su mappa google con una funzione ajax richiamata al cambio di una select Ajax 2
L Overlapping marker mappa google Javascript 0
ecosito Google Maps: Centrare il marker ed editare il fumetto PHP 1
A Rimuovere il Marker di Google Maps Javascript 0
A Inserire Marker a Google Maps Javascript 3
felino Google Maps - Marker con la stessa latitudine e longitudine HTML e CSS 1
U [javascript] visualizzare marker su mappa di google Javascript 10
S Assegnare link ad un marker di google maps Javascript 2
R Google maps : marker e cerchio... non funziona Javascript 2
R google maps marker Javascript 7
unkus_nob marker dinamici in mappa google Javascript 3
M info marker google maps con cicli Javascript 0
P Problema con marker della google map Javascript 0
G Java Marker Interface Java 1
I Sto progettando nuovi siti utilizzando bootstrap e devo dire funziona bene, l'unico problema e la maschera -moz- HTML e CSS 0
K Problema form update PHP 2
O problema con dvr dahua xvr5116 IP Cam e Videosorveglianza 0
S Problema nel ciclare un json Javascript 0
G Problema con Xampp Web Server 1
andrea barletta Problema con miniature comandi Photoshop 0
I problema con alice Posta Elettronica 0
K Problema Inner join PHP 1
F firefox problema http Linux e Software 0
N Problema con position absolute e overflow HTML e CSS 4
E Problema jquery Success jQuery 2
L Problema con inner join PHP 11
K [php] Problema con inner join PHP 4
E problema selezione sfumata Photoshop 2
K [PHP] Problema con variabili concatenate. PHP 1
A Problema filtro fluidifica Photoshop Photoshop 1
H Problema Bordi Scontorno Photoshop 1
O problema con query PHP 4
R Problema installazione Realtek WiFi USB rtl8821 Reti LAN e Wireless 0
I problema con 2 account Posta Elettronica 1
L problema collegamento file css con html HTML e CSS 1
Y Problema percorso file in rete PHP 1
N Problema SEO "L'URL non si trova su Google" SEO e Posizionamento 4
E Problema accesso a file con app sviluppata con MIT APP INVENTOR 2 Sviluppo app per Android 0
P Problema acquisizione clienti Webdesign e Grafica 1
F NetBeans problema creazione progetto Java Windows e Software 0
M Problema con Try Catch PHP 0
C problema seo + cerco esperto SEO e Posizionamento 11
Sergio Unia Problema con gli eventi del mouse su una data table: Javascript 2
T PROBLEMA CON SESSIONI PHP 3

Discussioni simili