Problem with changing colour of polyline + marker backgrounds

140 views
Skip to first unread message

Matt Smith

unread,
Sep 15, 2011, 6:40:17 AM9/15/11
to google-map...@googlegroups.com
Example page: http://xtaz.co.uk/tracks/105

I have code which changes the colour of the polyline when the map type changes between map or satellite/hybrid. This has worked fine until recently. I've noticed that in the past month or so it's been unreliable. It usually works fine if you don't zoom the map or scroll around but if you play around with zoom or the position a few times and try it then it seems to change to one colour and then stick with that colour if you change it back again. The event is firing as I've tested that with some alert()'s. I guess redrawing the tiles is what isn't working properly. If I set the API version to 3.4 then it works fine, if I use the current version then it does this dodgy behaviour.

I've also found that the marker background in IE8 isn't properly transparent and you get strange single pixel white lines through the polyline as if the tiles are not lining up, works fine in Firefox. Again setting the API to 3.4 fixes this.

Radina

unread,
Sep 15, 2011, 6:42:12 PM9/15/11
to Google Maps JavaScript API v3
Matt:

Please try modifying last snippet of your code to:

track.setMap(null);
track = new google.maps.Polyline(trackopts);
track.setMap(map);
});
Reply all
Reply to author
Forward
0 new messages