Created
September 21, 2017 17:39
-
-
Save aimenkhakwani/092ed60cd553f1553c02363c3a265a25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/js/geolocation-common-map.js b/js/geolocation-common-map.js | |
index 0b14d3f..b021281 100644 | |
--- a/js/geolocation-common-map.js | |
+++ b/js/geolocation-common-map.js | |
@@ -373,7 +373,20 @@ | |
}; | |
if (typeof location.data('icon') !== 'undefined') { | |
- markerConfig.icon = location.data('icon'); | |
+ if (location.data('labelOriginX') !== 'undefined' && | |
+ location.data('labelOriginY') !== 'undefined') { | |
+ markerConfig.icon = { | |
+ url: location.data('icon'), | |
+ labelOrigin: new google.maps.Point(location.data('labelOriginX'),location.data('labelOriginY')) | |
+ }; | |
+ } | |
+ else { | |
+ markerConfig.icon = location.data('icon'); | |
+ } | |
+ | |
+ if (location.data('scaledWidth') !== 'undefined' && location.data('scaledHeight') !== 'undefined') { | |
+ markerConfig.icon.scaledSize = new google.maps.Size(location.data('scaledWidth'),location.data('scaledHeight')) | |
+ } | |
} | |
if (typeof location.data('markerLabel') !== 'undefined') { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment