On Mar 19, 7:17 pm, geo_newbie <[email protected]> wrote:
> Hi
>
> I need to change to fillColor of the KmlLayer(s) with Javascript
> (dynamically)
>
> Is this possible with Google Maps ?

Not at present.  Your only option is to have two (or more) separate
KmlLayers and change between them.

>
> I can see it's possible to dynamically change the polygon fillColor
> using for example
> new google.maps.Polygon({
>     paths: triangleCoords,
>     strokeColor: "#FF0000",
>     strokeOpacity: 0.8,
>     strokeWeight: 2,
>     fillColor: "#FF0000",
>     fillOpacity: 0.35
>   });
>
> But fillColor is not an option in KmlLayer constructor.
>
> Actually I would plan to use FusionTablesLayer if that makes any
> difference.

It is different.  You might be able to do it with FusionTablesLayer,
but it would be done by reloading the layer with at new query.

>
> Also reading the websites I see some people have tried this using
> GeoXml3
>
> So is it possible to get the polygon from the kmlLayer and set the
> fillColor?

No (at least not now).

> Or do I need to use GeoXml3 ?

That is certainly one option. How well it will work depends on how
complex your KML is.

  -- Larry

>
> Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to