Skip to content

Commit

Permalink
Merge pull request #579 from Jerome2606/patch-1
Browse files Browse the repository at this point in the history
Pass custom variables to a marker #54
  • Loading branch information
Hirbod committed Aug 31, 2015
2 parents a7a127c + 7faf764 commit eed28ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions www/googlemaps-cdv-plugin.js
Expand Up @@ -886,6 +886,7 @@ App.prototype.addMarker = function(markerOptions, callback) {
markerOptions.rotation = markerOptions.rotation || 0;
markerOptions.opacity = parseFloat("" + markerOptions.opacity, 10) || 1;
markerOptions.disableAutoPan = markerOptions.disableAutoPan === undefined ? false: markerOptions.disableAutoPan;
markerOptions.params = markerOptions.params || {};
if ("styles" in markerOptions) {
markerOptions.styles = typeof markerOptions.styles === "object" ? markerOptions.styles : {};

Expand Down Expand Up @@ -1244,6 +1245,9 @@ Marker.prototype.setDisableAutoPan = function(disableAutoPan) {
this.set('disableAutoPan', disableAutoPan);
cordova.exec(null, this.errorHandler, PLUGIN_NAME, 'exec', ['Marker.setDisableAutoPan', this.getId(), disableAutoPan]);
};
Marker.prototype.getParams = function () {
return this.get('params');
};
Marker.prototype.setOpacity = function(opacity) {
this.set('opacity', opacity);
cordova.exec(null, this.errorHandler, PLUGIN_NAME, 'exec', ['Marker.setOpacity', this.getId(), opacity]);
Expand Down

0 comments on commit eed28ad

Please sign in to comment.