Skip to content

Commit 06a059a

Browse files
committed
2 parents 1854181 + d811422 commit 06a059a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

directives/custom-marker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@
6969
position && (this.position = position); /* jshint ignore:line */
7070

7171
if (this.getProjection() && typeof this.position.lng == 'function') {
72-
var posPixel = this.getProjection().fromLatLngToDivPixel(this.position);
7372
var _this = this;
7473
var setPosition = function() {
74+
var posPixel = _this.getProjection().fromLatLngToDivPixel(_this.position);
7575
var x = Math.round(posPixel.x - (_this.el.offsetWidth/2));
7676
var y = Math.round(posPixel.y - _this.el.offsetHeight - 10); // 10px for anchor
7777
_this.el.style.left = x + "px";

0 commit comments

Comments
 (0)