I have a pretty simple setup. with an asp.net page that has a form tag with 
a few fields. when I do this my scripts work. 

 function loadpolygon() {
        var doc = document.forms['form1'];
        var ticketPoly = [
        new google.maps.LatLng(Coordinates[0],Coordinates[1]),
        new google.maps.LatLng(Coordinates[2], Coordinates[3]),
        new google.maps.LatLng(Coordinates[4], Coordinates[5]),
        new google.maps.LatLng(Coordinates[6], Coordinates[7]),
        new google.maps.LatLng(Coordinates[8], Coordinates[9]),
        new google.maps.LatLng(Coordinates[10], Coordinates[11])];
 
        var ticketPolyPath = new google.maps.Polygon({
            paths: ticketPoly,
            strokeColor: "#FF0000",
            strokeOpacity: 1.0,
            strokeWeight: 2,
            fillColor: "#FF0000",
            fillOpacity: 0.35
        });
        
        
        var centerMap = new google.maps.LatLng(Centroid[0], Centroid[1]);
 
        var polygonOptions = {
            zoom: 17,
            mapTypeId: google.maps.MapTypeId.HYBRID
        };
        mapPoly = new google.maps.Map(document.getElementById("map_poly"), 
polygonOptions);
        mapPoly.setCenter(centerMap);
        ticketPolyPath.setMap(mapPoly);
 
        google.maps.event.addListener(ticketPolyPath, 'click', showTicketInfo);
        infowindow = new google.maps.InfoWindow();
    }


with my html as.
<body>
<form id="form1" runat ="server">
fields etc
</form>

<div id="map_poly">
</div>
</body>

However if I try doing
<body>
<form id="form1" runat ="server">
fields etc

<div id="map_poly">
</div>
</form>
</body>
The map doesn't show. 

Looks like it can't find the map_poly id. 
Any thoughts? 
Thank you



-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-maps-js-api-v3/-/kYZ4AR2L4BEJ.
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