Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Delphi para la web
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 10-12-2015
marcial marcial is offline
Miembro
 
Registrado: may 2003
Posts: 147
Poder: 21
marcial Va por buen camino
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:
Código Delphi [-]
  HTMLWindow2.execScript(Format('PutMarkerDireccion(%s)',[QuotedStr(address)]), 'JavaScript');

Última edición por dec fecha: 10-12-2015 a las 11:02:30.
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

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


La franja horaria es GMT +2. Ahora son las 11:11:14.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi