I am trying to draw a Polyline after clicking on the map.
My javascript-code:
        GEvent.removeListener(mouseClickEventListener);
        var data = jsonData.parseJSON();

        var polygon = new GPolyline([], "#ff0000");
        map.addOverlay(polygon);
        polygon.enableDrawing();
        polygon.enableEditing({onEvent: "mouseover"});
        polygon.disableEditing({onEvent: "mouseout"});
        GEvent.addListener(polygon, "endline", function() {
            mouseClickEventListener = GEvent.addListener(map, "click",
MouseClickHandler);
        });

        // Click-Eventhandler binden
        GEvent.addListener(polygon, "click", function() {
            window.external.ReportShapeClicked(data.Key);
        });
        shapesByKey[data.Key] = polygon;

I am using the same code for drawing a Polygon, and it works perfectly
fine.
With the Polyline, I get the error message:
'Kb' is null or not an object
http://maps.gstatic.com/intl/de_ALL/mapfiles/164e/maps2.api/main.js
Line: 141
Char: 173

if I just copy the code to an HTML-page, everything works fine, too.
Could you please help me? Thank you in advance!
--~--~---------~--~----~------------~-------~--~----~
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