Hi everybody.

I have very simple code that create map, create polyline with 3
vertex, add this polyline overlay to the map, and make it editable.
The init() method is executing by browser on onload event. Sorry but I
don't have this example available on the internet but my code is very
simple and short. I'm just try to learn this api. I'm using Firefox
3.0.4, and IE 6.0 ond Windows XP Professional SP3 System. I'm using
API in Polish language h1=pl and version v=2 defined when importing
script. My xhtml have no errors, and was validating by Markup
Validator. In Firebug I don't see any errors or messages.

The line that importing script:

<script src="http://maps.google.com/maps?
file=api&amp;v=2&amp;sensor=false&amp;hl=pl" type="text/javascript">
</script>

Im using this example on my local file system so I don't have to
provide API key.

var line;
var map;

function init() {
        if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map-container-id"));
        map.setCenter(new GLatLng(0,0), 7);
        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
        map.enableScrollWheelZoom();
        map.disableDoubleClickZoom();
        map.clearOverlays();

        // Create simple polyline with 3 vertexes
        line = new GPolyline([new GLatLng(0.5,0.2), new GLatLng(2,3), new
GLatLng(1.5,2.5)], "#FF0000", 4, 1);
        map.addOverlay(line);

        // Make line editable
        line.enableEditing();
        }
}

The problem is when I try to move middle Vertex all polyline
dissapear, only editinv vertex stay visible. When I move start and end
vertex the polyline is visible all the time ant this is OK. Am I doing
something wrong? I was looking for this information on this groups and
didn't find such simple example like mine that could generate problem.
Any help or sugestions?

--~--~---------~--~----~------------~-------~--~----~
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