didijc; like this?
http://japonyol.net/editor/edit.php

On 1月23日, 午前6:59, didijc <[email protected]> wrote:
> Hey gang!!!
>
> I am in need of some assistance, I read most of the messages that are
> similar to my problem but none of them really work for me...
>
> Basically, I have a map that is blank...I want to allow a user to
> click on the map and create a marker that is draggable...that part is
> working... ...however, I want to allow that same user to click on
> "that" marker and remove it from the map...or the marker opens open an
> info window and the "Remove this Marker" option is available...
>
> Here's my code (I would point you all to a link, but the actual file
> is behind a firewall...)
>
> <script type="text/javascript" language="JavaScript">
>         var myMap = null;
>         var localSearch = null;
>         var myQueryControl = null;
>         var gmarkers = [];
>
>         function displayMap(){
>                 //create Map
>                 myMap = new GMap2(document.getElementById("map"));
>
>                 //center the map
>                 myMap.setCenter(new GLatLng(16.7867314, -10.0), 2);
>                 myMap.addControl(new GLargeMapControl3D());
>                 myMap.addControl(new GMapTypeControl());
>                 myMap.addControl(new GOverviewMapControl());
>                 myQueryControl = new QueryControl(localSearch);
>                 myMap.addControl(myQueryControl);
>
>                 myMap.enableScrollWheelZoom();
>
>                 GEvent.addListener(myMap, "click", function(overlay, point) {
>                         if (point) {
>                                 singleClick = !singleClick;
>                                 setTimeout("if (singleClick) createCircle(new 
> GLatLng("+ point.y +
> ", " + point.x +"), 250);", 300);
>                                 myMap.addOverlay(new GMarker(point, 
> {draggable: true}));
>                                 var marker = new GMarker(point);
>                                 gmarkers.push(marker);
>                                 alert(gmarkers.length);
>                         }
>                 });
>
>                 GEvent.addListener(marker, "click", function() {
>
>                 });
>         }
> </script>
>
> <fieldset
>     style="text-align:right; width:950px; position:relative; left:5px;
> top: -10px;">
>     <legend style="font-variant:small-caps; font-family:Arial,
> Helvetica, sans-serif; font-size:9pt; font-weight:bold;
>                     background-color:#FFF; margin:5px;" align="right">
>         <span style="padding:5px; margin:5px; background-
> color:#d6e3b0;">Pearson Corporate Facilities</span>
>     </legend>
>     <div id="map" style="width:950px; height:500px;"></div>
> </fieldset>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-api?hl=en.

Reply via email to