Abrir Mapa no google

Discussão em 'Progress 4GL' iniciado por DFResmer, Maio 12, 2011.

  1. LeandroSantos

    LeandroSantos Membro Participativo

    Se voce ja tem as coordenadas voce pode gerar um arquivo HTML igual ao codigo abaixo, substituindo as coordenas e depois carregar no browse.
    Código:
    <!DOCTYPE html>
    <html>
    <head>
    <title>Google Maps JavaScript API v3 Example: Styled MapTypes</title>
    <link href="http://code.google.com/apis/maps/documentation/javascript/examples/standard.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">
    </script>
    <script>
    function CoordMapType(tileSize) {this.tileSize = tileSize;}
    CoordMapType.prototype.getTile = function(coord, zoom, ownerDocument) {
    var div = ownerDocument.createElement("DIV");
    div.innerHTML = coord;
    div.style.width = this.tileSize.width + "px";
    div.style.height = this.tileSize.height + "px";
    div.style.fontSize = "10";
    div.style.borderStyle = "solid";
    div.style.borderWidth = "1px";
    div.style.borderColor = "#AAAAAA";
     return div;
    };
     var map;
     var marker;
     var brooklyn = new google.maps.LatLng(-23.754406,-46.673080);
     function initialize()
     {
     var mapOptions = {
      zoom: 50,
      center: brooklyn,
      mapTypeId: google.maps.MapTypeId.ROADMAP };
      map = new google.maps.Map(document.getElementById("map_canvas"),
      mapOptions);
    marker = new google.maps.Marker({map:map,draggable:true,animation: google.maps.Animation.DROP,position: brooklyn});
    google.maps.event.addListener(marker, "click", toggleBounce);
    function toggleBounce()
    {if (marker.getAnimation() != null){marker.setAnimation(null);}
    else{   marker.setAnimation(google.maps.Animation.BOUNCE);}
    }
    map.overlayMapTypes.insertAt(0, new CoordMapType(new google.maps.Size(256, 256)));
    }
    </script>
    </head>
    <body onload="initialize()">
    <div id="map_canvas" style="width: 800px; height: 600px;"></div>
    </body>  </html>
    
  2. DFResmer

    DFResmer Membro Participativo

    Agora sim, obrigado parceiro!!!
  3. DFResmer

    DFResmer Membro Participativo

    Tem como fazer ligação de um ponto a outro?
  4. jdchaves

    jdchaves Membro Participativo

    Assim vc quer saber?

    Arquivos Anexados:

  5. DFResmer

    DFResmer Membro Participativo

    Na verdade eu tenho 3 cordenadas as vezes até 4, e quero ligar elas na sequencia
  6. fdantas

    fdantas Administrator Moderador

Compartilhe esta Página