Skip to content

Commit eed28ad

Browse files
author
Hirbod
committed
Merge pull request #579 from Jerome2606/patch-1
Pass custom variables to a marker #54
2 parents a7a127c + 7faf764 commit eed28ad

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

www/googlemaps-cdv-plugin.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,7 @@ App.prototype.addMarker = function(markerOptions, callback) {
886886
markerOptions.rotation = markerOptions.rotation || 0;
887887
markerOptions.opacity = parseFloat("" + markerOptions.opacity, 10) || 1;
888888
markerOptions.disableAutoPan = markerOptions.disableAutoPan === undefined ? false: markerOptions.disableAutoPan;
889+
markerOptions.params = markerOptions.params || {};
889890
if ("styles" in markerOptions) {
890891
markerOptions.styles = typeof markerOptions.styles === "object" ? markerOptions.styles : {};
891892

@@ -1244,6 +1245,9 @@ Marker.prototype.setDisableAutoPan = function(disableAutoPan) {
12441245
this.set('disableAutoPan', disableAutoPan);
12451246
cordova.exec(null, this.errorHandler, PLUGIN_NAME, 'exec', ['Marker.setDisableAutoPan', this.getId(), disableAutoPan]);
12461247
};
1248+
Marker.prototype.getParams = function () {
1249+
return this.get('params');
1250+
};
12471251
Marker.prototype.setOpacity = function(opacity) {
12481252
this.set('opacity', opacity);
12491253
cordova.exec(null, this.errorHandler, PLUGIN_NAME, 'exec', ['Marker.setOpacity', this.getId(), opacity]);

0 commit comments

Comments
 (0)