Change color of GeoRSS feed GMaps API v3?

423 Views Asked by At

I've imported a city feed for construction on a Google Map API v3. Unfortunately, the default color is a blue that doesn't convey the "caution" needed for construction. Is there an easy way to change the colour of the GeoRSS overlay? Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

No, there isn't an easy way to change the color/styling of a GeoRSS overlay you are pulling in from another service. KML/GeoRSS features are rendered on the map to look like Polylines, Polgyons, and Markers, but they're not full-fledged objects in that sense. If you look at the KmlLayer documentation you'll see that your options are really limited to showing it on a map and making it clickable.

What you need to do is process the GeoRSS / KML somewhere else and add styling information to it that colors the line appropriately. I would probably implement this in a server-side language of your choice, but you could also try to use JavaScript to parse the GeoRSS and create first-class Polyline objects yourself which you'd have full control over.