Open GoogleCodeExporter opened 9 years ago
Original comment by kaska...@google.com
on 4 Dec 2012 at 9:32
[deleted comment]
Object.getOwnPropertyNames(map.mapTypes) returns:
["terrain", "satellite", "gm_accessors_", "hybrid", "__e3_", "roadmap",
"gm_bindings_"]
I guess we don't want to iterate on gm_accessors_ __e3_ and gm_bindings_ as it
causes the error.
quick & dirty bugfix for production:
add the typeof === 'object' from markermanager v1.0
markermanager.js: L98
-- if (mapTypes.hasOwnProperty(sType) && mapTypes.get(sType).maxZoom ===
'number') {
++ if (mapTypes.hasOwnProperty(sType) && typeof mapTypes.get(sType) ===
'object' && mapTypes.get(sType).maxZoom === 'number') {
Original comment by nicolas....@gmail.com
on 4 Dec 2012 at 11:13
Another solution would be to iterate on google.maps.MapTypeId:
L97:
-- for (var sType in mapTypes ) {
++ for (var sType in google.maps.MapTypeId ) {
L98:
-- if (mapTypes.hasOwnProperty(sType) && mapTypes.get(sType).maxZoom ===
'number') {
++ if (mapTypes.get(sType.toLowerCase()).maxZoom === 'number') {
Original comment by nicolas....@gmail.com
on 4 Dec 2012 at 5:12
Seems that the last solution would be the more secure.
Original comment by doga...@gmail.com
on 26 Dec 2012 at 5:09
Original issue reported on code.google.com by
kaska...@google.com
on 4 Dec 2012 at 9:31