Hi

Please excuse what is possibly an elementary question. I'm new to java
& google maps api.

I have a polygon file for which i'm trying to make the polygons semi-
opaque. With the following code I get an error message saying that
geoXml.setFillStyle is not a function. I have been unable to find an
example of setfillstyle but I found examples for setstrokestyle and so
followed those.

I started out with "v2" in the API key statement & then changed that
to "v2.x" and now "v3". All had the same result.  Otherwise, i've
tried so many different versions of the setfillstyle statement that
i've lost count.

The following statement is the one in error, but i've included all my
code (~40 lines) in case that helps.

       geoXml.setFillStyle({opacity:0.2});

Also, assuming I get the setfillstyle statement to work, is that going
to redraw the polygons with the new style as a part of its execution?

Many thanks in advance

Ian

======  ENTIRE CODE  FOLLOWS ===============

 <!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

<head>
<title>Ians Google Maps JavaScript API Example</title>

<script  src="http://maps.google.com/maps?
file=api&v=3&key=ABQIAAAAurnhRZA1MfE1ZBtLCVrJ3BT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQw-
AkLJ35TvPdlIqrL3FlWRlE3xw&sensor=false" type="text/javascript">
</script>

</head>
  <script type="text/javascript">

    function initialize() {
      if (GBrowserIsCompatible()) {

        /* Display the map & set user interface type  */
        var map = new GMap2(document.getElementById("map_canvas"),
{draggableCursor:"crosshair"});
        map.setCenter(new GLatLng(-37.85, 144.97), 13);
        map.enableScrollWheelZoom();
        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());


        /* overlay my map*/
        geoXml = new GGeoXml("http://www.geocode.com.au/testfiles/
pptrench_mapwindow.kmz");
        map.addOverlay(geoXml);
        geoXml.setFillStyle({opacity:0.2});


                /* add search box so user can type in a postcode or suburb*/
                map.enableGoogleBar();
      }
    }

  </script>
</head>

  <body onload="initialize()" onunload="GUnload()" style="font-family:
Arial;border: 0 none;">
    <div id="map_canvas" style="width: 750px; height: 750px"></div>
  </body>
</html>
-- 
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