FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Buscar | Temas de Hoy | Marcar Foros Como Leídos |
|
Herramientas | Buscar en Tema | Desplegado |
|
#1
|
|||
|
|||
Google Maps y OpenStreetMaps
Hola a todos:
Trabajo con D5 y tengo el siguiente problema: Tengo una aplicación que, usando Google Maps V3, me posiciona una marca en la dirección de por ejemplo un cliente. Esto lo hace perfectamente, pero lo que no consigo es que cuando arrastro el mapa hacia cualquier lado, éste se vuelva a repintar; es decir, que el mapa conforme me lo llevo p.ej. hacia abajo, por la parte de arriba no se vuelve a dibujar, es como si fuera una imagen del tamaño del contenedor (WebBrowser) que se arrastra pero no se repinta. Lo mismo lo intento con OpenStreetMap y el mapa SI vuelve a repintar cuando se arrastra. Os agradecería me dijerais si es que Google Maps no puede hacerlo o es que no lo estoy haciendo bien. Muchas gracias por emplear vuestro tiempo en ayudarme. |
#2
|
||||
|
||||
¿Y cómo lo haces?
|
#3
|
||||
|
||||
Lo dicho.
Todo depende de cómo estés visualizando el mapa. Google maps, posee un modo de imágenes estáticas, es decir, en que en lugar de un mapa, cargas un trozo de mapa, como si fuera una imagen. ¿No estarás utilizando ese modo?
__________________
Germán Estévez => Web/Blog Guía de estilo, Guía alternativa Utiliza TAG's en tus mensajes. Contactar con el Clubdelphi P.D: Más tiempo dedicado a la pregunta=Mejores respuestas. |
#4
|
|||
|
|||
Vaya, eso de las imágenes estaticas no lo sabia. El script es este:
Código:
HTMLStr: String = '<html> '+ '<head> '+ '<meta name="viewport" content="initial-scale=1.0, user-scalable=yes" /> '+ '<script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3&sensor=true"></script> '+ '<script type="text/javascript"> '+ ''+ ' var geocoder; '+ ' var map; '+ ' var markersArray = [];'+ ' var wait = false;'+ ' var lat;'+ ' var lang;'+ ' var LatLng;'+ ''+ ' function initialize() { '+ ' geocoder = new google.maps.Geocoder();'+ ' var myOptions = { '+ ' zoom: 17, '+ ' draggable: true, '+ ' mapTypeId: google.maps.MapTypeId.ROADMAP '+ ' }; '+ ' map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); '+ ' } '+ ''+ ' function PutMarkerDireccion(address) { '+ ' if (geocoder) {'+ ' geocoder.geocode( { address: address}, function(results, status) { '+ ' var infowindow = new google.maps.InfoWindow({'+ ' Content: "<br>" +address+ "<br>" + " Cordenadas: " +results[0].geometry.location.lat() +" "+results[0].geometry.location.lng()});'+ ' if (status == google.maps.GeocoderStatus.OK) {'+ ' map.setCenter(results[0].geometry.location);'+ ' var marker = new google.maps.Marker({'+ ' map: map,'+ ' position: results[0].geometry.location,'+ ' Title: Nombre});'+ ' markersArray.push(marker);'+ ' wait = true;'+ ' setTimeout("wait = true", 2000);'+ ' } else if (status == google.maps.GeocoderStatus.OVER_QUERY_LIMIT) {'+ ' wait = true;'+ ' setTimeout("wait = true", 2000);'+ ' var marker = new google.maps.Marker({'+ ' map: map,'+ ' position: results[0].geometry.location.lat(),'+ ' position: results[0].geometry.location.lng(),'+ ' Title: Nombre});'+ ' markersArray.push(marker);'+ ' } else if (status == google.maps.GeocoderStatus.ZERO_RESULTS) {'+ ' wait = true;'+ ' setTimeout("wait = true", 1000);'+ ' } else {'+ ' alert("Geocode was not successful for the following reason: " + status);'+ ' }'+ ' });'+ ' }'+ ' }'+ ''+ ''+ 'function ClearMarkers() { '+ ' if (markersArray) { '+ ' for (i in markersArray) { '+ ' markersArray[i].setMap(null); '+ ' } '+ ' } '+ '} '+ ''+ ''+'</script> '+ '</head> '+ '<body onload="initialize()"> '+ ' <div id="map_canvas" style="width:100%; height:100%"></div> '+ ' <div id="latlong"> '+ ' <input type="hidden" id="latValue" >'+ ' <input type="hidden" id="lngValue" >'+ '</body> '+ '</html> '; y la llamada:
Última edición por dec fecha: 10-12-2015 a las 11:02:30. |
Herramientas | Buscar en Tema |
Desplegado | |
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
GPS y Google Maps | MAXIUM | Internet | 5 | 15-03-2011 18:15:05 |
Google Maps | madiazg | Varios | 4 | 26-10-2008 22:03:41 |
google maps | MOCOSO07 | Varios | 2 | 06-08-2008 18:08:22 |
Google maps y php | halizia | PHP | 2 | 16-03-2007 17:04:49 |
Google Maps .es | Neftali [Germán.Estévez] | Noticias | 0 | 27-04-2006 13:32:54 |
|