diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 45c5d69c7..5cca9b261 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -3,6 +3,12 @@ different releases and which versions of PHP and MediaWiki they support, see the [platform compatibility tables](INSTALL.md#platform-compatibility-and-release-status). +## Maps 6.3.0 + +Released on November 29th, 2018. + +* The `copycoords` parameter (shows coordinates on right click of marker) now works for Leaflet + ## Maps 6.2.2 Released on November 27th, 2018. diff --git a/composer.json b/composer.json index 3224d7c02..cd735f787 100644 --- a/composer.json +++ b/composer.json @@ -55,7 +55,7 @@ }, "extra": { "branch-alias": { - "dev-master": "6.2.x-dev" + "dev-master": "6.3.x-dev" } }, "replace": { diff --git a/extension.json b/extension.json index 20392daab..8fc7bfbd9 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "Maps", - "version": "6.2.2", + "version": "6.3.0", "author": [ "[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]", diff --git a/resources/leaflet/jquery.leaflet.js b/resources/leaflet/jquery.leaflet.js index 56fe20bd3..0605160b0 100644 --- a/resources/leaflet/jquery.leaflet.js +++ b/resources/leaflet/jquery.leaflet.js @@ -22,7 +22,7 @@ /** * Creates a new marker with the provided data and returns it. - * @param {Object} markerData Contains the fields lat, lon, title, text and icon + * @param {Object} properties Contains the fields lat, lon, title, text and icon * @return {L.Marker} */ this.createMarker = function (properties) { @@ -55,6 +55,16 @@ if( properties.hasOwnProperty('text') && properties.text.length > 0 ) { marker.bindPopup( properties.text ); } + + if ( options.copycoords ) { + marker.on( + 'contextmenu', + function( e ) { + console.log(e); + prompt(mw.msg('maps-copycoords-prompt'), e.latlng.lat + ',' + e.latlng.lng); + } + ); + } return marker; }; @@ -62,7 +72,7 @@ /** * Creates a new marker with the provided data, adds it to the map * and returns it. - * @param {Object} markerData Contains the fields lat, lon, title, text and icon + * @param {Object} properties Contains the fields lat, lon, title, text and icon * @return {L.Marker} */ this.addMarker = function (properties) {