w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Multiple google.maps.Marker displayed as one marker (overlay-ed positions)

After digging in all forums I found, that this was a bug.

From this link: https://code.google.com/p/gmaps-api-issues/issues/detail?id=6447#c16

The solution to fix this issue is: ....

WMarker.prototype = new google.maps.Marker();

WMarker.constructor = WMarker;

function inherits(childCtor, parentCtor) { 
        / @constructor */ 
        function tempCtor() {}; 
        tempCtor.prototype = parentCtor.prototype; 
        childCtor.superClass_ = parentCtor.prototype; 
        childCtor.prototype = new tempCtor(); 
        / @override */ 
        childCtor.prototype.constructor = childCtor; 

inherits(WMarker, google.maps.Marker); 

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.