OK, for example with this code in v3. How do you create
a window to the right of the map displaying a list of lat/lon pairs
after each click and not just one on top the previous pair like
the one on this code?

Thank you for quick reply,

<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /
>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?
sensor=false"></script>
<script type="text/javascript">

  var map;
  var marker;
  var overlay;

  function initialize() {
    var latlng = new google.maps.LatLng(48.86, 2.34);
    var myOptions = {
      zoom: 13,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };

    map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);

    google.maps.event.addListener(map, 'click', function(event) {
      placeMarker(event.latLng);
    });

    overlay = new google.maps.OverlayView();
    overlay.draw = function() {};
    overlay.setMap(map);
  }

  function placeMarker(location) {

    if (marker != null) {
      marker.setMap(null);
    }

    marker = new google.maps.Marker({
        position: location,
        map: map
    });

    document.getElementById("info").innerHTML = "<table>" +
                          "<tr><td>LatLng</td><td>" + location.lat() +
","+ location.lng() + "</td></tr></table>";
  }

</script>
</head>
<body onload="initialize()">
  <div id="map_canvas" style="width:512px; height:384px"></div>
  <div id="info" style="width:512px"></div>
</body>
</html>




On Sep 7, 3:33 pm, "[email protected]" <[email protected]>
wrote:
> On Sep 7, 12:09 pm, gdhuynh <[email protected]> wrote:
>
> > Well, I created such text window displaying 10 rows next to a map
> > under API v2
> > but it won't run under API v3. Here is the code under API v2 for such
> > window.
>
> The below is not "code" it is html (well this.select() is javascript,
> but...).  If you post a link to the v3 map that doesn't work (and a
> link to the v2 map that does might be useful) we might be able to give
> you some useful advice.
>
>   -- Larry
>
>
>
> > After each click on map, the window will display a pair of "coords_id"
> > lon/lat:
>
> >     <table>
> >     <tr valign="top">
> >     <td><div id="map" style="width: 600px; height: 600px"></div></td>
> >     <td>        Long and Lat:<div id="status" style="width:500px;
> > height: 60px;">
> > <textarea name="coords" value="" id="coords_id" cols="60" rows="10"
> > readonly="true" onclick="this.select();">
> > </textarea><br/>
> >       </div></td>
>
> >     </tr>
> >     </table>
>
> > On Sep 7, 2:03 pm, "[email protected]" <[email protected]>
> > wrote:
>
> > > On Sep 7, 10:44 am, gdhuynh <[email protected]> wrote:
>
> > > > Hi,
>
> > > >  I would like to create a permament big text window where it will
> > > > display the pair lat/lon whenever
> > > > I placed a marker on map. I don't want the prompted inforwindow.
>
> > > What does this have to do with the API then?  Use normal HTML.
>
> > >   -- Larry- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to