Mi piacerebbe ottenere quanto segue con Bing Maps. In #content
, i marker verranno visualizzati da JSON.Jquery Bings Maps Json ricarica
Dopo 15 secondi, tutti i marcatori devono essere cancellati e ricaricati.
Caricamento mappa e indicatori funzionano correttamente. Elimina anche i marcatori di lavoro.
Solo dopo nessun nuovo marcatore più scaricato! Nella console, non ricevo alcun messaggio di errore.
Qualcuno ha un'idea? Sospetto che quando si è verificato "Download" si sia verificato un errore?
Il Codice:
function bings_maps(){
$('#content').gmap({
center: new Microsoft.Maps.Location(47.631296,15.830868),
mapTypeId: Microsoft.Maps.MapTypeId.aerial,
zoom: 17,
credentials: 'test',
bounds: null,
showMapTypeSelector: false,
enableSearchLogo: false,
showBreadcrumb: false,
enableClickableLogo: false,
showScalebar: false,
enableSearchLogo: false,
showDashboard: false,
showMapTypeSelector:false,
showScalebar: false,
useInertia: false,
disablePanning: false,
disableZooming: false,
callback: function() {
var self = this;
$.getJSON('inhalt.php', function(data) {
$.each(data.markers, function(i, marker) {
var location = new Microsoft.Maps.Location(marker.latitude,
marker.longitude);
self.addMarker({ 'location': location, 'bounds': false ,
'icon': marker.icon });
});
});
}});
}
function bings_maps_refresh() {
$('#content').gmap('clear', 'markers');
$('#content').gmap({'callback':function() {
this.addMarker({'location': '47.631296,15.830868', 'bounds': true});
}});
la tua risposta JSON passa attraverso la funzione di successo? forse dovresti aggiungere una funzione di errore e avvisare prima il messaggio per questa funzione $ .getJson –