That works! Amazing! Thanks a lot Mike.
The other (small) point was to adapt the script slightly so that, when
users click to enter data, further clicks elsewhere in the map cause the
infowindow *and* marker to be replaced by the new point (i.e. the original
point disappears).
I'm presuming it's going to be something in the GMarker attribute, but
i've just looked at the official documentation and nothing springs out
to me there...
Code for creating the marker is below:
// == creates a draggable marker with an input form ==
function createInputMarker(point) {
var marker = new GMarker(point,{draggable:true, icon:G_START_ICON});
GEvent.addListener(marker, "click", function() {
lastmarker = marker;
marker.openInfoWindowHtml(iwform);
});
map.addOverlay(marker);
marker.openInfoWindowHtml(iwform);
lastmarker=marker;
return marker;
}
2009/11/17 Mike Williams <[email protected]>:
> Wasn't it Dale Potter who wrote:
>
>>marker.openInfoWindowHtml(document.createTextNode(text));
>
> Try
>
> marker.openInfoWindowHtml(text);
>
> .createTextNode() clobbers the HTML.
>
> --
> Mike Williams
> http://econym.org.uk/gmap
>
>
> --
>
> 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=.
>
>
>
--
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=.