From: Marcel Werk Date: Tue, 14 Oct 2014 17:34:24 +0000 (+0200) Subject: Added option to submit additional parameter when executing the 'getMapMarkers' action X-Git-Tag: 2.1.0_Alpha_1~232 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eaf90fa4e26964480f9e06371830def681c1dd74;p=GitHub%2FWoltLab%2FWCF.git Added option to submit additional parameter when executing the 'getMapMarkers' action --- diff --git a/wcfsetup/install/files/js/WCF.Location.js b/wcfsetup/install/files/js/WCF.Location.js index 2555649227..908c3f0e56 100644 --- a/wcfsetup/install/files/js/WCF.Location.js +++ b/wcfsetup/install/files/js/WCF.Location.js @@ -386,6 +386,12 @@ WCF.Location.GoogleMaps.LargeMap = WCF.Location.GoogleMaps.Map.extend({ */ _actionClassName: null, + /** + * additional parameters for executing the 'getMapMarkers' action + * @var object + */ + _additionalParameters: { }, + /** * indicates if the maps center can be set by location search * @var WCF.Location.GoogleMaps.LocationSearch @@ -425,11 +431,12 @@ WCF.Location.GoogleMaps.LargeMap = WCF.Location.GoogleMaps.Map.extend({ /** * @see WCF.Location.GoogleMaps.Map.init() */ - init: function(mapContainerID, mapOptions, actionClassName, locationSearchInputSelector) { + init: function(mapContainerID, mapOptions, actionClassName, locationSearchInputSelector, additionalParameters) { this._super(mapContainerID, mapOptions); this._actionClassName = actionClassName; this._locationSearchInputSelector = locationSearchInputSelector || ''; + this._additionalParameters = additionalParameters || { }; this._objectIDs = [ ]; if (this._locationSearchInputSelector) { @@ -499,13 +506,13 @@ WCF.Location.GoogleMaps.LargeMap = WCF.Location.GoogleMaps.Map.extend({ this._proxy.setOption('data', { actionName: 'getMapMarkers', className: this._actionClassName, - parameters: { + parameters: $.extend(this._additionalParameters, { excludedObjectIDs: this._objectIDs, eastLongitude: $northEast.lng(), northLatitude: $northEast.lat(), southLatitude: $southWest.lat(), westLongitude: $southWest.lng() - } + }) }); this._proxy.sendRequest(); },