From add62d6cb23183f1d75a661c914077740c359085 Mon Sep 17 00:00:00 2001 From: Kim Eik Date: Fri, 19 Jul 2013 11:28:35 +0200 Subject: [PATCH 001/163] Added support for ctrl+a in the export code window. Change-Id: I6ec9aa3584bf6e0ba98f8fd301fe11313bf8b73a --- includes/editor/MapEditorHTML.php | 4 +- includes/editor/css/mapeditor.css | 20 +- includes/editor/js/mapeditor.js | 1729 +++++++++++++++-------------- 3 files changed, 887 insertions(+), 866 deletions(-) diff --git a/includes/editor/MapEditorHTML.php b/includes/editor/MapEditorHTML.php index 06f7f5d79..29efdc2e3 100644 --- a/includes/editor/MapEditorHTML.php +++ b/includes/editor/MapEditorHTML.php @@ -38,7 +38,9 @@ public function getEditorHTML() { $output = <<getCanvasDiv()}
-

+	
+ +

%3\$s

diff --git a/includes/editor/css/mapeditor.css b/includes/editor/css/mapeditor.css index 33c30a4fa..9c3fe7c4d 100644 --- a/includes/editor/css/mapeditor.css +++ b/includes/editor/css/mapeditor.css @@ -1,8 +1,24 @@ -#code-output, #code-input-container,#code-input { - height: 100%; +#code-output-container, #code-input-container,#code-input { + height: 100% !important; width: 100%; } +#code-output-container { + overflow: visible; +} + +textarea#code-input, textarea#code-output { + resize: none; +} + +#code-output { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + border: none; + padding: 10px; +} + #map-canvas { width: 100%; height: 500px; diff --git a/includes/editor/js/mapeditor.js b/includes/editor/js/mapeditor.js index c2c718c03..a0ca35291 100644 --- a/includes/editor/js/mapeditor.js +++ b/includes/editor/js/mapeditor.js @@ -1,721 +1,721 @@ var mapEditor = { - __map:null, - __drawingManager:null, - __mapObjects:[], - __controlsDiv:null, - __options:{ - canvas:'map-canvas', - onRightClick:function(){} - }, - __mapObjectOptions: { - marker:{ - draggable:true - }, - polyline:{ - strokeWeight:2, - strokeOpacity:1, - strokeColor:'#FF0000', - editable:true - }, - circle:{ - strokeWeight:2, - strokeOpacity:1, - strokeColor:'#FF0000', - fillColor:'#FF0000', - fillOpacity:0.5, - editable:true - }, - rectangle:{ - strokeWeight:2, - strokeOpacity:1, - strokeColor:'#FF0000', - fillColor:'#FF0000', - fillOpacity:0.5, - editable:true - }, - polygon:{ - strokeWeight:2, - strokeOpacity:1, - strokeColor:'#FF0000', - fillColor:'#FF0000', - fillOpacity:0.5, - editable:true - }, - imageoverlay:{ - strokeWeight:1, - strokeOpacity:0.5, - strokeColor:'#000', - fillOpacity:0.0, - editable:true - } - }, - __mapParameters:{ - mappingservice: { - values:mw.config.get( 'egMapsAvailableServices' ) - }, - copycoords: { - values:['on','off'] - }, - markercluster: { - values:['on','off'] - }, - searchmarkers:{ - values:['title','all'] - }, - 'static':{ - values:['on','off'] - }, - maxzoom: { - values:[] - }, - minzoom: { - values:[] - }, - zoom:{ - values:[] - }, - centre:{ - values:[] - }, - title:{ - values:[] - }, - label:{ - values:[] - }, - icon:{ - values:[] - }, - type:{ - values:[] - }, - types:{ - values:[] - }, - layers:{ - values:[] - }, - controls:{ - values:[] - }, - zoomstyle:{ - values:['default','small','large'] - }, - typestyle:{ - values:[] - }, - autoinfowindows:{ - values:['on','off'] - }, - kml:{ - values:[] - }, - gkml:{ - values:[] - }, - fusiontables:{ - values:[] - }, - resizable:{ - values:[] - }, - tilt:{ - values:[] - }, - kmlrezoom:{ - values:['on','off'] - }, - poi:{ - values:['on','off'] - }, - visitedicon:{ - values:[] - } - }, - __addMapObject:function(o){ - var idx = this.__mapObjects.indexOf(o); - if(idx === -1){ - this.__mapObjects.push(o); - o.overlay.setMap(this.__map); - } - }, - __removeMapObject:function(o){ - var idx = this.__mapObjects.indexOf(o); - if(idx !== -1){ - this.__mapObjects[idx].overlay.setMap(null); - this.__mapObjects.splice(idx,1); - } - }, - __createOrUpdateImageOverlay:function(e,imageUrl){ - //remove old image overlay if exists - this.__removeMapObject(e.imageoverlay); - - //set to new type so it doesn't collide with rectangle - e.type = 'imageoverlaybounds'; - - //add map objects - this.__addMapObject(e); - var image = new google.maps.GroundOverlay(imageUrl, e.overlay.getBounds()); - var imageOverlay = { - overlay:image, - type:'imageoverlay' - }; - this.__addMapObject(imageOverlay); - e.imageoverlay = imageOverlay; - imageOverlay.metadata = e.metadata; - - //register right click listener if not already done - if(e.rightClickListener !== true){ - google.maps.event.addListener(e.overlay, 'rightclick', function () { - mapEditor.__options.onRightClick(e); - }); - e.rightClickListener = true; - } - - //register bounds change listener if not already done - if(e.boundsChangedListener !== true){ - google.maps.event.addListener(e.overlay, 'bounds_changed', function () { - //destroy and recreate imageoverlay (due to no e.imageoverlay.setBounds() method) - mapEditor.__createOrUpdateImageOverlay(e, e.imageoverlay.overlay.getUrl()); - }); - e.boundsChangedListener = true; - } - - return imageOverlay; - }, - __initControls:function(){ - //Create root controls element - var controlDiv = this.__controlsDiv = document.createElement('div'); - controlDiv.setAttribute('class','mapeditor-controls'); - controlDiv.index = 1; - - this.__map.controls[google.maps.ControlPosition.BOTTOM_CENTER].push(controlDiv); - }, - __initMap:function(){ - var myOptions = { - center:new google.maps.LatLng(0, 0), - zoom:1, - mapTypeId:google.maps.MapTypeId.ROADMAP - }; - - this.__map = new google.maps.Map(document.getElementById(this.__options.canvas),myOptions); - - //noinspection JSUnresolvedVariable - var drawingManager = this.__drawingManager = new google.maps.drawing.DrawingManager({ - drawingMode:null, - drawingControl:true, - drawingControlOptions:{ - position:google.maps.ControlPosition.TOP_CENTER - }, - markerOptions:this.__mapObjectOptions.marker, - circleOptions:this.__mapObjectOptions.circle, - rectangleOptions:this.__mapObjectOptions.rectangle, - polygonOptions:this.__mapObjectOptions.polygon, - polylineOptions:this.__mapObjectOptions.polyline - }); - drawingManager.setMap(this.__map); - - google.maps.event.addListener(drawingManager, 'overlaycomplete', function (e) { - mapEditor.__addMapObject(e); - mapEditor.__registerRightClickListener(e); - google.maps.event.trigger(e.overlay, 'rightclick'); - }); - }, - __readMapObjectOptionsFromMetadata:function(e){ - var options = $.extend({},this.__mapObjectOptions[e.type]); - for(var key in e.metadata){ - var data = e.metadata[key]; - if(data.value.trim() !== ''){ - options[data.name] = data.value; - } - } - try{ - e.overlay.setOptions(options); - return true; - }catch(e){ - return false; - } - }, - __writeMetaDataToMapObject:function(e,metadata){ - e.metadata = this.__arrayToObject(metadata); - }, - __convertPositionalParametersToMetaData:function(positionalArray){ - var positionalNames = [ - 'title', - 'text', - 'strokeColor', - 'strokeOpacity', - 'strokeWeight', - 'fillColor', - 'fillOpacity', - 'showOnHover' - ]; - - if(positionalArray !== undefined && positionalArray.length > 0){ - if(positionalArray[0].trim().indexOf('link:') === 0){ - positionalNames.splice(0,1); - positionalNames[0] = 'link'; - } - } - - for(var x = 0; x < positionalArray.length; x++){ - positionalArray[x] = { - name:positionalNames[x], - value:positionalArray[x].trim() - }; - } - return this.__arrayToObject(positionalArray); - }, - __arrayToObject:function(arr){ - var o = {}; - for (var i = 0; i < arr.length; ++i){ - o[i] = arr[i]; - } - return o; - }, - __registerRightClickListener:function(e){ - google.maps.event.addListener(e.overlay, 'rightclick', function () { - mapEditor.__options.onRightClick(e); - }); - }, - __generateWikiCode:function( seperators ){ - var code = seperators.codeStart; - - var markers = ''; - var circles = ''; - var polygons = ''; - var lines = ''; - var rectangles = ''; - var imageoverlays = ''; - - for(var x = 0; x < this.__mapObjects.length; x++){ - var mapObject = this.__mapObjects[x].overlay; - var mapObjectType = this.__mapObjects[x].type; - var mapObjectMeta = this.__mapObjects[x].metadata; - - var metadata = ''; - if(mapObjectMeta !== undefined){ - var delimiterPosition = ''; - for(var key in mapObjectMeta){ - var data = mapObjectMeta[key]; - delimiterPosition += delimiterPosition.length > 0 ? ' ~' : '~'; - if(data.value !== ''){ - if(data.name === 'link' && data.value.indexOf('link:') === -1){ - data.value = 'link:'+data.value; - } - if(!(mapObjectType === 'imageoverlay' && data.name === 'image')){ - metadata += delimiterPosition+data.value; - delimiterPosition = ''; - } - } - } - } - - var serializedData = mapObject+metadata; - if (mapObjectType === 'marker') { - markers += markers === '' ? serializedData : '; '+serializedData; - } else if (mapObjectType === 'circle') { - circles += circles === '' ? serializedData : '; '+serializedData; - } else if (mapObjectType === 'polygon') { - polygons += polygons === '' ? serializedData : '; '+serializedData; - } else if (mapObjectType === 'polyline') { - lines += lines === '' ? serializedData : '; '+serializedData; - } else if (mapObjectType === 'rectangle') { - rectangles += rectangles === '' ? serializedData : '; '+serializedData; - }else if(mapObjectType === 'imageoverlay'){ - imageoverlays += imageoverlays === '' ? serializedData : '; '+serializedData; - } - } - - - code += markers !== '' ? markers : ''; - code += circles !== '' ? seperators.separator+'circles='+circles : ''; - code += polygons !== '' ? seperators.separator+'polygons='+polygons : ''; - code += lines !== '' ? seperators.separator+'lines='+lines : ''; - code += rectangles !== '' ? seperators.separator+'rectangles='+rectangles : ''; - code += imageoverlays !== '' ? seperators.separator+'imageoverlays='+imageoverlays : ''; - - //add map parameters - for(var param in this.__mapParameters){ - var value = this.__mapParameters[param].value; - if(value === undefined || value === ''){ - continue; - } - code += '\n|'+param+'='+value; - } - - code += seperators.codeEnd; - return code; - }, - __importWikiCode:function(rawData){ - var syntaxPattern = /^\{\{#display_map:[\s\S]*\}\}[\s\n]*$/i; - if(rawData.match(syntaxPattern) === null){ //NO MATCH - return false; - }else{ - try{ - var patterns = { - marker: /^\{\{#display_map:\s*(.*)/i, - polyline: /\|\s*lines=(.*)/i, - circle:/\|\s*circles=(.*)/i, - polygon:/\|\s*polygons=(.*)/i, - rectangle:/\|\s*rectangles=(.*)/i, - imageoverlay:/\|\s*imageoverlays=(.*)/i, - parameter:/\|\s*(.*)=(.*)/i - }; - var mapObjects = []; - rawData = rawData.split('\n'); - for(var j = 0; j < rawData.length; j++){ - for (var key in patterns){ - var match = rawData[j].match(patterns[key]); - if(match !== null && match[1].trim().length !== 0){ - var isMapObject = false; - if(key !== 'parameter'){ - var data = match[1].split(';'); - for(var i = 0; i < data.length; i++){ - - var metadata = data[i].split('~'); - metadata.splice(0,1); - if(metadata.length > 0){ - data[i] = data[i].substring(0,data[i].indexOf('~')); - } - metadata = this.__convertPositionalParametersToMetaData(metadata); - - var options = this.__mapObjectOptions[key]; - var mapObject = null; - if (key === 'marker') { - var position = data[i].split(','); - //noinspection JSValidateTypes - options = $.extend({ - position: new google.maps.LatLng(position[0],position[1]) - },options); - mapObject = new google.maps.Marker(options); - } else if (key === 'circle') { - var parts = data[i].split(':'); - var radius = parts[1]; - var position = parts[0].split(','); - //noinspection JSValidateTypes - options = $.extend({ - center: new google.maps.LatLng(position[0],position[1]), - radius: parseFloat(radius) - },options); - mapObject = new google.maps.Circle(options); - } else if (key === 'polygon') { - var paths = data[i].split(':'); - for(var x = 0; x < paths.length; x++){ - var position = paths[x].split(','); - paths[x] = new google.maps.LatLng(position[0],position[1]); - } - paths = new google.maps.MVCArray(paths); - //noinspection JSValidateTypes - options = $.extend({ - paths: paths - },options); - mapObject = new google.maps.Polygon(options); - } else if (key === 'polyline') { - var paths = data[i].split(':'); - for(var x = 0; x < paths.length; x++){ - var position = paths[x].split(','); - paths[x] = new google.maps.LatLng(position[0],position[1]); - } - paths = new google.maps.MVCArray(paths); - //noinspection JSValidateTypes - options = $.extend({ - path: paths - },options); - mapObject = new google.maps.Polyline(options); - } else if (key === 'rectangle') { - var parts = data[i].split(':'); - var ne = parts[0].split(','); - var sw = parts[1].split(','); - sw = new google.maps.LatLng(sw[0],sw[1]); - ne = new google.maps.LatLng(ne[0],ne[1]); - //noinspection JSValidateTypes - options = $.extend({ - bounds: new google.maps.LatLngBounds(sw,ne) - },options); - mapObject = new google.maps.Rectangle(options); - }else if (key === 'imageoverlay'){ - var parts = data[i].split(':'); - var ne = parts[0].split(','); - var sw = parts[1].split(','); - var imageUrl = parts[2]; - sw = new google.maps.LatLng(sw[0],sw[1]); - ne = new google.maps.LatLng(ne[0],ne[1]); - - options = $.extend({ - bounds: new google.maps.LatLngBounds(sw,ne) - },options); - var rectangle = new google.maps.Rectangle(options); - - //add image url as metadata entry - metadata.image = { - name:'image',value:imageUrl - }; - - mapObject = { - type:'imageoverlaybounds', - overlay:rectangle, - metadata:metadata - }; - - this.__createOrUpdateImageOverlay(mapObject,imageUrl); - this.__readMapObjectOptionsFromMetadata(mapObject); - - } - if(mapObject !== null){ - //imageoverlay needs special handling - if(key !== 'imageoverlay' ){ - mapObject = { - type:key, - overlay:mapObject, - metadata:metadata - }; - - this.__registerRightClickListener(mapObject); - this.__addMapObject(mapObject); - this.__readMapObjectOptionsFromMetadata(mapObject); - } - - isMapObject = true; - - } - } - }else if(!isMapObject){ - //handle global map parameters - if(this.__mapParameters[match[1]] === undefined){ - this.__mapParameters[match[1]] = {}; - } - this.__mapParameters[match[1]].value = match[2]; - } - } - } - } - }catch(e){ - console.log('An error occurred when parsing data'); - return false; - } - return true; - } - }, - addControlButton:function (text, onclick){ - // Set CSS for the control border - var controlUI = $('
'); - $(controlUI).click(function(){ - onclick.call(this); - }).appendTo(this.__controlsDiv); - - // Set CSS for the control interior - var controlText = $('') - .text(text).appendTo(controlUI); - }, - setup:function(o){ - //extend options - $.extend(this.__options,o); - - //Override tostring methods for wiki code generation - google.maps.LatLng.prototype.toString = function(){ - return this.lat()+','+this.lng(); - }; - - google.maps.Rectangle.prototype.toString = function(){ - var bounds = this.getBounds(); - var ne = bounds.getNorthEast(); - var sw = bounds.getSouthWest(); - return ne+':'+sw; - }; - - google.maps.Marker.prototype.toString = function(){ - var position = this.getPosition(); - return position.lat()+','+position.lng(); - }; - - google.maps.Circle.prototype.toString = function(){ - var center = this.getCenter(); - var radius = this.getRadius(); - return center.lat()+','+center.lng()+':'+radius; - }; - - google.maps.Polygon.prototype.toString = function(){ - var polygons = ''; - this.getPath().forEach(function(e){ - polygons += ':'+e; - }); - return polygons.substr(1); - }; - - google.maps.Polyline.prototype.toString = function(){ - var lines = ''; - this.getPath().forEach(function(e){ - lines += ':'+e; - }); - return lines.substr(1); - }; - - google.maps.GroundOverlay.prototype.toString = function(){ - var bounds = this.getBounds(); - var sw = bounds.getSouthWest(); - var ne = bounds.getNorthEast(); - return [ne,sw,this.getUrl()].join(':'); - }; - - //initialize rest - this.__initMap(); - this.__initControls(); - } + __map:null, + __drawingManager:null, + __mapObjects:[], + __controlsDiv:null, + __options:{ + canvas:'map-canvas', + onRightClick:function(){} + }, + __mapObjectOptions: { + marker:{ + draggable:true + }, + polyline:{ + strokeWeight:2, + strokeOpacity:1, + strokeColor:'#FF0000', + editable:true + }, + circle:{ + strokeWeight:2, + strokeOpacity:1, + strokeColor:'#FF0000', + fillColor:'#FF0000', + fillOpacity:0.5, + editable:true + }, + rectangle:{ + strokeWeight:2, + strokeOpacity:1, + strokeColor:'#FF0000', + fillColor:'#FF0000', + fillOpacity:0.5, + editable:true + }, + polygon:{ + strokeWeight:2, + strokeOpacity:1, + strokeColor:'#FF0000', + fillColor:'#FF0000', + fillOpacity:0.5, + editable:true + }, + imageoverlay:{ + strokeWeight:1, + strokeOpacity:0.5, + strokeColor:'#000', + fillOpacity:0.0, + editable:true + } + }, + __mapParameters:{ + mappingservice: { + values:mw.config.get( 'egMapsAvailableServices' ) + }, + copycoords: { + values:['on','off'] + }, + markercluster: { + values:['on','off'] + }, + searchmarkers:{ + values:['title','all'] + }, + 'static':{ + values:['on','off'] + }, + maxzoom: { + values:[] + }, + minzoom: { + values:[] + }, + zoom:{ + values:[] + }, + centre:{ + values:[] + }, + title:{ + values:[] + }, + label:{ + values:[] + }, + icon:{ + values:[] + }, + type:{ + values:[] + }, + types:{ + values:[] + }, + layers:{ + values:[] + }, + controls:{ + values:[] + }, + zoomstyle:{ + values:['default','small','large'] + }, + typestyle:{ + values:[] + }, + autoinfowindows:{ + values:['on','off'] + }, + kml:{ + values:[] + }, + gkml:{ + values:[] + }, + fusiontables:{ + values:[] + }, + resizable:{ + values:[] + }, + tilt:{ + values:[] + }, + kmlrezoom:{ + values:['on','off'] + }, + poi:{ + values:['on','off'] + }, + visitedicon:{ + values:[] + } + }, + __addMapObject:function(o){ + var idx = this.__mapObjects.indexOf(o); + if(idx === -1){ + this.__mapObjects.push(o); + o.overlay.setMap(this.__map); + } + }, + __removeMapObject:function(o){ + var idx = this.__mapObjects.indexOf(o); + if(idx !== -1){ + this.__mapObjects[idx].overlay.setMap(null); + this.__mapObjects.splice(idx,1); + } + }, + __createOrUpdateImageOverlay:function(e,imageUrl){ + //remove old image overlay if exists + this.__removeMapObject(e.imageoverlay); + + //set to new type so it doesn't collide with rectangle + e.type = 'imageoverlaybounds'; + + //add map objects + this.__addMapObject(e); + var image = new google.maps.GroundOverlay(imageUrl, e.overlay.getBounds()); + var imageOverlay = { + overlay:image, + type:'imageoverlay' + }; + this.__addMapObject(imageOverlay); + e.imageoverlay = imageOverlay; + imageOverlay.metadata = e.metadata; + + //register right click listener if not already done + if(e.rightClickListener !== true){ + google.maps.event.addListener(e.overlay, 'rightclick', function () { + mapEditor.__options.onRightClick(e); + }); + e.rightClickListener = true; + } + + //register bounds change listener if not already done + if(e.boundsChangedListener !== true){ + google.maps.event.addListener(e.overlay, 'bounds_changed', function () { + //destroy and recreate imageoverlay (due to no e.imageoverlay.setBounds() method) + mapEditor.__createOrUpdateImageOverlay(e, e.imageoverlay.overlay.getUrl()); + }); + e.boundsChangedListener = true; + } + + return imageOverlay; + }, + __initControls:function(){ + //Create root controls element + var controlDiv = this.__controlsDiv = document.createElement('div'); + controlDiv.setAttribute('class','mapeditor-controls'); + controlDiv.index = 1; + + this.__map.controls[google.maps.ControlPosition.BOTTOM_CENTER].push(controlDiv); + }, + __initMap:function(){ + var myOptions = { + center:new google.maps.LatLng(0, 0), + zoom:1, + mapTypeId:google.maps.MapTypeId.ROADMAP + }; + + this.__map = new google.maps.Map(document.getElementById(this.__options.canvas),myOptions); + + //noinspection JSUnresolvedVariable + var drawingManager = this.__drawingManager = new google.maps.drawing.DrawingManager({ + drawingMode:null, + drawingControl:true, + drawingControlOptions:{ + position:google.maps.ControlPosition.TOP_CENTER + }, + markerOptions:this.__mapObjectOptions.marker, + circleOptions:this.__mapObjectOptions.circle, + rectangleOptions:this.__mapObjectOptions.rectangle, + polygonOptions:this.__mapObjectOptions.polygon, + polylineOptions:this.__mapObjectOptions.polyline + }); + drawingManager.setMap(this.__map); + + google.maps.event.addListener(drawingManager, 'overlaycomplete', function (e) { + mapEditor.__addMapObject(e); + mapEditor.__registerRightClickListener(e); + google.maps.event.trigger(e.overlay, 'rightclick'); + }); + }, + __readMapObjectOptionsFromMetadata:function(e){ + var options = $.extend({},this.__mapObjectOptions[e.type]); + for(var key in e.metadata){ + var data = e.metadata[key]; + if(data.value.trim() !== ''){ + options[data.name] = data.value; + } + } + try{ + e.overlay.setOptions(options); + return true; + }catch(e){ + return false; + } + }, + __writeMetaDataToMapObject:function(e,metadata){ + e.metadata = this.__arrayToObject(metadata); + }, + __convertPositionalParametersToMetaData:function(positionalArray){ + var positionalNames = [ + 'title', + 'text', + 'strokeColor', + 'strokeOpacity', + 'strokeWeight', + 'fillColor', + 'fillOpacity', + 'showOnHover' + ]; + + if(positionalArray !== undefined && positionalArray.length > 0){ + if(positionalArray[0].trim().indexOf('link:') === 0){ + positionalNames.splice(0,1); + positionalNames[0] = 'link'; + } + } + + for(var x = 0; x < positionalArray.length; x++){ + positionalArray[x] = { + name:positionalNames[x], + value:positionalArray[x].trim() + }; + } + return this.__arrayToObject(positionalArray); + }, + __arrayToObject:function(arr){ + var o = {}; + for (var i = 0; i < arr.length; ++i){ + o[i] = arr[i]; + } + return o; + }, + __registerRightClickListener:function(e){ + google.maps.event.addListener(e.overlay, 'rightclick', function () { + mapEditor.__options.onRightClick(e); + }); + }, + __generateWikiCode:function( seperators ){ + var code = seperators.codeStart; + + var markers = ''; + var circles = ''; + var polygons = ''; + var lines = ''; + var rectangles = ''; + var imageoverlays = ''; + + for(var x = 0; x < this.__mapObjects.length; x++){ + var mapObject = this.__mapObjects[x].overlay; + var mapObjectType = this.__mapObjects[x].type; + var mapObjectMeta = this.__mapObjects[x].metadata; + + var metadata = ''; + if(mapObjectMeta !== undefined){ + var delimiterPosition = ''; + for(var key in mapObjectMeta){ + var data = mapObjectMeta[key]; + delimiterPosition += delimiterPosition.length > 0 ? ' ~' : '~'; + if(data.value !== ''){ + if(data.name === 'link' && data.value.indexOf('link:') === -1){ + data.value = 'link:'+data.value; + } + if(!(mapObjectType === 'imageoverlay' && data.name === 'image')){ + metadata += delimiterPosition+data.value; + delimiterPosition = ''; + } + } + } + } + + var serializedData = mapObject+metadata; + if (mapObjectType === 'marker') { + markers += markers === '' ? serializedData : '; '+serializedData; + } else if (mapObjectType === 'circle') { + circles += circles === '' ? serializedData : '; '+serializedData; + } else if (mapObjectType === 'polygon') { + polygons += polygons === '' ? serializedData : '; '+serializedData; + } else if (mapObjectType === 'polyline') { + lines += lines === '' ? serializedData : '; '+serializedData; + } else if (mapObjectType === 'rectangle') { + rectangles += rectangles === '' ? serializedData : '; '+serializedData; + }else if(mapObjectType === 'imageoverlay'){ + imageoverlays += imageoverlays === '' ? serializedData : '; '+serializedData; + } + } + + + code += markers !== '' ? markers : ''; + code += circles !== '' ? seperators.separator+'circles='+circles : ''; + code += polygons !== '' ? seperators.separator+'polygons='+polygons : ''; + code += lines !== '' ? seperators.separator+'lines='+lines : ''; + code += rectangles !== '' ? seperators.separator+'rectangles='+rectangles : ''; + code += imageoverlays !== '' ? seperators.separator+'imageoverlays='+imageoverlays : ''; + + //add map parameters + for(var param in this.__mapParameters){ + var value = this.__mapParameters[param].value; + if(value === undefined || value === ''){ + continue; + } + code += '\n|'+param+'='+value; + } + + code += seperators.codeEnd; + return code; + }, + __importWikiCode:function(rawData){ + var syntaxPattern = /^\{\{#display_map:[\s\S]*\}\}[\s\n]*$/i; + if(rawData.match(syntaxPattern) === null){ //NO MATCH + return false; + }else{ + try{ + var patterns = { + marker: /^\{\{#display_map:\s*(.*)/i, + polyline: /\|\s*lines=(.*)/i, + circle:/\|\s*circles=(.*)/i, + polygon:/\|\s*polygons=(.*)/i, + rectangle:/\|\s*rectangles=(.*)/i, + imageoverlay:/\|\s*imageoverlays=(.*)/i, + parameter:/\|\s*(.*)=(.*)/i + }; + var mapObjects = []; + rawData = rawData.split('\n'); + for(var j = 0; j < rawData.length; j++){ + for (var key in patterns){ + var match = rawData[j].match(patterns[key]); + if(match !== null && match[1].trim().length !== 0){ + var isMapObject = false; + if(key !== 'parameter'){ + var data = match[1].split(';'); + for(var i = 0; i < data.length; i++){ + + var metadata = data[i].split('~'); + metadata.splice(0,1); + if(metadata.length > 0){ + data[i] = data[i].substring(0,data[i].indexOf('~')); + } + metadata = this.__convertPositionalParametersToMetaData(metadata); + + var options = this.__mapObjectOptions[key]; + var mapObject = null; + if (key === 'marker') { + var position = data[i].split(','); + //noinspection JSValidateTypes + options = $.extend({ + position: new google.maps.LatLng(position[0],position[1]) + },options); + mapObject = new google.maps.Marker(options); + } else if (key === 'circle') { + var parts = data[i].split(':'); + var radius = parts[1]; + var position = parts[0].split(','); + //noinspection JSValidateTypes + options = $.extend({ + center: new google.maps.LatLng(position[0],position[1]), + radius: parseFloat(radius) + },options); + mapObject = new google.maps.Circle(options); + } else if (key === 'polygon') { + var paths = data[i].split(':'); + for(var x = 0; x < paths.length; x++){ + var position = paths[x].split(','); + paths[x] = new google.maps.LatLng(position[0],position[1]); + } + paths = new google.maps.MVCArray(paths); + //noinspection JSValidateTypes + options = $.extend({ + paths: paths + },options); + mapObject = new google.maps.Polygon(options); + } else if (key === 'polyline') { + var paths = data[i].split(':'); + for(var x = 0; x < paths.length; x++){ + var position = paths[x].split(','); + paths[x] = new google.maps.LatLng(position[0],position[1]); + } + paths = new google.maps.MVCArray(paths); + //noinspection JSValidateTypes + options = $.extend({ + path: paths + },options); + mapObject = new google.maps.Polyline(options); + } else if (key === 'rectangle') { + var parts = data[i].split(':'); + var ne = parts[0].split(','); + var sw = parts[1].split(','); + sw = new google.maps.LatLng(sw[0],sw[1]); + ne = new google.maps.LatLng(ne[0],ne[1]); + //noinspection JSValidateTypes + options = $.extend({ + bounds: new google.maps.LatLngBounds(sw,ne) + },options); + mapObject = new google.maps.Rectangle(options); + }else if (key === 'imageoverlay'){ + var parts = data[i].split(':'); + var ne = parts[0].split(','); + var sw = parts[1].split(','); + var imageUrl = parts[2]; + sw = new google.maps.LatLng(sw[0],sw[1]); + ne = new google.maps.LatLng(ne[0],ne[1]); + + options = $.extend({ + bounds: new google.maps.LatLngBounds(sw,ne) + },options); + var rectangle = new google.maps.Rectangle(options); + + //add image url as metadata entry + metadata.image = { + name:'image',value:imageUrl + }; + + mapObject = { + type:'imageoverlaybounds', + overlay:rectangle, + metadata:metadata + }; + + this.__createOrUpdateImageOverlay(mapObject,imageUrl); + this.__readMapObjectOptionsFromMetadata(mapObject); + + } + if(mapObject !== null){ + //imageoverlay needs special handling + if(key !== 'imageoverlay' ){ + mapObject = { + type:key, + overlay:mapObject, + metadata:metadata + }; + + this.__registerRightClickListener(mapObject); + this.__addMapObject(mapObject); + this.__readMapObjectOptionsFromMetadata(mapObject); + } + + isMapObject = true; + + } + } + }else if(!isMapObject){ + //handle global map parameters + if(this.__mapParameters[match[1]] === undefined){ + this.__mapParameters[match[1]] = {}; + } + this.__mapParameters[match[1]].value = match[2]; + } + } + } + } + }catch(e){ + console.log('An error occurred when parsing data'); + return false; + } + return true; + } + }, + addControlButton:function (text, onclick){ + // Set CSS for the control border + var controlUI = $('
'); + $(controlUI).click(function(){ + onclick.call(this); + }).appendTo(this.__controlsDiv); + + // Set CSS for the control interior + var controlText = $('') + .text(text).appendTo(controlUI); + }, + setup:function(o){ + //extend options + $.extend(this.__options,o); + + //Override tostring methods for wiki code generation + google.maps.LatLng.prototype.toString = function(){ + return this.lat()+','+this.lng(); + }; + + google.maps.Rectangle.prototype.toString = function(){ + var bounds = this.getBounds(); + var ne = bounds.getNorthEast(); + var sw = bounds.getSouthWest(); + return ne+':'+sw; + }; + + google.maps.Marker.prototype.toString = function(){ + var position = this.getPosition(); + return position.lat()+','+position.lng(); + }; + + google.maps.Circle.prototype.toString = function(){ + var center = this.getCenter(); + var radius = this.getRadius(); + return center.lat()+','+center.lng()+':'+radius; + }; + + google.maps.Polygon.prototype.toString = function(){ + var polygons = ''; + this.getPath().forEach(function(e){ + polygons += ':'+e; + }); + return polygons.substr(1); + }; + + google.maps.Polyline.prototype.toString = function(){ + var lines = ''; + this.getPath().forEach(function(e){ + lines += ':'+e; + }); + return lines.substr(1); + }; + + google.maps.GroundOverlay.prototype.toString = function(){ + var bounds = this.getBounds(); + var sw = bounds.getSouthWest(); + var ne = bounds.getNorthEast(); + return [ne,sw,this.getUrl()].join(':'); + }; + + //initialize rest + this.__initMap(); + this.__initControls(); + } }; $(document).ready(function(){ - function openDialog(e){ - if(e.metadata !== undefined){ - for(var key in e.metadata){ - var data = e.metadata[key]; - $(this).find('form input[name="'+data.name+'"]').val(data.value); - } - } - var i18nButtons = {}; - i18nButtons[mw.msg('mapeditor-done-button')] = function () { - var form = $(this).find('form'); - form.find('.miniColors').each(function(){ - if($(this).val() === '#'){ - $(this).val(''); - } - }); - mapEditor.__writeMetaDataToMapObject(e,form.serializeArray()); - $(this).dialog("close"); - if(!mapEditor.__readMapObjectOptionsFromMetadata(e)){ - alert(mw.msg('mapeditor-parser-error')); - } - }; - i18nButtons[mw.msg('mapeditor-remove-button')] = function () { - mapEditor.__removeMapObject(e); - $(this).dialog("close"); - }; - - this.dialog({ - modal:true, - buttons:i18nButtons, - open:function(){ - if(e.metadata !== undefined){ - var isText = true; - for(var key in e.metadata){ - var data = e.metadata[key]; - if(data.name === 'link' && data.value.length > 0){ - isText = false; - break; - } - } - //depending on existing metadata, - //show either form with title/text fields or just link field - if(isText){ - $(this).find('input[value="text"]').trigger('click'); - }else{ - $(this).find('input[value="link"]').trigger('click'); - } - }else{ - //default trigger click on text radio button - $(this).find('input[value="text"]').trigger('click'); - } - - - }, - beforeClose:function(){ - //reset the form - var form = $(this).find('form'); - form[0].reset(); - form.find('.opacity-data-holder').text(mw.msg('mapeditor-none-text')); - form.find('.ui-slider').slider('value',-1); - form.find('.miniColors').miniColors('value','#fff').val(''); - } - }); - } - - function openImageOverlayDialog(e,callback){ - - var form = $('#imageoverlay-form'); - - var i18nButtons = {}; - i18nButtons[mw.msg('mapeditor-done-button')] = function(){ - var imageUrl = $(this).find('input[name="image"]').val(); - mapEditor.__createOrUpdateImageOverlay(e,imageUrl); - - var metadata = form.find('form').serializeArray(); - mapEditor.__writeMetaDataToMapObject(e,metadata); - mapEditor.__writeMetaDataToMapObject(e.imageoverlay,metadata); - - form.dialog("close"); - }; - - i18nButtons[mw.msg('mapeditor-remove-button')] = function () { - mapEditor.__removeMapObject(e.imageoverlay); - e.imageoverlay = undefined; - form.dialog("close"); - }; - - form.dialog({ - modal:true, - buttons:i18nButtons, - open:function(){ - //restore data from previous edits - if(e.metadata !== undefined){ - var isText = true; - for(var key in e.metadata){ - var data = e.metadata[key]; - if(data.name === 'link' && data.value.length > 0){ - isText = false; - } - form.find('form input[name="'+data.name+'"]').val(data.value); - } - //depending on existing metadata, - //show either form with title/text fields or just link field - if(isText){ - form.find('input[value="text"]').trigger('click'); - }else{ - form.find('input[value="link"]').trigger('click'); - } - }else{ - //default trigger click on text radio button - form.find('input[value="text"]').trigger('click'); - } - }, - beforeClose:function(){ - mapEditor.__drawingManager.setMap(mapEditor.__map); //re-enable standard drawing manager - if(e.imageoverlay === undefined){ - mapEditor.__removeMapObject(e); - } - - //reset the form - var formElement = form.find('form'); - formElement[0].reset(); - - if(callback !== undefined && typeof(callback) === 'function'){ - callback(); - } - - } - }); - } - - mapEditor.setup({ - onRightClick:function(e){ - if (e.type === 'marker') { - openDialog.call($('#marker-form'),e); - } else if (e.type === 'circle') { - openDialog.call($('#fillable-form'),e); - } else if (e.type === 'polygon') { - openDialog.call($('#polygon-form'),e); - } else if (e.type === 'polyline') { - openDialog.call($('#strokable-form'),e); - } else if (e.type === 'rectangle') { - openDialog.call($('#fillable-form'),e); - } else if (e.type === 'imageoverlaybounds') { - openImageOverlayDialog(e); - } - } - }); - - //add custom controls + function openDialog(e){ + if(e.metadata !== undefined){ + for(var key in e.metadata){ + var data = e.metadata[key]; + $(this).find('form input[name="'+data.name+'"]').val(data.value); + } + } + var i18nButtons = {}; + i18nButtons[mw.msg('mapeditor-done-button')] = function () { + var form = $(this).find('form'); + form.find('.miniColors').each(function(){ + if($(this).val() === '#'){ + $(this).val(''); + } + }); + mapEditor.__writeMetaDataToMapObject(e,form.serializeArray()); + $(this).dialog("close"); + if(!mapEditor.__readMapObjectOptionsFromMetadata(e)){ + alert(mw.msg('mapeditor-parser-error')); + } + }; + i18nButtons[mw.msg('mapeditor-remove-button')] = function () { + mapEditor.__removeMapObject(e); + $(this).dialog("close"); + }; + + this.dialog({ + modal:true, + buttons:i18nButtons, + open:function(){ + if(e.metadata !== undefined){ + var isText = true; + for(var key in e.metadata){ + var data = e.metadata[key]; + if(data.name === 'link' && data.value.length > 0){ + isText = false; + break; + } + } + //depending on existing metadata, + //show either form with title/text fields or just link field + if(isText){ + $(this).find('input[value="text"]').trigger('click'); + }else{ + $(this).find('input[value="link"]').trigger('click'); + } + }else{ + //default trigger click on text radio button + $(this).find('input[value="text"]').trigger('click'); + } + + + }, + beforeClose:function(){ + //reset the form + var form = $(this).find('form'); + form[0].reset(); + form.find('.opacity-data-holder').text(mw.msg('mapeditor-none-text')); + form.find('.ui-slider').slider('value',-1); + form.find('.miniColors').miniColors('value','#fff').val(''); + } + }); + } + + function openImageOverlayDialog(e,callback){ + + var form = $('#imageoverlay-form'); + + var i18nButtons = {}; + i18nButtons[mw.msg('mapeditor-done-button')] = function(){ + var imageUrl = $(this).find('input[name="image"]').val(); + mapEditor.__createOrUpdateImageOverlay(e,imageUrl); + + var metadata = form.find('form').serializeArray(); + mapEditor.__writeMetaDataToMapObject(e,metadata); + mapEditor.__writeMetaDataToMapObject(e.imageoverlay,metadata); + + form.dialog("close"); + }; + + i18nButtons[mw.msg('mapeditor-remove-button')] = function () { + mapEditor.__removeMapObject(e.imageoverlay); + e.imageoverlay = undefined; + form.dialog("close"); + }; + + form.dialog({ + modal:true, + buttons:i18nButtons, + open:function(){ + //restore data from previous edits + if(e.metadata !== undefined){ + var isText = true; + for(var key in e.metadata){ + var data = e.metadata[key]; + if(data.name === 'link' && data.value.length > 0){ + isText = false; + } + form.find('form input[name="'+data.name+'"]').val(data.value); + } + //depending on existing metadata, + //show either form with title/text fields or just link field + if(isText){ + form.find('input[value="text"]').trigger('click'); + }else{ + form.find('input[value="link"]').trigger('click'); + } + }else{ + //default trigger click on text radio button + form.find('input[value="text"]').trigger('click'); + } + }, + beforeClose:function(){ + mapEditor.__drawingManager.setMap(mapEditor.__map); //re-enable standard drawing manager + if(e.imageoverlay === undefined){ + mapEditor.__removeMapObject(e); + } + + //reset the form + var formElement = form.find('form'); + formElement[0].reset(); + + if(callback !== undefined && typeof(callback) === 'function'){ + callback(); + } + + } + }); + } + + mapEditor.setup({ + onRightClick:function(e){ + if (e.type === 'marker') { + openDialog.call($('#marker-form'),e); + } else if (e.type === 'circle') { + openDialog.call($('#fillable-form'),e); + } else if (e.type === 'polygon') { + openDialog.call($('#polygon-form'),e); + } else if (e.type === 'polyline') { + openDialog.call($('#strokable-form'),e); + } else if (e.type === 'rectangle') { + openDialog.call($('#fillable-form'),e); + } else if (e.type === 'imageoverlaybounds') { + openImageOverlayDialog(e); + } + } + }); + + //add custom controls if( $('#map-canvas').attr('context') != 'forminput' ) { //for Special:MapEditor var editorMarkers = { 'codeStart' : '{{#display_map: ', @@ -729,9 +729,12 @@ $(document).ready(function(){ code = code.split('\n').join('\r\n'); } $('#code-output').text(code); - $('#code-output').dialog({ + $('#code-output-container').dialog({ modal:true, - width:'80%' + width:'80%', + open:function(){ + $('#code-output').focus(); + } }); }); @@ -767,153 +770,153 @@ $(document).ready(function(){ }); } - mapEditor.addControlButton(mw.msg('mapeditor-mapparam-button'), function(){ - var i18nButtons = {}; - i18nButtons[mw.msg('mapeditor-done-button')] = function(){ - var data = $(this).find('form input').not('select').serializeArray(); - for(var x = 0; x < data.length; x++){ - mapEditor.__mapParameters[data[x].name].value = data[x].value; - } - $(this).dialog('close'); - }; - $('#map-parameter-form').dialog({ - modal:true, - width: 500, - buttons:i18nButtons - }); - }); - - mapEditor.addControlButton(mw.msg('mapeditor-clear-button'), function(){ - while(mapEditor.__mapObjects.length > 0){ - var mapObj = mapEditor.__mapObjects.pop(); - mapObj.overlay.setMap(null); - } - for(var param in mapEditor.__mapParameters){ - mapEditor.__mapParameters[param].value = undefined; - } - }); - - mapEditor.addControlButton(mw.msg('mapeditor-imageoverlay-button'), function(){ - var button = $(this); - if(button.data('clicked') === true){ - return; //already clicked, disregard this click - }else{ - button.data('clicked',true); - } - - mapEditor.__drawingManager.setMap(null); //disable current drawing manager - - var drawingManager = new google.maps.drawing.DrawingManager({ - drawingMode:google.maps.drawing.OverlayType.RECTANGLE, - drawingControl:false, - rectangleOptions:mapEditor.__mapObjectOptions.imageoverlay - }); - drawingManager.setMap(mapEditor.__map); - - google.maps.event.addListener(drawingManager, 'overlaycomplete', function (e) { - mapEditor.__addMapObject(e); //add if it doesn't already exist. - - drawingManager.setMap(null); - - openImageOverlayDialog(e,function(){ - //re-enable button - button.data('clicked',false); - }); - - }); - - }); - - - - //init map parameters - var formselect = $('#map-parameter-form select[name="key"]'); - formselect.on('change',function(){ - var option = $(this); - var key = option.val(); - var value = mapEditor.__mapParameters[key].value; - if(value === undefined){ - value = ''; - } - - var parent = option.parent(); - var input = $(''); - var removeButton = $('[x]'); - var option2 = option.clone(true); - var container = $('
'); - - option2.find('option[value="'+key+'"]').remove(); - option.attr('disabled',true); - removeButton.on('click',function(){ - var removedKey = $(this).prevAll('select').val(); - var activeSelect = $(this).parent().parent().find('select').not('select[disabled="disabled"]'); - var option = $(''); - activeSelect.children().first().after(option); - $(this).parent().remove(); - mapEditor.__mapParameters[key].value = undefined; - return false; - }); - - parent.append(input); - parent.append(removeButton); - parent.parent().append(container); - container.append(option2); - - input.autocomplete({ - source: mapEditor.__mapParameters[key].values, - minLength: 0, - autoFocus: true - }); - input.autocomplete('search',''); - }); - - for(var parameter in mapEditor.__mapParameters){ - var option = $(''); - formselect.append(option); - } - - //hide link input initially - $('input[name="link"]').attr('disabled',true).hide().prev().hide(); - - //init text/link switcher - $('input[name="switch"]').on('click',function(){ - if($(this).val() === 'link'){ - $(this).parent().next().find('input[name="title"],input[name="text"]').attr('disabled',true).hide().prev().hide(); - $(this).parent().next().find('input[name="link"]').attr('disabled',false).show().prev().show(); - }else{ - $(this).parent().next().find('input[name="title"],input[name="text"]').attr('disabled',false).show().prev().show(); - $(this).parent().next().find('input[name="link"]').attr('disabled',true).hide().prev().hide(); - } - }); - - //init enter keypress to press done on dialog. - $('.mapeditor-dialog').on('keypress',function(e){ - if(e.keyCode === 13){ - $(this).dialog('option','buttons').Done.call(this); - } - }); - - //init sliders - $('input[name="strokeOpacity"],input[name="fillOpacity"]').each(function(){ - var input = $(this); - var dataHolder = $(''+mw.msg('mapeditor-none-text')+''); - dataHolder.css({fontSize: 12}); - var slider = $('
').slider({ - min: -1, - slide: function(event, ui){ - if(ui.value === -1){ - input.val(''); - dataHolder.text(mw.msg('mapeditor-none-text')); - }else{ - input.val( ui.value/100 ); - dataHolder.text(ui.value+'%'); - } - } - }); - input.before(dataHolder); - input.after(slider); - }); - - //init color pickers - $('input[name="strokeColor"],input[name="fillColor"]').miniColors().miniColors('value','').val(''); + mapEditor.addControlButton(mw.msg('mapeditor-mapparam-button'), function(){ + var i18nButtons = {}; + i18nButtons[mw.msg('mapeditor-done-button')] = function(){ + var data = $(this).find('form input').not('select').serializeArray(); + for(var x = 0; x < data.length; x++){ + mapEditor.__mapParameters[data[x].name].value = data[x].value; + } + $(this).dialog('close'); + }; + $('#map-parameter-form').dialog({ + modal:true, + width: 500, + buttons:i18nButtons + }); + }); + + mapEditor.addControlButton(mw.msg('mapeditor-clear-button'), function(){ + while(mapEditor.__mapObjects.length > 0){ + var mapObj = mapEditor.__mapObjects.pop(); + mapObj.overlay.setMap(null); + } + for(var param in mapEditor.__mapParameters){ + mapEditor.__mapParameters[param].value = undefined; + } + }); + + mapEditor.addControlButton(mw.msg('mapeditor-imageoverlay-button'), function(){ + var button = $(this); + if(button.data('clicked') === true){ + return; //already clicked, disregard this click + }else{ + button.data('clicked',true); + } + + mapEditor.__drawingManager.setMap(null); //disable current drawing manager + + var drawingManager = new google.maps.drawing.DrawingManager({ + drawingMode:google.maps.drawing.OverlayType.RECTANGLE, + drawingControl:false, + rectangleOptions:mapEditor.__mapObjectOptions.imageoverlay + }); + drawingManager.setMap(mapEditor.__map); + + google.maps.event.addListener(drawingManager, 'overlaycomplete', function (e) { + mapEditor.__addMapObject(e); //add if it doesn't already exist. + + drawingManager.setMap(null); + + openImageOverlayDialog(e,function(){ + //re-enable button + button.data('clicked',false); + }); + + }); + + }); + + + + //init map parameters + var formselect = $('#map-parameter-form select[name="key"]'); + formselect.on('change',function(){ + var option = $(this); + var key = option.val(); + var value = mapEditor.__mapParameters[key].value; + if(value === undefined){ + value = ''; + } + + var parent = option.parent(); + var input = $(''); + var removeButton = $('[x]'); + var option2 = option.clone(true); + var container = $('
'); + + option2.find('option[value="'+key+'"]').remove(); + option.attr('disabled',true); + removeButton.on('click',function(){ + var removedKey = $(this).prevAll('select').val(); + var activeSelect = $(this).parent().parent().find('select').not('select[disabled="disabled"]'); + var option = $(''); + activeSelect.children().first().after(option); + $(this).parent().remove(); + mapEditor.__mapParameters[key].value = undefined; + return false; + }); + + parent.append(input); + parent.append(removeButton); + parent.parent().append(container); + container.append(option2); + + input.autocomplete({ + source: mapEditor.__mapParameters[key].values, + minLength: 0, + autoFocus: true + }); + input.autocomplete('search',''); + }); + + for(var parameter in mapEditor.__mapParameters){ + var option = $(''); + formselect.append(option); + } + + //hide link input initially + $('input[name="link"]').attr('disabled',true).hide().prev().hide(); + + //init text/link switcher + $('input[name="switch"]').on('click',function(){ + if($(this).val() === 'link'){ + $(this).parent().next().find('input[name="title"],input[name="text"]').attr('disabled',true).hide().prev().hide(); + $(this).parent().next().find('input[name="link"]').attr('disabled',false).show().prev().show(); + }else{ + $(this).parent().next().find('input[name="title"],input[name="text"]').attr('disabled',false).show().prev().show(); + $(this).parent().next().find('input[name="link"]').attr('disabled',true).hide().prev().hide(); + } + }); + + //init enter keypress to press done on dialog. + $('.mapeditor-dialog').on('keypress',function(e){ + if(e.keyCode === 13){ + $(this).dialog('option','buttons').Done.call(this); + } + }); + + //init sliders + $('input[name="strokeOpacity"],input[name="fillOpacity"]').each(function(){ + var input = $(this); + var dataHolder = $(''+mw.msg('mapeditor-none-text')+''); + dataHolder.css({fontSize: 12}); + var slider = $('
').slider({ + min: -1, + slide: function(event, ui){ + if(ui.value === -1){ + input.val(''); + dataHolder.text(mw.msg('mapeditor-none-text')); + }else{ + input.val( ui.value/100 ); + dataHolder.text(ui.value+'%'); + } + } + }); + input.before(dataHolder); + input.after(slider); + }); + + //init color pickers + $('input[name="strokeColor"],input[name="fillColor"]').miniColors().miniColors('value','').val(''); }); \ No newline at end of file From 1fcdf5be83f4c5fe3eea887c8039ce38ccd89923 Mon Sep 17 00:00:00 2001 From: Kim Eik Date: Wed, 7 Aug 2013 08:53:03 +0200 Subject: [PATCH 002/163] added extended copycoords parameter support. Missing rightclick event listener on several types of overlays. Added for circles, polygons, lines, markers, imageoverlays, rectangles and other overlays loaded through geoxml Change-Id: I80cf9e743578adef2f239a620ce10caa9d195e3a --- .../services/GoogleMaps3/jquery.googlemap.js | 67 ++++++++++++------- 1 file changed, 44 insertions(+), 23 deletions(-) diff --git a/includes/services/GoogleMaps3/jquery.googlemap.js b/includes/services/GoogleMaps3/jquery.googlemap.js index ca6cfa19e..eda70936a 100644 --- a/includes/services/GoogleMaps3/jquery.googlemap.js +++ b/includes/services/GoogleMaps3/jquery.googlemap.js @@ -184,7 +184,24 @@ // If there are any non-Google KML/KMZ layers, load the geoxml library and use it to add these layers. if (options.kml.length != 0) { mw.loader.using('ext.maps.gm3.geoxml', function () { - var geoXml = new geoXML3.parser({ map:_this.map, zoom:options.kmlrezoom }); + + function addToCopyCoords(doc){ + if(options.copycoords){ + for(var i = 0; i < doc.length; i++){ + addCopyCoordsOnRightClick([ + doc[i].gpolygons, + doc[i].gpolylines, + doc[i].ggroundoverlays + ]); + } + } + } + + var geoXml = new geoXML3.parser({ + map:_this.map, + zoom:options.kmlrezoom, + afterParse: addToCopyCoords + }); geoXml.parse(options.kml); }); } @@ -358,6 +375,7 @@ }; this.setup = function () { + var showEarth = $.inArray('earth', options.types) !== -1; // If there are any non-Google KML/KMZ layers, load the geoxml library and use it to add these layers. @@ -602,28 +620,6 @@ } } - /** - * used in display_line functionality - * allows the copy to clipboard of coordinates - */ - if (options.copycoords) { - function addRightClickListener(object) { - google.maps.event.addListener(object, 'rightclick', function (event) { - prompt(mediaWiki.msg('maps-copycoords-prompt'), event.latLng.lat() + ',' + event.latLng.lng()); - }); - } - - for (var x = 0; x < this.markers.length; x++) { - addRightClickListener(this.markers[x]); - } - - for (var x = 0; x < this.lines.length; x++) { - addRightClickListener(this.lines[x]); - } - - addRightClickListener(this.map); - } - /** * Allows grouping of markers. */ @@ -676,6 +672,19 @@ } } + if (options.copycoords) { + + addCopyCoordsOnRightClick([ + this.lines, + this.circles, + this.polygons, + this.markers, + this.rectangles, + this.imageoverlays, + this.map + ]); + } + if (options.wmsoverlay) { var wmsOptions = { alt: "OpenLayers", @@ -754,6 +763,18 @@ } } + function addCopyCoordsOnRightClick(object) { + if(object instanceof Array){ + for (var x = 0; x < object.length; x++) { + addCopyCoordsOnRightClick(object[x]); + } + }else{ + google.maps.event.addListener(object, 'rightclick', function (event) { + prompt(mediaWiki.msg('maps-copycoords-prompt'), event.latLng.lat() + ',' + event.latLng.lng()); + }); + } + } + //Complete path to OpenLayers WMS layer this.setup(); From 6c9fa7695da8f7fbaaa1747490a4b9c0938dc433 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Fri, 20 Sep 2013 23:43:45 +0200 Subject: [PATCH 003/163] Update dependency checks and magic loading Change-Id: If3720f0e914ff97f0a16c2487065fda42889f076 --- Maps.php | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/Maps.php b/Maps.php index 3a7005be6..1806339af 100644 --- a/Maps.php +++ b/Maps.php @@ -45,18 +45,38 @@ } // Attempt to include the DataValues lib if that has not been loaded yet. -if ( !defined( 'DataValues_VERSION' ) && file_exists( __DIR__ . '/../DataValues/DataValues.php' ) ) { +if ( !defined( 'DATAVALUES_VERSION' ) && is_readable( __DIR__ . '/../DataValues/DataValues.php' ) ) { include_once( __DIR__ . '/../DataValues/DataValues.php' ); } +// Include the DataValuesInterfaces library if that hasn't been done yet. +if ( !defined( 'DATAVALUES_INTERFACES_VERSION' ) ) { + @include_once( __DIR__ . '/../DataValues/DataValuesInterfaces/DataValuesInterfaces.php' ); +} + +// Include the DataValuesCommon library if that hasn't been done yet. +if ( !defined( 'DATAVALUES_COMMON_VERSION' ) ) { + @include_once( __DIR__ . '/../DataValues/DataValuesCommon/DataValuesCommon.php' ); +} + // Only initialize the extension when all dependencies are present. if ( !defined( 'ParamProcessor_VERSION' ) ) { throw new Exception( 'You need to have ParamProcessor (Validator) 1.0 or later installed in order to use Maps' ); } // Only initialize the extension when all dependencies are present. -if ( !defined( 'DataValues_VERSION' ) ) { - throw new Exception( 'You need to have DataValues installed in order to use Maps' ); +if ( !defined( 'DATAVALUES_VERSION' ) ) { + throw new Exception( 'You need to have DataValues loaded in order to use Maps' ); +} + +// Only initialize the extension when all dependencies are present. +if ( !defined( 'DATAVALUES_INTERFACES_VERSION' ) ) { + throw new Exception( 'You need to have DataValuesInterfaces loaded in order to use Maps' ); +} + +// Only initialize the extension when all dependencies are present. +if ( !defined( 'DATAVALUES_COMMON_VERSION' ) ) { + throw new Exception( 'You need to have DataValuesCommon loaded in order to use Maps' ); } if ( version_compare( $GLOBALS['wgVersion'], '1.18c' , '<' ) ) { From 26a0bf7b63fd88a01f03a2552c38374349aedc23 Mon Sep 17 00:00:00 2001 From: Kim Eik Date: Thu, 25 Jul 2013 11:38:54 +0200 Subject: [PATCH 004/163] Added method to toggle kml (geoxml3) layers on and off. Users will now be presented with a set of checkboxes for each kml file loaded on the map. clicking the checkboxes will hide or show the corresponding kml data. Also added feedback to user in the form of an error message when failure occurs in parsing kml files. Change-Id: Iade1c305e70d9aa98c3927f52794a5009056ad88 --- Maps.i18n.php | 2 + includes/services/GoogleMaps3/GoogleMaps3.php | 1 + .../GoogleMaps3/geoxml3/ProjectedOverlay.js | 139 ++++++++++++++++++ .../services/GoogleMaps3/jquery.googlemap.js | 39 ++++- 4 files changed, 180 insertions(+), 1 deletion(-) create mode 100644 includes/services/GoogleMaps3/geoxml3/ProjectedOverlay.js diff --git a/Maps.i18n.php b/Maps.i18n.php index cb4702be3..213229d5e 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -27,6 +27,7 @@ 'maps-copycoords-prompt' => 'CTRL+C, ENTER', 'maps-searchmarkers-text' => 'Filter markers', 'maps-others' => 'others', + 'maps-kml-parsing-failed' => 'Failed parsing one or more kml files, usually due to retrieval failure or malformed XML.', //TODO: move to namespaces i18n 'maps-ns-layer' => 'Layer', 'maps-ns-layer-talk' => 'Layer talk', @@ -259,6 +260,7 @@ 'right-geocode' => '{{doc-right|geocode}}', 'maps_map' => '{{Identical|Map}}', 'maps-copycoords-prompt' => 'text displayed in javascript prompt to indicate first press ctrl+c to copy text, and press enter to close prompt', + 'maps-kml-parsing-failed' => 'text displayed in the event of parsing failure of kml file(s).', 'maps-others' => '{{Identical|Other}}', 'maps-layer-property' => '{{Identical|Property}}', 'maps-layer-value' => '{{Identical|Value}}', diff --git a/includes/services/GoogleMaps3/GoogleMaps3.php b/includes/services/GoogleMaps3/GoogleMaps3.php index cf02f05ac..83b2639ae 100644 --- a/includes/services/GoogleMaps3/GoogleMaps3.php +++ b/includes/services/GoogleMaps3/GoogleMaps3.php @@ -68,6 +68,7 @@ 'scripts' => array( 'geoxml3.js', 'ZipFile.complete.js', //kmz handling + 'ProjectedOverlay.js', //Overlay handling ), ); diff --git a/includes/services/GoogleMaps3/geoxml3/ProjectedOverlay.js b/includes/services/GoogleMaps3/geoxml3/ProjectedOverlay.js new file mode 100644 index 000000000..4056c2c37 --- /dev/null +++ b/includes/services/GoogleMaps3/geoxml3/ProjectedOverlay.js @@ -0,0 +1,139 @@ +// Create an overlay on the map from a projected image - Maps v3... +// Author. John D. Coryat 05/2009 +// USNaviguide LLC - http://www.usnaviguide.com +// Thanks go to Mile Williams EInsert: http://econym.googlepages.com/einsert.js, Google's GOverlay Example and Bratliff's suggestion... +// Opacity code from TPhoto: http://gmaps.tommangan.us/addtphoto.html +// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +// +// Parameters: +// map: This Map +// imageUrl: URL of the image (Mandatory) +// bounds: Bounds object of image destination (Mandatory) +// Options: +// addZoom: Added Zoom factor as a parameter to the imageUrl (include complete parameter, including separater like '?zoom=' +// percentOpacity: Default 50, percent opacity to use when the image is loaded 0-100. +// id: Default imageUrl, ID of the div +// + +function ProjectedOverlay(map, imageUrl, bounds, opts) +{ + google.maps.OverlayView.call(this); + + this.map_ = map; + this.url_ = imageUrl ; + this.bounds_ = bounds ; + this.addZ_ = opts.addZoom || '' ; // Add the zoom to the image as a parameter + this.id_ = opts.id || this.url_ ; // Added to allow for multiple images + this.percentOpacity_ = opts.percentOpacity || 50 ; + + this.setMap(map); +} + +ProjectedOverlay.prototype = new google.maps.OverlayView(); + +ProjectedOverlay.prototype.createElement = function() +{ + var panes = this.getPanes() ; + var div = this.div_ ; + + if (!div) + { + div = this.div_ = document.createElement("div"); + div.style.position = "absolute" ; + div.setAttribute('id',this.id_) ; + this.div_ = div ; + this.lastZoom_ = -1 ; + if( this.percentOpacity_ ) + { + this.setOpacity(this.percentOpacity_) ; + } + panes.overlayLayer.appendChild(div); + } +} + +// Remove the main DIV from the map pane + +ProjectedOverlay.prototype.remove = function() +{ + if (this.div_) + { + this.div_.parentNode.removeChild(this.div_); + this.div_ = null; + this.setMap(null); + } +} + +// Redraw based on the current projection and zoom level... + +ProjectedOverlay.prototype.draw = function(firstTime) +{ + // Creates the element if it doesn't exist already. + + this.createElement(); + + if (!this.div_) + { + return ; + } + + var c1 = this.get('projection').fromLatLngToDivPixel(this.bounds_.getSouthWest()); + var c2 = this.get('projection').fromLatLngToDivPixel(this.bounds_.getNorthEast()); + + if (!c1 || !c2) return; + + // Now position our DIV based on the DIV coordinates of our bounds + + this.div_.style.width = Math.abs(c2.x - c1.x) + "px"; + this.div_.style.height = Math.abs(c2.y - c1.y) + "px"; + this.div_.style.left = Math.min(c2.x, c1.x) + "px"; + this.div_.style.top = Math.min(c2.y, c1.y) + "px"; + + // Do the rest only if the zoom has changed... + + if ( this.lastZoom_ == this.map_.getZoom() ) + { + return ; + } + + this.lastZoom_ = this.map_.getZoom() ; + + var url = this.url_ ; + + if ( this.addZ_ ) + { + url += this.addZ_ + this.map_.getZoom() ; + } + + this.div_.innerHTML = '' ; +} + +ProjectedOverlay.prototype.setOpacity=function(opacity) +{ + if (opacity < 0) + { + opacity = 0 ; + } + if(opacity > 100) + { + opacity = 100 ; + } + var c = opacity/100 ; + + if (typeof(this.div_.style.filter) =='string') + { + this.div_.style.filter = 'alpha(opacity:' + opacity + ')' ; + } + if (typeof(this.div_.style.KHTMLOpacity) == 'string' ) + { + this.div_.style.KHTMLOpacity = c ; + } + if (typeof(this.div_.style.MozOpacity) == 'string') + { + this.div_.style.MozOpacity = c ; + } + if (typeof(this.div_.style.opacity) == 'string') + { + this.div_.style.opacity = c ; + } +} + diff --git a/includes/services/GoogleMaps3/jquery.googlemap.js b/includes/services/GoogleMaps3/jquery.googlemap.js index eda70936a..aca61767d 100644 --- a/includes/services/GoogleMaps3/jquery.googlemap.js +++ b/includes/services/GoogleMaps3/jquery.googlemap.js @@ -197,11 +197,48 @@ } } + var geoXml = new geoXML3.parser({ map:_this.map, zoom:options.kmlrezoom, - afterParse: addToCopyCoords + failedParse:function(){ + alert(mediaWiki.msg('maps-kml-parsing-failed')); + } }); + geoXml.options.afterParse = function(docs){ + //add toggle functionality + var toggleDiv = document.createElement('div'); + toggleDiv.style.backgroundColor = 'white'; + toggleDiv.style.marginTop = '5px'; + toggleDiv.style.padding = '5px'; + toggleDiv.style.border = '1px solid grey'; + for(var i = docs.length-1; i >= 0; i--){ + (function(doc){ + var label = document.createElement('label'); + label.style.display = 'block'; + var text = document.createTextNode(doc.baseUrl.substring(doc.baseDir.length)); + var checkbox = document.createElement('input'); + checkbox.setAttribute('type','checkbox'); + checkbox.style.verticalAlign = '-0.2em'; + checkbox.checked = true; + checkbox.onclick = function(){ + if(this.checked){ + geoXml.showDocument(doc); + }else{ + geoXml.hideDocument(doc); + } + }; + label.appendChild(checkbox); + label.appendChild(text); + + toggleDiv.appendChild(label); + + console.log(toggleDiv); + })(docs[i]); + } + _this.map.controls[google.maps.ControlPosition.TOP_RIGHT].push(toggleDiv); + }; + geoXml.parse(options.kml); }); } From 8b24a91850b004a775e474527bd21f135c013155 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sat, 21 Sep 2013 00:26:22 +0200 Subject: [PATCH 005/163] Fix Leaflet problem with resource loader This is a partial re-submit of https://gerrit.wikimedia.org/r/#/c/49202/ Change by Pastakhov Change-Id: I08c3ddad4ca65faad9d610fcf75d38f15a511fb3 --- includes/services/Leaflet/Leaflet.php | 5 ----- includes/services/Leaflet/Maps_Leaflet.php | 10 ++++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/includes/services/Leaflet/Leaflet.php b/includes/services/Leaflet/Leaflet.php index 24f803bf3..4c53c9908 100644 --- a/includes/services/Leaflet/Leaflet.php +++ b/includes/services/Leaflet/Leaflet.php @@ -34,14 +34,9 @@ 'remoteBasePath' => $egMapsScriptPath . '/includes/services/Leaflet', 'group' => 'ext.maps', 'scripts' => array( - 'leaflet/leaflet.js', 'jquery.leaflet.js', 'ext.maps.leaflet.js', ), - 'styles' => array( - 'leaflet/leaflet.css', - 'leaflet/leaflet.ie.css', - ), 'messages' => array( 'maps-markers', 'maps-copycoords-prompt', diff --git a/includes/services/Leaflet/Maps_Leaflet.php b/includes/services/Leaflet/Maps_Leaflet.php index 2b37469e7..58bb2d08b 100644 --- a/includes/services/Leaflet/Maps_Leaflet.php +++ b/includes/services/Leaflet/Maps_Leaflet.php @@ -86,4 +86,14 @@ public function getResourceModules() { array( 'ext.maps.leaflet' ) ); } + + protected function getDependencies() { + $leafletPath = $GLOBALS['egMapsScriptPath'] . '/includes/services/Leaflet/leaflet'; + return array( + Html::linkedStyle( "$leafletPath/leaflet.css" ), + '', + Html::linkedScript( "$leafletPath/leaflet.js" ), + ); + } + } From 83b87af1cc5ef7e1c333deeb7aa78c36401a3f81 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Wed, 21 Aug 2013 20:36:08 +0200 Subject: [PATCH 006/163] Work on Element classes and their tests Change-Id: I4c826f360b1fa09ac5fe9c5d0bbdbdfd3ea400bf --- Maps.classes.php | 16 +++---------- Maps.php | 22 +++++++++++++++++ .../{elements => Elements}/BaseElement.php | 5 +++- includes/{elements => Elements}/Circle.php | 5 +--- .../{elements => Elements}/ImageOverlay.php | 4 +--- includes/{elements => Elements}/Line.php | 8 +++---- includes/{elements => Elements}/Location.php | 11 ++++----- includes/{elements => Elements}/Polygon.php | 4 +--- includes/{elements => Elements}/Rectangle.php | 5 +--- .../{elements => Elements}/WmsOverlay.php | 9 ++----- includes/Maps_BaseStrokableElement.php | 6 ++--- includes/Maps_DisplayMapRenderer.php | 6 +++-- includes/Maps_KMLFormatter.php | 7 ++---- includes/Maps_MappingServices.php | 3 --- includes/parsers/DistanceParser.php | 4 ---- includes/parsers/LineParser.php | 5 +--- includes/parsers/LocationParser.php | 4 +--- includes/parsers/PolygonParser.php | 5 +--- includes/parsers/WmsOverlayParser.php | 4 +--- tests/phpunit/ElementTest.php | 24 ++++++++++++------- tests/phpunit/elements/BaseElementTest.php | 2 +- tests/phpunit/elements/CircleTest.php | 11 +++++---- tests/phpunit/elements/ImageOverlayTest.php | 10 ++++---- tests/phpunit/elements/LineTest.php | 10 ++++---- tests/phpunit/elements/LocationTest.php | 8 +++---- tests/phpunit/elements/PolygonTest.php | 10 ++++---- tests/phpunit/elements/RectangleTest.php | 12 +++++----- tests/phpunit/parserhooks/DisplayMapTest.php | 4 +++- .../parserhooks/FinddestinationTest.php | 4 +++- tests/phpunit/parserhooks/GeocodeTest.php | 4 +++- tests/phpunit/parserhooks/GeodistanceTest.php | 11 +++++---- tests/phpunit/parsers/LineParserTest.php | 6 ++--- tests/phpunit/parsers/LocationParserTest.php | 6 ++--- .../phpunit/parsers/WmsOverlayParserTest.php | 6 ++--- 34 files changed, 126 insertions(+), 135 deletions(-) rename includes/{elements => Elements}/BaseElement.php (97%) rename includes/{elements => Elements}/Circle.php (95%) rename includes/{elements => Elements}/ImageOverlay.php (92%) rename includes/{elements => Elements}/Line.php (88%) rename includes/{elements => Elements}/Location.php (95%) rename includes/{elements => Elements}/Polygon.php (93%) rename includes/{elements => Elements}/Rectangle.php (96%) rename includes/{elements => Elements}/WmsOverlay.php (94%) diff --git a/Maps.classes.php b/Maps.classes.php index da6aad2db..248e640d2 100644 --- a/Maps.classes.php +++ b/Maps.classes.php @@ -23,16 +23,6 @@ $classes['MapEditorHtml'] = __DIR__ . '/includes/editor/MapEditorHTML.php'; -$classes['Maps\BaseElement'] = __DIR__ . '/includes/elements/BaseElement.php'; -$classes['Maps\Circle'] = __DIR__ . '/includes/elements/Circle.php'; -$classes['Maps\ImageOverlay'] = __DIR__ . '/includes/elements/ImageOverlay.php'; -$classes['Maps\Line'] = __DIR__ . '/includes/elements/Line.php'; -$classes['Maps\Location'] = __DIR__ . '/includes/elements/Location.php'; -$classes['Maps\Polygon'] = __DIR__ . '/includes/elements/Polygon.php'; -$classes['Maps\Rectangle'] = __DIR__ . '/includes/elements/Rectangle.php'; -$classes['Maps\WmsOverlay'] = __DIR__ . '/includes/elements/WmsOverlay.php'; - - $classes['Maps\Api\Geocode'] = __DIR__ . '/includes/api/ApiGeocode.php'; $classes['Maps\ServiceParam'] = __DIR__ . '/includes/ServiceParam.php'; @@ -62,9 +52,9 @@ $classes['SpecialMapEditor'] = __DIR__ . '/includes/specials/SpecialMapEditor.php'; -$classes['Maps\Test\BaseElementTest'] = __DIR__ . '/tests/phpunit/elements/BaseElementTest.php'; -$classes['Maps\Test\LineTest'] = __DIR__ . '/tests/phpunit/elements/LineTest.php'; -$classes['Maps\Test\RectangleTest'] = __DIR__ . '/tests/phpunit/elements/RectangleTest.php'; +$classes['Maps\Tests\Elements\BaseElementTest'] = __DIR__ . '/tests/phpunit/elements/BaseElementTest.php'; +$classes['Maps\Tests\Elements\LineTest'] = __DIR__ . '/tests/phpunit/elements/LineTest.php'; +$classes['Maps\Tests\Elements\RectangleTest'] = __DIR__ . '/tests/phpunit/elements/RectangleTest.php'; $classes['Maps\Test\ParserHookTest'] = __DIR__ . '/tests/phpunit/parserhooks/ParserHookTest.php'; diff --git a/Maps.php b/Maps.php index 3a7005be6..8cf685381 100644 --- a/Maps.php +++ b/Maps.php @@ -63,6 +63,28 @@ throw new Exception( 'This version of Maps requires MediaWiki 1.18 or above; use Maps 1.0.x for MediaWiki 1.17 and Maps 0.7.x for older versions.' ); } +spl_autoload_register( function ( $className ) { + $className = ltrim( $className, '\\' ); + $fileName = ''; + $namespace = ''; + + if ( $lastNsPos = strripos( $className, '\\') ) { + $namespace = substr( $className, 0, $lastNsPos ); + $className = substr( $className, $lastNsPos + 1 ); + $fileName = str_replace( '\\', '/', $namespace ) . '/'; + } + + $fileName .= str_replace( '_', '/', $className ) . '.php'; + + $namespaceSegments = explode( '\\', $namespace ); + + if ( $namespaceSegments[0] === 'Maps' ) { + if ( count( $namespaceSegments ) > 1 && $namespaceSegments[1] === 'Elements' ) { + require_once __DIR__ . '/includes/' . substr( $fileName, 5 ); + } + } +} ); + call_user_func( function() { global $wgExtensionCredits, $wgExtensionAssetsPath, $wgScriptPath, $wgAutoloadClasses; global $wgResourceModules, $wgGroupPermissions, $egMapsNamespaceIndex, $wgStyleVersion; diff --git a/includes/elements/BaseElement.php b/includes/Elements/BaseElement.php similarity index 97% rename from includes/elements/BaseElement.php rename to includes/Elements/BaseElement.php index 4c50f6ca2..776165115 100644 --- a/includes/elements/BaseElement.php +++ b/includes/Elements/BaseElement.php @@ -1,6 +1,9 @@ * @author Daniel Werner */ -class Location extends \Maps\BaseElement { +class Location extends BaseElement { /** * @since 3.0 @@ -61,7 +60,7 @@ class Location extends \Maps\BaseElement { protected $visitedIcon = ''; /** - * Creates and returns a new instance of a \Maps\Location from a latitude and longitude. + * Creates and returns a new instance of a Location from a latitude and longitude. * * @since 1.0 * @@ -75,7 +74,7 @@ public static function newFromLatLon( $lat, $lon ) { } /** - * Creates and returns a new instance of a \Maps\Location from an address. + * Creates and returns a new instance of a Location from an address. * * @since 1.0 * diff --git a/includes/elements/Polygon.php b/includes/Elements/Polygon.php similarity index 93% rename from includes/elements/Polygon.php rename to includes/Elements/Polygon.php index 64c99e480..2f28b55d5 100644 --- a/includes/elements/Polygon.php +++ b/includes/Elements/Polygon.php @@ -1,12 +1,10 @@ */ -class WmsOverlay extends \Maps\BaseElement { +class WmsOverlay extends BaseElement { /** * @since 3.0 diff --git a/includes/Maps_BaseStrokableElement.php b/includes/Maps_BaseStrokableElement.php index 14191d42f..48242aeaf 100644 --- a/includes/Maps_BaseStrokableElement.php +++ b/includes/Maps_BaseStrokableElement.php @@ -1,8 +1,8 @@ */ -class MapsBaseStrokableElement extends \Maps\BaseElement implements iStrokableMapElement { +class MapsBaseStrokableElement extends BaseElement implements iStrokableMapElement { protected $strokeColor; protected $strokeOpacity; diff --git a/includes/Maps_DisplayMapRenderer.php b/includes/Maps_DisplayMapRenderer.php index 19db68151..96e1d5890 100644 --- a/includes/Maps_DisplayMapRenderer.php +++ b/includes/Maps_DisplayMapRenderer.php @@ -1,4 +1,6 @@ getJSONObject(); @@ -126,7 +128,7 @@ protected function handleMarkerData( array &$params, Parser $parser ) { $params['locations'] = array(); /** - * @var \Maps\Location $location + * @var Location $location */ foreach ( $params['coordinates'] as $location ) { $jsonObj = $location->getJSONObject( $params['title'], $params['label'], $iconUrl, '', '',$visitedIconUrl); diff --git a/includes/Maps_KMLFormatter.php b/includes/Maps_KMLFormatter.php index 65c80de7f..025e77565 100644 --- a/includes/Maps_KMLFormatter.php +++ b/includes/Maps_KMLFormatter.php @@ -1,18 +1,15 @@ */ -use Maps\Location; - class MapsKMLFormatter { /** diff --git a/includes/Maps_MappingServices.php b/includes/Maps_MappingServices.php index 2ab7784f0..3d35d65ec 100644 --- a/includes/Maps_MappingServices.php +++ b/includes/Maps_MappingServices.php @@ -4,9 +4,6 @@ * Class for interaction with MappingService objects. * * @since 0.6.6 - * - * @file - * @ingroup Maps * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > diff --git a/includes/parsers/DistanceParser.php b/includes/parsers/DistanceParser.php index c131383b1..e2f5fc33a 100644 --- a/includes/parsers/DistanceParser.php +++ b/includes/parsers/DistanceParser.php @@ -10,10 +10,6 @@ * * @since 3.0 * - * @file - * @ingroup Maps - * @ingroup ValueParser - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/parsers/LineParser.php b/includes/parsers/LineParser.php index 07f114df8..0d5c2057e 100644 --- a/includes/parsers/LineParser.php +++ b/includes/parsers/LineParser.php @@ -3,6 +3,7 @@ namespace Maps; use DataValues\LatLongValue; +use Maps\Elements\Line; use ValueParsers\StringValueParser; /** @@ -10,10 +11,6 @@ * * @since 3.0 * - * @file - * @ingroup Maps - * @ingroup ValueParser - * * @licence GNU GPL v2+ * @author Kim Eik * @author Jeroen De Dauw < jeroendedauw@gmail.com > diff --git a/includes/parsers/LocationParser.php b/includes/parsers/LocationParser.php index 00a811748..fa02d213c 100644 --- a/includes/parsers/LocationParser.php +++ b/includes/parsers/LocationParser.php @@ -3,6 +3,7 @@ namespace Maps; use DataValues\LatLongValue; +use Maps\Elements\Location; use MWException; use ValueParsers\GeoCoordinateParser; use ValueParsers\ParseException; @@ -13,9 +14,6 @@ * * @since 3.0 * - * @file - * @ingroup ValueParsers - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/parsers/PolygonParser.php b/includes/parsers/PolygonParser.php index 0a017df1c..a3c9cfa1b 100644 --- a/includes/parsers/PolygonParser.php +++ b/includes/parsers/PolygonParser.php @@ -2,6 +2,7 @@ namespace Maps; +use Maps\Elements\Polygon; use ValueParsers\StringValueParser; /** @@ -9,10 +10,6 @@ * * @since 3.0 * - * @file - * @ingroup Maps - * @ingroup ValueParser - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/parsers/WmsOverlayParser.php b/includes/parsers/WmsOverlayParser.php index fb4b8df4b..b9b060d2e 100644 --- a/includes/parsers/WmsOverlayParser.php +++ b/includes/parsers/WmsOverlayParser.php @@ -2,6 +2,7 @@ namespace Maps; +use Maps\Elements\WmsOverlay; use MWException; use ValueParsers\GeoCoordinateParser; use ValueParsers\ParseException; @@ -12,9 +13,6 @@ * * @since 3.0 * - * @file - * @ingroup ValueParsers - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/tests/phpunit/ElementTest.php b/tests/phpunit/ElementTest.php index 401336f9c..b25d3ef7b 100644 --- a/tests/phpunit/ElementTest.php +++ b/tests/phpunit/ElementTest.php @@ -1,7 +1,14 @@ */ -use DataValues\LatLongValue; -use Maps\Element; -class ElementTest extends \MediaWikiTestCase { +class ElementTest extends \PHPUnit_Framework_TestCase { public function elementProvider() { $elements = array(); - $elements[] = new \Maps\Rectangle( new LatLongValue( 4, 2 ), new LatLongValue( 5, 6 ) ); - $elements[] = new \Maps\ImageOverlay( new LatLongValue( 4, 2 ), new LatLongValue( 5, 6 ), 'foo' ); - $elements[] = new \Maps\Circle( new LatLongValue( 4, 2 ), 42 ); - $elements[] = new \Maps\Line( array( new LatLongValue( 4, 2 ), new LatLongValue( 5, 6 ) ) ); + $elements[] = array( new Rectangle( new LatLongValue( 4, 2 ), new LatLongValue( 5, 6 ) ) ); + $elements[] = array( new ImageOverlay( new LatLongValue( 4, 2 ), new LatLongValue( 5, 6 ), 'foo' ) ); + $elements[] = array( new Circle( new LatLongValue( 4, 2 ), 42 ) ); + $elements[] = array( new Line( array( new LatLongValue( 4, 2 ), new LatLongValue( 5, 6 ) ) ) ); + //$elements[] = new \Maps\Polygon( array( new LatLongValue( 4, 2 ), new LatLongValue( 5, 6 ) ) ); // TODO: location - return $this->arrayWrap( $elements ); + return $elements; } /** diff --git a/tests/phpunit/elements/BaseElementTest.php b/tests/phpunit/elements/BaseElementTest.php index af2525ede..89da74d7e 100644 --- a/tests/phpunit/elements/BaseElementTest.php +++ b/tests/phpunit/elements/BaseElementTest.php @@ -1,6 +1,6 @@ assertTrue( $circle->getCircleCentre()->equals( $arguments[0] ) ); } diff --git a/tests/phpunit/elements/ImageOverlayTest.php b/tests/phpunit/elements/ImageOverlayTest.php index c466c1b53..8f38eeace 100644 --- a/tests/phpunit/elements/ImageOverlayTest.php +++ b/tests/phpunit/elements/ImageOverlayTest.php @@ -1,11 +1,11 @@ array( new \Maps\Location( new \DataValues\LatLongValue( 4, 2 ) ) ), + 'coordinates' => array( new Location( new \DataValues\LatLongValue( 4, 2 ) ) ), 'width' => '420px', 'height' => '420px', 'mappingservice' => 'openlayers', diff --git a/tests/phpunit/parserhooks/FinddestinationTest.php b/tests/phpunit/parserhooks/FinddestinationTest.php index 56963b2ce..49d76134d 100644 --- a/tests/phpunit/parserhooks/FinddestinationTest.php +++ b/tests/phpunit/parserhooks/FinddestinationTest.php @@ -2,6 +2,8 @@ namespace Maps\Test; +use Maps\Elements\Location; + /** * Tests for the Maps\Finddestination class. * @@ -101,7 +103,7 @@ public function processingProvider() { $expected = array( 'distance' => $expectedDistance, 'bearing' => (float)$bearing, - 'location' => new \Maps\Location( $coordinateParser->parse( $location )->getValue() ), + 'location' => new Location( $coordinateParser->parse( $location )->getValue() ), ); $argLists[] = array( $values, $expected ); diff --git a/tests/phpunit/parserhooks/GeocodeTest.php b/tests/phpunit/parserhooks/GeocodeTest.php index 384fa879e..f720a422e 100644 --- a/tests/phpunit/parserhooks/GeocodeTest.php +++ b/tests/phpunit/parserhooks/GeocodeTest.php @@ -2,6 +2,8 @@ namespace Maps\Test; +use Maps\Elements\Location; + /** * Tests for the Maps\Geocode class. * @@ -55,7 +57,7 @@ public function processingProvider() { ); $expected = array( - 'location' => new \Maps\Location( new \DataValues\LatLongValue( 4, 2 ) ), + 'location' => new Location( new \DataValues\LatLongValue( 4, 2 ) ), 'allowcoordinates' => true, ); diff --git a/tests/phpunit/parserhooks/GeodistanceTest.php b/tests/phpunit/parserhooks/GeodistanceTest.php index 29c125f9f..3cf612f4e 100644 --- a/tests/phpunit/parserhooks/GeodistanceTest.php +++ b/tests/phpunit/parserhooks/GeodistanceTest.php @@ -2,6 +2,9 @@ namespace Maps\Test; +use DataValues\LatLongValue; +use Maps\Elements\Location; + /** * Tests for the Maps\Geodistance class. * @@ -64,8 +67,8 @@ public function processingProvider() { ); $expected = array( - 'location1' => new \Maps\Location( new \DataValues\LatLongValue( 4, 2 ) ), - 'location2' => new \Maps\Location( new \DataValues\LatLongValue( 42, 0 ) ), + 'location1' => new Location( new LatLongValue( 4, 2 ) ), + 'location2' => new Location( new LatLongValue( 42, 0 ) ), ); $argLists[] = array( $values, $expected ); @@ -78,8 +81,8 @@ public function processingProvider() { ); $expected = array( - 'location1' => new \Maps\Location( new \DataValues\LatLongValue( 4, 2 ) ), - 'location2' => new \Maps\Location( new \DataValues\LatLongValue( 42, 0 ) ), + 'location1' => new Location( new LatLongValue( 4, 2 ) ), + 'location2' => new Location( new LatLongValue( 42, 0 ) ), 'decimals' => 1, ); diff --git a/tests/phpunit/parsers/LineParserTest.php b/tests/phpunit/parsers/LineParserTest.php index a58858071..0cdcbfa7f 100644 --- a/tests/phpunit/parsers/LineParserTest.php +++ b/tests/phpunit/parsers/LineParserTest.php @@ -3,15 +3,13 @@ namespace Maps\Test; use DataValues\LatLongValue; -use Maps\Line; +use Maps\Elements\Line; /** - * Unit tests for the Maps\LineParser class. + * @covers Maps\LineParser * * @since 3.0 * - * @ingroup MapsTest - * * @group ValueParsers * @group Maps * @group LineParserTest diff --git a/tests/phpunit/parsers/LocationParserTest.php b/tests/phpunit/parsers/LocationParserTest.php index 77b112982..c16cdc3c6 100644 --- a/tests/phpunit/parsers/LocationParserTest.php +++ b/tests/phpunit/parsers/LocationParserTest.php @@ -3,15 +3,13 @@ namespace Maps\Test; use DataValues\LatLongValue; -use Maps\Location; +use Maps\Elements\Location; /** - * Unit tests for the Maps\LocationParser class. + * @covers Maps\LocationParser * * @since 3.0 * - * @ingroup MapsTest - * * @group ValueParsers * @group Maps * @group LocationParserTest diff --git a/tests/phpunit/parsers/WmsOverlayParserTest.php b/tests/phpunit/parsers/WmsOverlayParserTest.php index 16707ca63..980beb778 100644 --- a/tests/phpunit/parsers/WmsOverlayParserTest.php +++ b/tests/phpunit/parsers/WmsOverlayParserTest.php @@ -2,15 +2,13 @@ namespace Maps\Test; -use Maps\WmsOverlay; +use Maps\Elements\WmsOverlay; /** - * Unit tests for the Maps\WmsOverlayParser class. + * @covers Maps\WmsOverlayParser * * @since 3.0 * - * @ingroup MapsTest - * * @group ValueParsers * @group Maps * @group WmsOverlayParserTest From 02923c44e3e1a7139be4496718cb7ede579701ac Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sat, 21 Sep 2013 02:09:52 +0200 Subject: [PATCH 007/163] Use https links Change-Id: I6ceec9fad15b6fa494f178b7cb2cd492e4ad77a6 --- Maps.i18n.php | 60 +++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index 213229d5e..fa395aaa7 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -16,7 +16,7 @@ */ $messages['en'] = array( // General - 'maps-desc' => "Enables embedding of dynamic maps into wiki pages, geocoding of addresses and other geographical operations. ([http://www.semantic-mediawiki.org/wiki/Maps more info...])", + 'maps-desc' => "Enables embedding of dynamic maps into wiki pages, geocoding of addresses and other geographical operations. ([https://www.semantic-mediawiki.org/wiki/Maps more info...])", 'right-geocode' => 'Geocode', @@ -528,7 +528,7 @@ * @author Xuacu */ $messages['ast'] = array( - 'maps-desc' => 'Activa inxertar mapes dinámicos nes páxines wiki, xeocodificación de direiciones y otres operaciones xeográfiques. ([http://www.semantic-mediawiki.org/wiki/Maps más información...])', + 'maps-desc' => 'Activa inxertar mapes dinámicos nes páxines wiki, xeocodificación de direiciones y otres operaciones xeográfiques. ([https://www.semantic-mediawiki.org/wiki/Maps más información...])', 'right-geocode' => 'Xeocódigu', 'maps_map' => 'Mapa', 'maps-loading-map' => "Cargando'l mapa...", @@ -1462,7 +1462,7 @@ * @author Michawiki */ $messages['dsb'] = array( - 'maps-desc' => 'Zmóžnijo zasajźowanje dynamiskich kórtow do wikibokow, geokoděrowanje adresow a druge geografiske akcije. ([http://www.semantic-mediawiki.org/wiki/Maps dalšne informacije...])', + 'maps-desc' => 'Zmóžnijo zasajźowanje dynamiskich kórtow do wikibokow, geokoděrowanje adresow a druge geografiske akcije. ([https://www.semantic-mediawiki.org/wiki/Maps dalšne informacije...])', 'maps_map' => 'Karta', 'maps-loading-map' => 'Kórta se zacytujo...', 'maps-markers' => 'Marki', @@ -1521,7 +1521,7 @@ * @author ZaDiak */ $messages['el'] = array( - 'maps-desc' => 'Επιτρέπει την ενσωμάτωση δυναμικών χαρτών σε σελίδες wiki, γεωκωδικοποίηση διευθύνσεων και άλλες γεωγραφικές λειτουργίες. ([http://www.semantic-mediawiki.org/wiki/Maps περισσότερες πληροφορίες...])', + 'maps-desc' => 'Επιτρέπει την ενσωμάτωση δυναμικών χαρτών σε σελίδες wiki, γεωκωδικοποίηση διευθύνσεων και άλλες γεωγραφικές λειτουργίες. ([https://www.semantic-mediawiki.org/wiki/Maps περισσότερες πληροφορίες...])', 'right-geocode' => 'Γεωκωδικοποίηση', 'maps_map' => 'Χάρτης', 'maps-loading-map' => 'Φόρτωση χάρτη...', @@ -1681,7 +1681,7 @@ * @author Vivaelcelta */ $messages['es'] = array( - 'maps-desc' => 'Habilita la inserción de mapas dinámicos en páginas wikis, la geocodificación de direcciones y otras operaciones geográficas. ([http://www.semantic-mediawiki.org/wiki/Maps Más información...])', + 'maps-desc' => 'Habilita la inserción de mapas dinámicos en páginas wikis, la geocodificación de direcciones y otras operaciones geográficas. ([https://www.semantic-mediawiki.org/wiki/Maps Más información...])', 'right-geocode' => 'Geocodificar', 'maps_map' => 'Mapa', 'maps-loading-map' => 'Cargando mapa...', @@ -1978,7 +1978,7 @@ * @author ZeiP */ $messages['fi'] = array( - 'maps-desc' => 'Mahdollistaa dynaamisten karttojen upottamisen wikisivuille, osoitteiden geokoodauksen ja muita karttoihin liittyviä toimintoja ([http://www.semantic-mediawiki.org/wiki/Maps lisätietoja]).', + 'maps-desc' => 'Mahdollistaa dynaamisten karttojen upottamisen wikisivuille, osoitteiden geokoodauksen ja muita karttoihin liittyviä toimintoja ([https://www.semantic-mediawiki.org/wiki/Maps lisätietoja]).', 'right-geocode' => 'Geokoodata', 'maps_map' => 'Kartta', 'maps-loading-map' => 'Ladataan karttaa...', @@ -2137,7 +2137,7 @@ * @author Wyz */ $messages['fr'] = array( - 'maps-desc' => "Permet d’afficher des cartes dynamiques dans les pages du wiki, des adresses géocodées et d'autres opérations géographiques. ([http://www.semantic-mediawiki.org/wiki/Maps more info...])", + 'maps-desc' => "Permet d’afficher des cartes dynamiques dans les pages du wiki, des adresses géocodées et d'autres opérations géographiques. ([https://www.semantic-mediawiki.org/wiki/Maps more info...])", 'right-geocode' => 'Géocode', 'maps_map' => 'Carte', 'maps-loading-map' => 'Chargement de la carte...', @@ -2421,7 +2421,7 @@ * @author Toliño */ $messages['gl'] = array( - 'maps-desc' => 'Permite incorporar mapas dinámicos, enderezos xeocodificados e outras operacións xeográficas ([http://www.semantic-mediawiki.org/wiki/Maps máis información...])', + 'maps-desc' => 'Permite incorporar mapas dinámicos, enderezos xeocodificados e outras operacións xeográficas ([https://www.semantic-mediawiki.org/wiki/Maps máis información...])', 'right-geocode' => 'Xeocodificar', 'maps_map' => 'Mapa', 'maps-loading-map' => 'Cargando o mapa...', @@ -2876,7 +2876,7 @@ * @author Michawiki */ $messages['hsb'] = array( - 'maps-desc' => 'Zmóžnja zasadźenje dynamiskich kartow do wikistronow, geokodowanje adresow a druhe geografiske podawki ([http://www.semantic-mediawiki.org/wiki/Maps dalše informacije...])', + 'maps-desc' => 'Zmóžnja zasadźenje dynamiskich kartow do wikistronow, geokodowanje adresow a druhe geografiske podawki ([https://www.semantic-mediawiki.org/wiki/Maps dalše informacije...])', 'right-geocode' => 'Geokodowanje', 'maps_map' => 'Karta', 'maps-loading-map' => 'Karta so začituje...', @@ -3107,7 +3107,7 @@ * @author McDutchie */ $messages['ia'] = array( - 'maps-desc' => 'Permitte le incorporation de cartas dynamic in paginas wiki, le geocodification de adresses e altere operationes geographic. ([http://www.semantic-mediawiki.org/wiki/Maps plus info...])', + 'maps-desc' => 'Permitte le incorporation de cartas dynamic in paginas wiki, le geocodification de adresses e altere operationes geographic. ([https://www.semantic-mediawiki.org/wiki/Maps plus info...])', 'right-geocode' => 'Geocodificar', 'maps_map' => 'Carta', 'maps-loading-map' => 'Cargamento del carta…', @@ -3446,7 +3446,7 @@ * @author Viscontino */ $messages['it'] = array( - 'maps-desc' => 'Fornisce la possibilità di includere mappe dinamiche nelle pagine wiki, la geocodifica di indirizzi ed altre operazioni geografiche. ([http://www.semantic-mediawiki.org/wiki/Maps maggiori informazioni...])', + 'maps-desc' => 'Fornisce la possibilità di includere mappe dinamiche nelle pagine wiki, la geocodifica di indirizzi ed altre operazioni geografiche. ([https://www.semantic-mediawiki.org/wiki/Maps maggiori informazioni...])', 'right-geocode' => 'Effettua la geocodifica', 'maps_map' => 'Mappa', 'maps-loading-map' => 'Caricamento mappa ...', @@ -3563,7 +3563,7 @@ * @author 青子守歌 */ $messages['ja'] = array( - 'maps-desc' => 'ウィキページへの動的な地図の埋め込み、住所の座標データへの変換、その他の地図関連の操作ができるようにする ([http://www.semantic-mediawiki.org/wiki/Maps 詳細情報...])', + 'maps-desc' => 'ウィキページへの動的な地図の埋め込み、住所の座標データへの変換、その他の地図関連の操作ができるようにする ([https://www.semantic-mediawiki.org/wiki/Maps 詳細情報...])', 'right-geocode' => 'ジオコーディング', 'maps_map' => '地図', 'maps-loading-map' => '地図を読み込み中...', @@ -3774,7 +3774,7 @@ * @author 아라 */ $messages['ko'] = array( - 'maps-desc' => '위키 문서에 동적 지도를 포함하고, 주소의 좌표화와 다른 지리적 작업을 할 수 있습니다. ([http://www.semantic-mediawiki.org/wiki/Maps 자세한 정보...])', + 'maps-desc' => '위키 문서에 동적 지도를 포함하고, 주소의 좌표화와 다른 지리적 작업을 할 수 있습니다. ([https://www.semantic-mediawiki.org/wiki/Maps 자세한 정보...])', 'right-geocode' => '좌표화', 'maps_map' => '지도', 'maps-loading-map' => '지도를 불러오는 중...', @@ -4026,7 +4026,7 @@ * @author Robby */ $messages['lb'] = array( - 'maps-desc' => "Gëtt d'Méiglechkeet fir d'Date vun de Koordinaten op Kaarten a Geocode Adressen an aner geografesch Operatiounen ze weisen. ([http://www.semantic-mediawiki.org/wiki/Maps fir méi Informatiounen...])", + 'maps-desc' => "Gëtt d'Méiglechkeet fir d'Date vun de Koordinaten op Kaarten a Geocode Adressen an aner geografesch Operatiounen ze weisen. ([https://www.semantic-mediawiki.org/wiki/Maps fir méi Informatiounen...])", 'right-geocode' => 'Geocode', 'maps_map' => 'Kaart', 'maps-loading-map' => "D'Kaart gëtt gelueden…", @@ -4170,7 +4170,7 @@ * @author McDutchie */ $messages['mk'] = array( - 'maps-desc' => 'Дава можност за вметнување на динамички карти во викистраници, геокодирање на адреси и други географски операции. ([http://www.semantic-mediawiki.org/wiki/Maps?uselang=mk повеќе информации...])', + 'maps-desc' => 'Дава можност за вметнување на динамички карти во викистраници, геокодирање на адреси и други географски операции. ([https://www.semantic-mediawiki.org/wiki/Maps?uselang=mk повеќе информации...])', 'right-geocode' => 'Геокод', 'maps_map' => 'Карта', 'maps-loading-map' => 'Ја вчитувам картата...', @@ -4376,7 +4376,7 @@ * @author Anakmalaysia */ $messages['ms'] = array( - 'maps-desc' => 'Membolehkan pembenaman petak dinamik pada laman wiki, pembuatan geokod alamat dan bermacam-macam lagi operasi geografi. ([http://www.semantic-mediawiki.org/wiki/Maps maklumat lanjut...])', + 'maps-desc' => 'Membolehkan pembenaman petak dinamik pada laman wiki, pembuatan geokod alamat dan bermacam-macam lagi operasi geografi. ([https://www.semantic-mediawiki.org/wiki/Maps maklumat lanjut...])', 'right-geocode' => 'Geokod', 'maps_map' => 'Peta', 'maps-loading-map' => 'Peta sedang dimuatkan...', @@ -4772,7 +4772,7 @@ * @author Siebrand */ $messages['nl'] = array( - 'maps-desc' => 'Biedt de mogelijkheid om locatiegegevens weer te geven op kaarten en adressen om te zetten naar coördinaten ([http://www.semantic-mediawiki.org/wiki/Maps meer...])', + 'maps-desc' => 'Biedt de mogelijkheid om locatiegegevens weer te geven op kaarten en adressen om te zetten naar coördinaten ([https://www.semantic-mediawiki.org/wiki/Maps meer...])', 'right-geocode' => 'Geocoderen', 'maps_map' => 'Kaart', 'maps-loading-map' => 'Bezig met het laden van de kaart...', @@ -4987,7 +4987,7 @@ * @author Cedric31 */ $messages['oc'] = array( - 'maps-desc' => "Permet d'afichar de mapas dinamicas dins las paginas del wiki, d'adreças geoencodadas e d'autras operacions geograficas. ([http://www.semantic-mediawiki.org/wiki/Maps mai d'info...])", + 'maps-desc' => "Permet d'afichar de mapas dinamicas dins las paginas del wiki, d'adreças geoencodadas e d'autras operacions geograficas. ([https://www.semantic-mediawiki.org/wiki/Maps mai d'info...])", 'right-geocode' => 'Geocòde', 'maps_map' => 'Mapa', 'maps-loading-map' => 'Cargament de la mapa...', @@ -5174,7 +5174,7 @@ * @author Yarl */ $messages['pl'] = array( - 'maps-desc' => 'Umożliwia zamieszczanie na stronach wiki dynamicznych map, geograficznie kodowanych adresów i innych danych geograficznych. ([http://www.semantic-mediawiki.org/wiki/Maps more info...])', + 'maps-desc' => 'Umożliwia zamieszczanie na stronach wiki dynamicznych map, geograficznie kodowanych adresów i innych danych geograficznych. ([https://www.semantic-mediawiki.org/wiki/Maps more info...])', 'right-geocode' => 'Geokodowanie', 'maps_map' => 'Mapa', 'maps-loading-map' => 'Wczytywanie mapy…', @@ -5274,7 +5274,7 @@ * @author පසිඳු කාවින්ද */ $messages['pms'] = array( - 'maps-desc' => "A abìlita l'anseriment ëd carte dinàmiche ant le pàgine ëd la wiki, dj'adrësse geocodificà e d'àutre operassion geogràfiche ([http://www.semantic-mediawiki.org/wiki/Maps për savèjne ëd pi...])", + 'maps-desc' => "A abìlita l'anseriment ëd carte dinàmiche ant le pàgine ëd la wiki, dj'adrësse geocodificà e d'àutre operassion geogràfiche ([https://www.semantic-mediawiki.org/wiki/Maps për savèjne ëd pi...])", 'right-geocode' => 'Geocodìfica', 'maps_map' => 'Pian', 'maps-loading-map' => 'Cariament ëd la carta...', @@ -5620,7 +5620,7 @@ * @author 555 */ $messages['pt-br'] = array( - 'maps-desc' => 'Permite a incorporação de mapas dinâmicos em páginas wiki, geocodificação de endereços e outras operações geográficas. ([http://www.semantic-mediawiki.org/wiki/Maps mais informações...])', + 'maps-desc' => 'Permite a incorporação de mapas dinâmicos em páginas wiki, geocodificação de endereços e outras operações geográficas. ([https://www.semantic-mediawiki.org/wiki/Maps mais informações...])', 'maps_map' => 'Mapa', 'maps-loading-map' => 'Carregando mapa...', 'maps-markers' => 'Marcadores', @@ -5697,7 +5697,7 @@ * @author Stelistcristi */ $messages['ro'] = array( - 'maps-desc' => 'Permite încorporarea hărților dinamice în paginile wiki, precum și geocodificarea adreselor ori efectuarea altor operațiuni de ordin geografic. ([http://www.semantic-mediawiki.org/wiki/Maps mai multe informații...])', + 'maps-desc' => 'Permite încorporarea hărților dinamice în paginile wiki, precum și geocodificarea adreselor ori efectuarea altor operațiuni de ordin geografic. ([https://www.semantic-mediawiki.org/wiki/Maps mai multe informații...])', 'right-geocode' => 'Geocod', 'maps_map' => 'Hartă', 'maps-loading-map' => 'Se încarcă harta...', @@ -5792,7 +5792,7 @@ * @author Joetaras */ $messages['roa-tara'] = array( - 'maps-desc' => "Dèje l'abbilità a sckaffà le mappe dinameche 'ngapsulate jndr'à le pàggene de Uicchi, geocodificate e indirizzate a otre operaziune sciugrafeche. ([http://www.semantic-mediawiki.org/wiki/Maps cchiù 'mbormaziune...])", + 'maps-desc' => "Dèje l'abbilità a sckaffà le mappe dinameche 'ngapsulate jndr'à le pàggene de Uicchi, geocodificate e indirizzate a otre operaziune sciugrafeche. ([https://www.semantic-mediawiki.org/wiki/Maps cchiù 'mbormaziune...])", 'right-geocode' => 'Geocodece', 'maps_map' => 'Mappe', 'maps-loading-map' => "Stoche a careche 'a mappe...", @@ -5843,7 +5843,7 @@ * @author Александр Сигачёв */ $messages['ru'] = array( - 'maps-desc' => 'Позволяет встраивать динамические карты в вики-страницы, геокодировать адреса, выполнять другие географические действия. ([http://www.semantic-mediawiki.org/wiki/Maps подробнее...])', + 'maps-desc' => 'Позволяет встраивать динамические карты в вики-страницы, геокодировать адреса, выполнять другие географические действия. ([https://www.semantic-mediawiki.org/wiki/Maps подробнее...])', 'right-geocode' => 'геокодирование', 'maps_map' => 'Карта', 'maps-loading-map' => 'Идёт загрузка карты…', @@ -6122,7 +6122,7 @@ * @author Lesko987 */ $messages['sl'] = array( - 'maps-desc' => 'Omogoča vključevanje dinamičnih zemljevidov na wikistrani, geokodiranje naslovov in druge geografske operacije. ([http://www.semantic-mediawiki.org/wiki/Maps Več informacij ...])', + 'maps-desc' => 'Omogoča vključevanje dinamičnih zemljevidov na wikistrani, geokodiranje naslovov in druge geografske operacije. ([https://www.semantic-mediawiki.org/wiki/Maps Več informacij ...])', 'right-geocode' => 'Geokodiranje', 'maps_map' => 'Zemljevid', 'maps-loading-map' => 'Nakladanje zemljevida...', @@ -6201,7 +6201,7 @@ * @author WikiPhoenix */ $messages['sv'] = array( - 'maps-desc' => 'Ger möjlighet att bädda in dynamiska kartor i wiki-sidor, geokoding av adresser och andra geografiska åtgärder. ([http://www.semantic-mediawiki.org/wiki/Maps mer information...]).', + 'maps-desc' => 'Ger möjlighet att bädda in dynamiska kartor i wiki-sidor, geokoding av adresser och andra geografiska åtgärder. ([https://www.semantic-mediawiki.org/wiki/Maps mer information...]).', 'right-geocode' => 'Geokod', 'maps_map' => 'Karta', 'maps-loading-map' => 'Laddar karta ...', @@ -6632,7 +6632,7 @@ * @author Тест */ $messages['uk'] = array( - 'maps-desc' => 'Дає змогу вбудовування динамічних карт у сторінки вікі, геокодування адрес та інші географічні операції. ([http://www.semantic-mediawiki.org/wiki/Maps детальніше...])', + 'maps-desc' => 'Дає змогу вбудовування динамічних карт у сторінки вікі, геокодування адрес та інші географічні операції. ([https://www.semantic-mediawiki.org/wiki/Maps детальніше...])', 'right-geocode' => 'Геокод', 'maps_map' => 'Мапа', 'maps-loading-map' => 'Завантаження мапи...', @@ -6873,7 +6873,7 @@ * @author Vinhtantran */ $messages['vi'] = array( - 'maps-desc' => 'Cung cấp khả năng nhúng bản đồ vào trang wiki, mã hóa địa lý các địa chỉ, và thực hiện các tác vụ địa lý khác ([http://www.semantic-mediawiki.org/wiki/Maps?uselang=vi thêm chi tiết])', + 'maps-desc' => 'Cung cấp khả năng nhúng bản đồ vào trang wiki, mã hóa địa lý các địa chỉ, và thực hiện các tác vụ địa lý khác ([https://www.semantic-mediawiki.org/wiki/Maps?uselang=vi thêm chi tiết])', 'right-geocode' => 'Mã hóa địa lý', 'maps_map' => 'Bản đồ', 'maps-loading-map' => 'Đang tải bản đồ…', @@ -7010,7 +7010,7 @@ * @author Yfdyh000 */ $messages['zh-hans'] = array( - 'maps-desc' => '允许嵌入动态地图到wiki页面、地址的地理编码等地理学操作。([http://www.semantic-mediawiki.org/wiki/地图更多信息...])', + 'maps-desc' => '允许嵌入动态地图到wiki页面、地址的地理编码等地理学操作。([https://www.semantic-mediawiki.org/wiki/地图更多信息...])', 'right-geocode' => '地理编码', 'maps_map' => '地图', 'maps-loading-map' => '载入地图中……', @@ -7069,7 +7069,7 @@ * @author Waihorace */ $messages['zh-hant'] = array( - 'maps-desc' => '容許嵌入動態地圖到維基頁面、地址地理編碼及其他地理操作。([http://www.semantic-mediawiki.org/wiki/Maps 更多資訊…])', + 'maps-desc' => '容許嵌入動態地圖到維基頁面、地址地理編碼及其他地理操作。([https://www.semantic-mediawiki.org/wiki/Maps 更多資訊…])', 'right-geocode' => '地理編碼', 'maps_map' => '地圖', 'maps-loading-map' => '載入中...', From 844162a328daaefdefc337f7ed6a00b121dc7484 Mon Sep 17 00:00:00 2001 From: raymond Date: Sat, 21 Sep 2013 20:03:22 +0200 Subject: [PATCH 008/163] Consistency tweak: kml -> KML Change-Id: I47db5e7155dff01a19af20a86854441ad6863bd2 --- Maps.i18n.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index fa395aaa7..8a5f2ab34 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -27,7 +27,7 @@ 'maps-copycoords-prompt' => 'CTRL+C, ENTER', 'maps-searchmarkers-text' => 'Filter markers', 'maps-others' => 'others', - 'maps-kml-parsing-failed' => 'Failed parsing one or more kml files, usually due to retrieval failure or malformed XML.', + 'maps-kml-parsing-failed' => 'Failed parsing one or more KML files, usually due to retrieval failure or malformed XML.', //TODO: move to namespaces i18n 'maps-ns-layer' => 'Layer', 'maps-ns-layer-talk' => 'Layer talk', From bbed18a64a94994aaffc390a62e23c3384ab16e2 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sat, 21 Sep 2013 19:39:03 +0000 Subject: [PATCH 009/163] Localisation updates from http://translatewiki.net. Change-Id: I2d9e8d2e5b38ec5d88e18da557408485d9b9c3b1 --- Maps.i18n.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index fa395aaa7..9fe85eec9 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -260,8 +260,8 @@ 'right-geocode' => '{{doc-right|geocode}}', 'maps_map' => '{{Identical|Map}}', 'maps-copycoords-prompt' => 'text displayed in javascript prompt to indicate first press ctrl+c to copy text, and press enter to close prompt', - 'maps-kml-parsing-failed' => 'text displayed in the event of parsing failure of kml file(s).', 'maps-others' => '{{Identical|Other}}', + 'maps-kml-parsing-failed' => 'text displayed in the event of parsing failure of kml file(s).', 'maps-layer-property' => '{{Identical|Property}}', 'maps-layer-value' => '{{Identical|Value}}', 'maps-layer-errors' => '{{Identical|Error}}', @@ -593,7 +593,7 @@ Esto pue afeutar al valor predetermináu del serviciu de xeocodificación.", 'maps-displaymap-par-mappingservice' => "Permite configurar el serviciu de mapes que s'usará pa xenerar el mapa.", 'maps-displaymap-par-coordinates' => "El llugar onde apaecerá'l centru'l mapa nel aniciu.", - 'maps-displaymap-par-visitedicon' => "El llocal d'un ficheru a usar como iconu de visitáu", + 'maps-displaymap-par-visitedicon' => "El llocal d'un ficheru a usar como iconu de visitáu", # Fuzzy 'maps-displaymap-par-zoom' => "Permite configurar el nivel de zoom do mapa. Cuando nun se da y hai múltiples marcadores presentes nel mapa, se tomará'l zoom que meyor axuste, non el valor configurable predetermináu.", 'maps-displaymap-par-centre' => 'Permite configurar les coordenaes del centru do mapa pa display_point(s). @@ -1253,6 +1253,7 @@ 'maps-copycoords-prompt' => 'STRG+C, ENTER', 'maps-searchmarkers-text' => 'Markierungen zum Filtern', 'maps-others' => 'andere', + 'maps-kml-parsing-failed' => 'Das Parsen einer oder mehrerer KML-Dateien ist fehlgeschlagen, normalerweise aufgrund eines Abfragefehlers oder aufgrund von fehlerhaftem XML.', 'maps-ns-layer' => 'Ebene', 'maps-ns-layer-talk' => 'Ebene Diskussion', 'maps-layer-property' => 'Attribut', @@ -1747,7 +1748,7 @@ Esto puede afectar al valor predeterminado del servicio de geocodificación.', 'maps-displaymap-par-mappingservice' => 'Permite configurar el servicio de cartografía que se utilizará para generar el mapa.', 'maps-displaymap-par-coordinates' => 'La localización respecto de la cual el mapa aparecerá inicialmente centrado.', - 'maps-displaymap-par-visitedicon' => 'El disco local de un archivo para ser utilizado como icono visitado', + 'maps-displaymap-par-visitedicon' => 'El disco local de un archivo para ser utilizado como icono visitado', # Fuzzy 'maps-displaymap-par-zoom' => 'Permite configurar el nivel de zoom del mapa. Cuando no se proporciona y varios marcadores están presentes en el mapa, se tomará el mejor ajuste de zoom, y no el valor configurado por defecto.', 'maps-displaymap-par-centre' => 'Permite establecer las coordenadas del centro del mapa mediante display_point(s). @@ -2925,7 +2926,7 @@ 'maps-geodistance-par-mappingservice' => 'Geokodowanska słužba, kotraž ma so za geokodowanje wšěch adresow wužiwać.', 'maps-displaymap-par-mappingservice' => 'Zmóžnja nastajenje kartografiskeje słužby, kotraž ma so za generowanje karty wužiwać,', 'maps-displaymap-par-coordinates' => 'Městno, na kotrež ma so karta spočatnje centrować.', - 'maps-displaymap-par-visitedicon' => 'Městno dataje ze symbolom za wopytane wotkazy', + 'maps-displaymap-par-visitedicon' => 'Městno dataje ze symbolom za wopytane wotkazy', # Fuzzy 'maps-displaymap-par-icon' => 'Zmóžnja postajenje symbola, kotryž ma so za wšě marki wužiwać.', 'maps-displaymap-par-circles' => 'Kruhi, kotrejž maja so zwobraznić', 'maps-displaymap-par-lines' => 'Linije, kotrež maja so zwobraznić', @@ -3477,7 +3478,7 @@ 'maps-finddestination-par-distance' => 'La distanza da percorrere.', 'maps-geocode-par-format' => 'Il formato per le coordinate risultanti.', 'maps-displaymap-par-coordinates' => 'Uno o più luoghi da mostrare sulla mappa. Verranno indicati con un marcatore.', - 'maps-displaymap-par-visitedicon' => 'Il locale di un file da utilizzare come icona visitata', + 'maps-displaymap-par-visitedicon' => 'Il locale di un file da utilizzare come icona visitata', # Fuzzy 'maps-displaymap-par-lines' => 'Linee da visualizzare', 'maps-displaymap-par-maxzoom' => 'Il livello massimo di zoom', 'maps-displaymap-par-minzoom' => 'Il livello minimo di zoom', @@ -3839,7 +3840,7 @@ 기본 좌표화 서비스 값에 영향을 줄 수 있습니다.', 'maps-displaymap-par-mappingservice' => '지도를 생성하는데 사용될 매핑 서비스를 설정할 수 있습니다.', 'maps-displaymap-par-coordinates' => '지도에 보여줄 하나 이상의 위치입니다. 표시로 표시됩니다.', - 'maps-displaymap-par-visitedicon' => '방문한 아이콘으로 사용할 파일의 로컬', + 'maps-displaymap-par-visitedicon' => '방문한 아이콘으로 사용할 파일의 로컬', # Fuzzy 'maps-displaymap-par-zoom' => '지도의 확대 수준을 설정할 수 있습니다. 제공하지 않고 여러 표시가 지도에 존재하지 않으면 설정한 기본값이 아닌 최고의 맞춤 확대로 설정됩니다.', 'maps-displaymap-par-centre' => 'display_point에 대한 지도의 중심 좌표를 설정할 수 있습니다. @@ -4442,7 +4443,7 @@ Ini boleh mempengaruhi nilai asali perkhidmatan geokod.', 'maps-displaymap-par-mappingservice' => 'Membolehkan penetapan perkhidmatan pemetaan yang akan digunakan untuk menghasilkan peta.', 'maps-displaymap-par-coordinates' => 'Lokasi yang akan dijadikan pusat peta pada mulanya.', - 'maps-displaymap-par-visitedicon' => 'Lokal fail untuk digunakan sebagai ikon dilawat', + 'maps-displaymap-par-visitedicon' => 'Lokal fail untuk digunakan sebagai ikon dilawat', # Fuzzy 'maps-displaymap-par-zoom' => 'Membolehkan penetapan tahap zum peta. Apabila tidak diberikan sementara wujudnya berbilang penanda pada peta, zom yang paling muat akan diambil, bukan nilai asali yang terkonfigurasi.', 'maps-displaymap-par-centre' => 'Membolehkan penetapan koordinat pusat peta untuk display_point. @@ -4838,7 +4839,7 @@ Dit kan invloed hebben op de standaardwaarde voor de geocoderingsdienst.', 'maps-displaymap-par-mappingservice' => 'Maakt het mogelijk om de kaartdienst in te stellen die wordt gebruikt om de kaart te maken.', 'maps-displaymap-par-coordinates' => 'De locatie die zich bij de eerste keer laden in het centrum van de kaart bevindt.', - 'maps-displaymap-par-visitedicon' => 'De locatie van een bestand om te gebruiken als bezocht pictogram', + 'maps-displaymap-par-visitedicon' => 'De locatie van een bestand om te gebruiken als bezocht pictogram', # Fuzzy 'maps-displaymap-par-zoom' => 'Maakt het mogelijk het schaalniveau van de kaart in te stellen. Als deze waarde niet wordt ingesteld en er staan meerdere markers op de kaart, dan wordt het best passende schaalniveau gekozen, niet het instelbare standaardniveau.', 'maps-displaymap-par-centre' => 'Maakt het mogelijk de coördinaten voor het midden van de kaart in te stellen voor display_point(s). @@ -5340,7 +5341,7 @@ Sòn a peul anfluensé ël valor dël sërvissi ëd geocodìfica predefinì.", 'maps-displaymap-par-mappingservice' => "A përmët d'amposté ël sërvissi ëd cartografìa che a sarà dovrà për generé la carta.", 'maps-displaymap-par-coordinates' => 'Un-a o pi locassion da smon-e an sla carta. A saran mostrà con na marca.', - 'maps-displaymap-par-visitedicon' => "L'element local ëd n'archivi da dovré com plancia visità", + 'maps-displaymap-par-visitedicon' => "L'element local ëd n'archivi da dovré com plancia visità", # Fuzzy 'maps-displaymap-par-zoom' => "A përmët d'amposté ël livel d'angrandiment ëd la carta. Quand nen dàit e pi marche a son presente an sla carta, a sarà dovrà ël mej angrandiment, pa la configurassion predefinìa.", 'maps-displaymap-par-centre' => "A përmët d'amposté le coordinà dël sénter ëd la carta për display_point(s). From 0bfdb448e8d28d97bc097a470620066f945ef203 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sun, 22 Sep 2013 20:15:12 +0000 Subject: [PATCH 010/163] Localisation updates from http://translatewiki.net. Change-Id: I25005aa6aae1dfe6587b5600813831d8578ed3cb --- Maps.i18n.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index 157da8075..4aab52822 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -1988,6 +1988,7 @@ 'maps-copycoords-prompt' => 'CTRL+C, ENTER', 'maps-searchmarkers-text' => 'Suodatuksen kohdemerkit', # Fuzzy 'maps-others' => 'muut', + 'maps-kml-parsing-failed' => 'Yhden tai useamman kml-tiedoston jäsentäminen epäonnistui. Todennäköinen syy on lataamisen epäonnistuminen tai viallinen XML-syntaksi.', 'maps-ns-layer' => 'Taso', 'maps-ns-layer-talk' => 'Keskustelu tasosta', 'maps-layer-property' => 'Ominaisuus', @@ -3573,6 +3574,7 @@ 'maps-copycoords-prompt' => 'Ctrl+C、Enter', 'maps-searchmarkers-text' => 'マーカーを絞り込む', 'maps-others' => 'その他', + 'maps-kml-parsing-failed' => '1 件以上の kml ファイルを構文解析できませんでした。これは通常、取得失敗または XML の破損で発生します。', 'maps-ns-layer' => 'レイヤー', 'maps-ns-layer-talk' => 'レイヤー・トーク', 'maps-layer-property' => 'プロパティ', @@ -4180,6 +4182,7 @@ 'maps-copycoords-prompt' => 'Стиснете CTRL+C, па ENTER', 'maps-searchmarkers-text' => 'Филтрирање на одбележувачи', 'maps-others' => 'други', + 'maps-kml-parsing-failed' => 'Не можев да испарсирам една или повеќе KML-податотеки. Ова обично се должи на нивна недопстапност или лошо обликуван XML.', 'maps-ns-layer' => 'Слој', 'maps-ns-layer-talk' => 'Разговор за слој', 'maps-layer-property' => 'Својство', @@ -5172,6 +5175,7 @@ * @author BeginaFelicysym * @author Chrumps * @author Sp5uhe + * @author Ty221 * @author Yarl */ $messages['pl'] = array( @@ -5183,6 +5187,7 @@ 'maps-markers' => 'Zaznaczenia', 'maps-copycoords-prompt' => 'CTRL+C, ENTER', 'maps-others' => 'inne', + 'maps-kml-parsing-failed' => 'Błąd podczas parsowania jednego lub więcej plików KML, najczęściej jest to wynik błędnego XML', 'maps-ns-layer' => 'Warstwa', 'maps-ns-layer-talk' => 'Dyskusja warstwy', 'maps-layer-property' => 'Własność', @@ -6642,6 +6647,7 @@ 'maps-copycoords-prompt' => 'CTRL+C, ENTER', 'maps-searchmarkers-text' => 'Фільтрувати маркери', 'maps-others' => 'інші', + 'maps-kml-parsing-failed' => 'Помилка аналізу одного або декількох файлів kml, як правило, через отриманий несправний або некоректний XML.', 'maps-ns-layer' => 'Шар', 'maps-ns-layer-talk' => 'Обговорення шару', 'maps-layer-property' => 'Властивість', From 70586de46756933d1606d69a7a19179aeb0c9b93 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Mon, 23 Sep 2013 19:41:46 +0000 Subject: [PATCH 011/163] Localisation updates from http://translatewiki.net. Change-Id: If4468b10694ff4755459011c49c840c73c1334f3 --- Maps.i18n.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index 4aab52822..5c41493e3 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -2148,6 +2148,7 @@ 'maps-copycoords-prompt' => 'CTRL+C, ENTRÉE', 'maps-searchmarkers-text' => 'Marqueurs de filtre', 'maps-others' => 'autres', + 'maps-kml-parsing-failed' => 'Échec de l’analyse d’un ou plusieurs fichiers KML, le plus souvent à cause d’échecs de récupération ou de XML mal formé.', 'maps-ns-layer' => 'Couche', 'maps-ns-layer-talk' => 'Discussion couche', 'maps-layer-property' => 'Propriété', @@ -5280,7 +5281,7 @@ * @author පසිඳු කාවින්ද */ $messages['pms'] = array( - 'maps-desc' => "A abìlita l'anseriment ëd carte dinàmiche ant le pàgine ëd la wiki, dj'adrësse geocodificà e d'àutre operassion geogràfiche ([https://www.semantic-mediawiki.org/wiki/Maps për savèjne ëd pi...])", + 'maps-desc' => "A abìlita l'anseriment dle carte dinàmiche ant le pàgine ëd la wiki, dj'adrësse geocodificà e d'àutre operassion geogràfiche ([https://www.semantic-mediawiki.org/wiki/Maps për savèjne ëd pi...])", 'right-geocode' => 'Geocodìfica', 'maps_map' => 'Pian', 'maps-loading-map' => 'Cariament ëd la carta...', From 7c13acf19a6d91d4b56bb8933fdf90bbc4069043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20M=C3=B8lster=20Lidal?= Date: Wed, 25 Sep 2013 14:35:38 +0200 Subject: [PATCH 012/163] Parse group and inlinelabel, if available The LocationParser currently doesn't parse all metadata, add code to parse Group and InlineLabel Change-Id: Ic97af8672f9e1adbf8098eab4d8274eabae5da35 --- includes/parsers/LocationParser.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/includes/parsers/LocationParser.php b/includes/parsers/LocationParser.php index fa02d213c..0217d5bef 100644 --- a/includes/parsers/LocationParser.php +++ b/includes/parsers/LocationParser.php @@ -53,6 +53,14 @@ public function stringParse( $value ) { $location->setIcon( array_shift( $metaData ) ); } + if ( $metaData !== array() ) { + $location->setGroup( array_shift( $metaData ) ); + } + + if ( $metaData !== array() ) { + $location->setInlineLabel( array_shift( $metaData ) ); + } + return $location; } From 004fb086e597ee4088b5b8c6588af419fedfd7c4 Mon Sep 17 00:00:00 2001 From: Kim Eik Date: Mon, 15 Jul 2013 11:56:08 +0200 Subject: [PATCH 013/163] Added a toggle fullscreen button to Maps that is enabled trough the parameter enablefullscreen=true Upon receiving the click event, the map container gets the following css styles set: positon: fixed top: 0px left: 0px width: 100% height: 100% z-index: 10000 which effectively displays the map as fullscreen, overlaying all other dom elements. When the button is clicked again, the css styles is reverted to its original state. This functionality is only enabled for google maps, however i see no reason why this should not work with any map service. Change-Id: Ie019385ee0dd8e62712a42ef5d84e9a1a65d2560 --- Maps.i18n.php | 7 ++ includes/services/GoogleMaps3/GoogleMaps3.php | 2 + .../services/GoogleMaps3/Maps_GoogleMaps3.php | 6 + .../services/GoogleMaps3/jquery.googlemap.js | 112 +++++++++++++----- 4 files changed, 100 insertions(+), 27 deletions(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index 5c41493e3..60a12a45b 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -123,6 +123,10 @@ 'maps-displaymap-par-static' => 'If the map should be static', 'maps-displaymap-par-wmsoverlay' => 'Use a WMS overlay', + 'maps-fullscreen-button' => 'Toggle fullscreen', + 'maps-fullscreen-button-tooltip' => 'View the map as fullscreen/embedded.', + 'maps-googlemaps3-par-enable-fullscreen' => 'Enable fullscreen button', + // Validation 'validation-error-invalid-location' => 'Parameter $1 must be a valid location.', 'validation-error-invalid-locations' => 'Parameter $1 must be one or more valid locations.', @@ -260,6 +264,8 @@ 'right-geocode' => '{{doc-right|geocode}}', 'maps_map' => '{{Identical|Map}}', 'maps-copycoords-prompt' => 'text displayed in javascript prompt to indicate first press ctrl+c to copy text, and press enter to close prompt', + 'maps-fullscreen-button' => 'Text displayed in the map as a button to toggle fullscreen view', + 'maps-fullscreen-button-tooltip' => 'Text displayed when hovering over "maps-fullscreen-button"', 'maps-others' => '{{Identical|Other}}', 'maps-kml-parsing-failed' => 'text displayed in the event of parsing failure of kml file(s).', 'maps-layer-property' => '{{Identical|Property}}', @@ -361,6 +367,7 @@ KML stands for [[w:Keyhole Markup Language|Keyhole Markup Language]].', 'maps-googlemaps3-par-poi' => '{{maps-par|googlemaps3|poi}}', + 'maps-googlemaps3-par-enable-fullscreen' => '{{maps-par|googlemaps3|enablefullscreen}}', 'mapeditor' => 'title of the special page [[Special:MapEditor]].', 'specialpages-group-maps' => '{{doc-special-group|like=[[Special:MapEditor]]}} {{Identical|Map}}', diff --git a/includes/services/GoogleMaps3/GoogleMaps3.php b/includes/services/GoogleMaps3/GoogleMaps3.php index 83b2639ae..f245ae3bf 100644 --- a/includes/services/GoogleMaps3/GoogleMaps3.php +++ b/includes/services/GoogleMaps3/GoogleMaps3.php @@ -37,6 +37,8 @@ 'maps-googlemaps3-incompatbrowser', 'maps-copycoords-prompt', 'maps-searchmarkers-text', + 'maps-fullscreen-button', + 'maps-fullscreen-button-tooltip', ) ); diff --git a/includes/services/GoogleMaps3/Maps_GoogleMaps3.php b/includes/services/GoogleMaps3/Maps_GoogleMaps3.php index 34c050704..069f3cefb 100644 --- a/includes/services/GoogleMaps3/Maps_GoogleMaps3.php +++ b/includes/services/GoogleMaps3/Maps_GoogleMaps3.php @@ -219,6 +219,12 @@ public function addParameterInfo( array &$params ) { 'message' => 'maps-googlemaps3-par-searchmarkers', // new CriterionSearchMarkers() FIXME ); + + $params['enablefullscreen'] = array( + 'type' => 'boolean', + 'default' => false, + 'message' => 'maps-googlemaps3-par-enable-fullscreen', + ); } /** diff --git a/includes/services/GoogleMaps3/jquery.googlemap.js b/includes/services/GoogleMaps3/jquery.googlemap.js index aca61767d..c90b9a150 100644 --- a/includes/services/GoogleMaps3/jquery.googlemap.js +++ b/includes/services/GoogleMaps3/jquery.googlemap.js @@ -39,19 +39,19 @@ this.circles = []; - /** - * All rectangles on the map - */ - this.rectangles = []; + /** + * All rectangles on the map + */ + this.rectangles = []; - /** - * All image overlays on the map - */ - this.imageoverlays = []; + /** + * All image overlays on the map + */ + this.imageoverlays = []; - /** + /** * 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 @@ -373,22 +373,22 @@ }); }; - this.addImageOverlay = function(properties){ - var imageBounds = new google.maps.LatLngBounds( - new google.maps.LatLng(properties.sw.lat,properties.sw.lon), - new google.maps.LatLng(properties.ne.lat,properties.ne.lon) - ); + this.addImageOverlay = function(properties){ + var imageBounds = new google.maps.LatLngBounds( + new google.maps.LatLng(properties.sw.lat,properties.sw.lon), + new google.maps.LatLng(properties.ne.lat,properties.ne.lon) + ); - var image = new google.maps.GroundOverlay(properties.image,imageBounds); - image.setMap(this.map); + var image = new google.maps.GroundOverlay(properties.image,imageBounds); + image.setMap(this.map); - this.imageoverlays.push(image); + this.imageoverlays.push(image); - //add click event - google.maps.event.addListener(image, "click", function (event) { - openBubbleOrLink.call(this, properties, event, image); - }); - }; + //add click event + google.maps.event.addListener(image, "click", function (event) { + openBubbleOrLink.call(this, properties, event, image); + }); + }; this.removePolygon = function (polygon) { @@ -703,11 +703,11 @@ }); } - if(options.imageoverlays){ - for (var i = 0; i < options.imageoverlays.length; i++) { - this.addImageOverlay(options.imageoverlays[i]); - } - } + if(options.imageoverlays){ + for (var i = 0; i < options.imageoverlays.length; i++) { + this.addImageOverlay(options.imageoverlays[i]); + } + } if (options.copycoords) { @@ -766,8 +766,66 @@ map.mapTypes.set('OpenLayers', openlayersWMS); map.setMapTypeId('OpenLayers'); } + + //Add custom controls + // - Fullscreen + if(options.enablefullscreen){ + this.map.controls[google.maps.ControlPosition.TOP_RIGHT].push(new FullscreenControl(this.map)); + } }; + function FullscreenControl(map) { + + var controlDiv = document.createElement('div'); + controlDiv.style.padding = '5px'; + controlDiv.index = 1; + + var controlUI = document.createElement('div'); + controlUI.style.backgroundColor = 'white'; + controlUI.style.borderStyle = 'solid'; + controlUI.style.borderWidth = '1px'; + controlUI.style.cursor = 'pointer'; + controlUI.style.textAlign = 'center'; + controlUI.title = mediaWiki.msg('maps-fullscreen-button-tooltip'); + controlDiv.appendChild(controlUI); + + var controlText = document.createElement('div'); + controlText.style.fontFamily = 'Arial,sans-serif'; + controlText.style.fontSize = '12px'; + controlText.style.paddingLeft = '4px'; + controlText.style.paddingRight = '4px'; + controlText.innerHTML = mediaWiki.msg('maps-fullscreen-button'); + controlUI.appendChild(controlText); + + google.maps.event.addDomListener(controlUI, 'click', function() { + var mapDiv = $(map.getDiv()); + if(mapDiv.data('preFullscreenCss') != null){ + mapDiv.css(mapDiv.data('preFullscreenCss')); + mapDiv.removeData('preFullscreenCss'); + }else{ + var fullscreenCss = { + position:'fixed', + top: 0, + left:0, + width:'100%', + height:'100%', + zIndex:10000 + }; + var oldState = {}; + for(var cssProp in fullscreenCss){ + oldState[cssProp] = mapDiv.css(cssProp); + } + mapDiv.data('preFullscreenCss',oldState); + mapDiv.css(fullscreenCss); + } + + + }); + + return controlDiv; + } + + function openBubbleOrLink(properties, event, obj) { if (properties.link) { window.location.href = properties.link; From a82e4b7444d7f9d051bcf0d721c11e6853b930fe Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sun, 29 Sep 2013 20:05:57 +0000 Subject: [PATCH 014/163] Localisation updates from http://translatewiki.net. Change-Id: I882da93fc61fd084c2d4b8aa83d2070d938c7ee6 --- Maps.i18n.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index 60a12a45b..2ec8fcdfa 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -264,8 +264,6 @@ 'right-geocode' => '{{doc-right|geocode}}', 'maps_map' => '{{Identical|Map}}', 'maps-copycoords-prompt' => 'text displayed in javascript prompt to indicate first press ctrl+c to copy text, and press enter to close prompt', - 'maps-fullscreen-button' => 'Text displayed in the map as a button to toggle fullscreen view', - 'maps-fullscreen-button-tooltip' => 'Text displayed when hovering over "maps-fullscreen-button"', 'maps-others' => '{{Identical|Other}}', 'maps-kml-parsing-failed' => 'text displayed in the event of parsing failure of kml file(s).', 'maps-layer-property' => '{{Identical|Property}}', @@ -289,6 +287,9 @@ 'maps-layer-type-supported-by' => 'Parameters: * $1 - list of supported services (geonames and/or google). not localized. * $2 - number of supported services', + 'maps-fullscreen-button' => 'Text displayed in the map as a button to toggle fullscreen view', + 'maps-fullscreen-button-tooltip' => 'Text displayed when hovering over "maps-fullscreen-button"', + 'maps-googlemaps3-par-enable-fullscreen' => '{{maps-par|googlemaps3|enablefullscreen}}', 'validation-error-invalid-location' => 'Parameters: * $1 - parameter name {{Related|Maps-validation}}', @@ -367,7 +368,6 @@ KML stands for [[w:Keyhole Markup Language|Keyhole Markup Language]].', 'maps-googlemaps3-par-poi' => '{{maps-par|googlemaps3|poi}}', - 'maps-googlemaps3-par-enable-fullscreen' => '{{maps-par|googlemaps3|enablefullscreen}}', 'mapeditor' => 'title of the special page [[Special:MapEditor]].', 'specialpages-group-maps' => '{{doc-special-group|like=[[Special:MapEditor]]}} {{Identical|Map}}', @@ -1336,6 +1336,9 @@ 'maps-displaymap-par-rectangles' => 'Anzuzeigende Rechtecke', 'maps-displaymap-par-static' => 'Soll die Karte statisch sein', 'maps-displaymap-par-wmsoverlay' => 'Eine WMS-Überlagerung verwenden', + 'maps-fullscreen-button' => 'Auf Vollbild umschalten', + 'maps-fullscreen-button-tooltip' => 'Die Karte als Vollbild darstellen/eingebettet.', + 'maps-googlemaps3-par-enable-fullscreen' => 'Vollbildbutton aktivieren', 'validation-error-invalid-location' => 'Parameter $1 muss einem gültigen Standort entsprechen.', 'validation-error-invalid-locations' => 'Parameter $1 muss einem oder mehreren gültigen Standorten entsprechen.', 'validation-error-invalid-width' => 'Parameter $1 muss einer gültigen Breite entsprechen.', @@ -2440,6 +2443,7 @@ 'maps-copycoords-prompt' => 'CTRL+C, ENTER', 'maps-searchmarkers-text' => 'Filtrar os marcadores', 'maps-others' => 'outros', + 'maps-kml-parsing-failed' => 'Erro ao analizar un ou máis ficheiros KML. Normalmente, isto débese a un erro de recuperación ou a que o XML non ten o formato axeitado.', 'maps-ns-layer' => 'Capa', 'maps-ns-layer-talk' => 'Conversa capa', 'maps-layer-property' => 'Propiedade', @@ -3487,7 +3491,7 @@ 'maps-finddestination-par-distance' => 'La distanza da percorrere.', 'maps-geocode-par-format' => 'Il formato per le coordinate risultanti.', 'maps-displaymap-par-coordinates' => 'Uno o più luoghi da mostrare sulla mappa. Verranno indicati con un marcatore.', - 'maps-displaymap-par-visitedicon' => 'Il locale di un file da utilizzare come icona visitata', # Fuzzy + 'maps-displaymap-par-visitedicon' => "Il nome di un'immagine da utilizzare come icone per i marcatori dopo che sono stati selezionati", 'maps-displaymap-par-lines' => 'Linee da visualizzare', 'maps-displaymap-par-maxzoom' => 'Il livello massimo di zoom', 'maps-displaymap-par-minzoom' => 'Il livello minimo di zoom', @@ -6732,6 +6736,9 @@ 'maps-displaymap-par-rectangles' => 'Прямокутники для показу', 'maps-displaymap-par-static' => 'Якщо карта повинна бути нерухомою', 'maps-displaymap-par-wmsoverlay' => 'Використовувати накладення WMS', + 'maps-fullscreen-button' => 'Перемкнути повноекранний режим', + 'maps-fullscreen-button-tooltip' => 'Переглянути мапу на весь екран/як вбудовану.', + 'maps-googlemaps3-par-enable-fullscreen' => 'Увімкнути кнопку повноекранного режиму', 'validation-error-invalid-location' => 'Параметр $1 повинен бути коректним місцем розташування.', 'validation-error-invalid-locations' => 'Параметр $1 повинен бути одним або більше коректних місць розташування.', 'validation-error-invalid-width' => 'Параметр $1 повинен бути коректною шириною.', From eaecdfeb1e3e44a1a79c9bbfe7fc61f6eced7d1d Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Tue, 1 Oct 2013 19:03:47 +0000 Subject: [PATCH 015/163] Localisation updates from http://translatewiki.net. Change-Id: I40fc871cd94cc873f73463fa289eea9146a5bb8b --- Maps.i18n.php | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index 2ec8fcdfa..12293f269 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -287,8 +287,10 @@ 'maps-layer-type-supported-by' => 'Parameters: * $1 - list of supported services (geonames and/or google). not localized. * $2 - number of supported services', - 'maps-fullscreen-button' => 'Text displayed in the map as a button to toggle fullscreen view', - 'maps-fullscreen-button-tooltip' => 'Text displayed when hovering over "maps-fullscreen-button"', + 'maps-fullscreen-button' => 'Text displayed in the map as a button to toggle fullscreen view. + +Tooltip for this button is {{msg-mw|Maps-fullscreen-button-tooltip}}.', + 'maps-fullscreen-button-tooltip' => 'Text displayed when hovering over the button which is labeled {{msg-mw|Maps-fullscreen-button}}.', 'maps-googlemaps3-par-enable-fullscreen' => '{{maps-par|googlemaps3|enablefullscreen}}', 'validation-error-invalid-location' => 'Parameters: * $1 - parameter name @@ -544,6 +546,7 @@ 'maps-copycoords-prompt' => 'CTRL+C, Intro', 'maps-searchmarkers-text' => 'Peñerar marcadores', 'maps-others' => 'otros', + 'maps-kml-parsing-failed' => "Falló l'analís d'un ficheru KML o más, de vezu debío a un fallu na recuperación o a un XML con mal formatu.", 'maps-ns-layer' => 'Capa', 'maps-ns-layer-talk' => 'Alderique de capa', 'maps-layer-property' => 'Propiedá', @@ -600,7 +603,7 @@ Esto pue afeutar al valor predetermináu del serviciu de xeocodificación.", 'maps-displaymap-par-mappingservice' => "Permite configurar el serviciu de mapes que s'usará pa xenerar el mapa.", 'maps-displaymap-par-coordinates' => "El llugar onde apaecerá'l centru'l mapa nel aniciu.", - 'maps-displaymap-par-visitedicon' => "El llocal d'un ficheru a usar como iconu de visitáu", # Fuzzy + 'maps-displaymap-par-visitedicon' => "El nome d'una imaxe a usar pa los iconos de marcador dempués de facer clic nellos", 'maps-displaymap-par-zoom' => "Permite configurar el nivel de zoom do mapa. Cuando nun se da y hai múltiples marcadores presentes nel mapa, se tomará'l zoom que meyor axuste, non el valor configurable predetermináu.", 'maps-displaymap-par-centre' => 'Permite configurar les coordenaes del centru do mapa pa display_point(s). @@ -619,6 +622,9 @@ 'maps-displaymap-par-rectangles' => 'Rectángulos a amosar', 'maps-displaymap-par-static' => "Si'l mapa tien de ser estáticu", 'maps-displaymap-par-wmsoverlay' => 'Usar una superposición WMS', + 'maps-fullscreen-button' => 'Conmutar pantalla completa', + 'maps-fullscreen-button-tooltip' => 'Ver el mapa como pantalla completa/incrustáu.', + 'maps-googlemaps3-par-enable-fullscreen' => 'Activar el botón de pantalla completa', 'validation-error-invalid-location' => 'El parámetru $1 tien de ser un llugar válidu.', 'validation-error-invalid-locations' => 'El parámetru $1 tien de ser un o más llugares válidos.', 'validation-error-invalid-width' => 'El parámetru $1 tien de ser un anchor válidu.', @@ -2053,6 +2059,9 @@ 'maps-displaymap-par-polygons' => 'Näytettävät monikulmiot', 'maps-displaymap-par-rectangles' => 'Näytettävät suorakulmiot', 'maps-displaymap-par-static' => 'Onko kartan on oltava staattinen', + 'maps-fullscreen-button' => 'Koko näytön tila', + 'maps-fullscreen-button-tooltip' => 'Näytä kartta koko näytön tilassa tai upotettuna.', + 'maps-googlemaps3-par-enable-fullscreen' => 'Koko näytön tila -painike', 'validation-error-invalid-location' => 'Parametrin $1 on oltava sallittu sijainti.', 'validation-error-invalid-locations' => 'Parametrin $1 on oltava yksi tai useampi sallittu sijainti.', 'validation-error-invalid-width' => 'Parametrin $1 on oltava sallittu leveys.', @@ -2235,6 +2244,9 @@ 'maps-displaymap-par-rectangles' => 'Rectangles à afficher', 'maps-displaymap-par-static' => 'Si la carte doit être statique', 'maps-displaymap-par-wmsoverlay' => 'Utiliser une superposition WMS', + 'maps-fullscreen-button' => 'Basculer en plein écran', + 'maps-fullscreen-button-tooltip' => 'Afficher la carte en plein écran/incorporé', + 'maps-googlemaps3-par-enable-fullscreen' => 'Activer le bouton plein écran', 'validation-error-invalid-location' => 'Le paramètre $1 doit être un emplacement valide.', 'validation-error-invalid-locations' => 'Le paramètre $1 doit être un ou plusieurs emplacement(s) valide(s).', 'validation-error-invalid-width' => 'Le paramètre $1 doit être une largeur valide.', @@ -3613,6 +3625,9 @@ 'maps-displaymap-par-polygons' => '表示する多角形', 'maps-displaymap-par-rectangles' => '表示する矩形', 'maps-displaymap-par-wmsoverlay' => 'WMS オーバーレイを使用', + 'maps-fullscreen-button' => '全画面表示を切り替え', + 'maps-fullscreen-button-tooltip' => '地図の表示を全画面または埋め込みに切り替えます。', + 'maps-googlemaps3-par-enable-fullscreen' => '全画面表示のボタンを有効にする', 'validation-error-invalid-location' => '引数 $1 には有効な場所を指定してください。', 'validation-error-invalid-locations' => '引数 $1 には有効な場所を 1 つ以上指定してください。', 'validation-error-invalid-width' => '引数 $1 には有効な幅を指定してください。', @@ -4039,9 +4054,10 @@ /** Luxembourgish (Lëtzebuergesch) * @author Robby + * @author Soued031 */ $messages['lb'] = array( - 'maps-desc' => "Gëtt d'Méiglechkeet fir d'Date vun de Koordinaten op Kaarten a Geocode Adressen an aner geografesch Operatiounen ze weisen. ([https://www.semantic-mediawiki.org/wiki/Maps fir méi Informatiounen...])", + 'maps-desc' => "Gëtt d'Méiglechkeet fir d'Date vun de Koordinaten op Kaarten a Geocode Adressen an aner geographesch Operatiounen ze weisen. ([https://www.semantic-mediawiki.org/wiki/Maps fir méi Informatiounen...])", 'right-geocode' => 'Geocode', 'maps_map' => 'Kaart', 'maps-loading-map' => "D'Kaart gëtt gelueden…", @@ -4053,7 +4069,7 @@ 'maps-layer-property' => 'Eegeschaft', 'maps-layer-value' => 'Wäert', 'maps-layer-errors' => 'Feeler', - 'maps-geodistance-description' => 'Déi geografesch Distanz tëschent zwee Punkte berechnen, vun an an iergend eent vun den ënnerstëtzte Formater.', + 'maps-geodistance-description' => 'Déi geographesch Distanz tëscht zwéi Punkte berechnen, vun an an iergendeent vun den ënnerstëtzte Formater.', 'maps-mapsdoc-par-language' => "D'Sprooch an där d'Dokumentatioun gewise gi soll. Wann déi Iwwersetzung net disponibel ass, da gëtt Englesch an där Plaz benotzt.", 'maps-coordinates-par-location' => "D'Koordinaten déi Dir formatéiere wëllt.", 'maps-coordinates-par-format' => "D'Zilformat vun de Koordinaten.", @@ -4096,7 +4112,7 @@ 'maps_unrecognized_coords_for' => 'Dës {{PLURAL:$2|Koordinate|Koordinate}} goufen net erkannt a vun der Kaart ignoréiert: $1', 'maps_map_cannot_be_displayed' => "D'Kaart kann net gewise ginn.", - 'maps-geocoder-not-available' => "D'Fonctioun vun der Geocodéierung vu Kaarten ass net disponibel. Äre Standuert konnt net geocodéiert ginn.", + 'maps-geocoder-not-available' => "D'Funktioun vun der Geocodéierung vu Kaarten ass net disponibel. Äre Standuert konnt net geocodéiert ginn.", 'maps_click_to_activate' => "Klickt fir d'kaart z'aktivéieren", 'maps_centred_on' => "D'Kaart ass zentréiert op $1, $2", 'maps-googlemaps3-incompatbrowser' => 'Äre Browser ass net mat Google Maps v3 kompatibel.', @@ -4270,6 +4286,9 @@ 'maps-displaymap-par-rectangles' => 'Правоаголници за приказ', 'maps-displaymap-par-static' => 'Дали картата да биде неподвижна', 'maps-displaymap-par-wmsoverlay' => 'Користи WMS-облога', + 'maps-fullscreen-button' => 'Префрли на широк екран', + 'maps-fullscreen-button-tooltip' => 'Поглед на картата на цел екран/вгнездено', + 'maps-googlemaps3-par-enable-fullscreen' => 'Овозможи копче за цел екран', 'validation-error-invalid-location' => 'Параметарот $1 мора да претставува важечка местоположба.', 'validation-error-invalid-locations' => 'Параметарот $1 мора да претставува една или повеќе важечки местоположби.', 'validation-error-invalid-width' => 'Параметарот $1 мора да претставува важечка ширина.', @@ -5926,6 +5945,7 @@ 'maps-displaymap-par-maxzoom' => 'Максимальный уровень масштабирования', 'maps-displaymap-par-minzoom' => 'Минимальный уровень масштабирования', 'maps-displaymap-par-static' => 'Если карта должна быть статичной', + 'maps-fullscreen-button' => 'Переключить полноэкранный режим', 'validation-error-invalid-location' => 'Параметр $1 должен быть корректным местоположением.', 'validation-error-invalid-locations' => 'Параметр $1 должен содержать одно или несколько корректных местоположений.', 'validation-error-invalid-width' => 'Параметр $1 должен быть корректной шириной.', From e1c5abd6fa297a10f0fabe07cd9478475cc66eca Mon Sep 17 00:00:00 2001 From: Kim Eik Date: Wed, 2 Oct 2013 07:37:46 +0200 Subject: [PATCH 016/163] Fixed special case when searchbox is enabled. There is a special case when the searchbox is enabled where one can have markers and other map objects beneath the search input box. This decreases usability. However by panning the map -30 pixels on the y axis before the map is loaded, this prevents that. And it also seems to prevent other map opbjects to be pushed outside the map if they were within the 30px range which was panned out of the map. This is probably due to the event type used when issuing the panBy method. As it probably kicks in before the map calculates its own zoom and center based on the bounding box. Change-Id: I90fb6973298432631ee4de0e9f4ffb24742a6842 --- includes/services/GoogleMaps3/jquery.googlemap.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/services/GoogleMaps3/jquery.googlemap.js b/includes/services/GoogleMaps3/jquery.googlemap.js index c90b9a150..471585865 100644 --- a/includes/services/GoogleMaps3/jquery.googlemap.js +++ b/includes/services/GoogleMaps3/jquery.googlemap.js @@ -680,6 +680,12 @@ searchBox.appendTo(searchContainer); map.controls[google.maps.ControlPosition.TOP_RIGHT].push(searchContainer); + //prevents markers and other map objects to be placed beneath searchfield + google.maps.event.addListenerOnce(map, 'bounds_changed', function () { + map.panBy(0,-30); + }); + + searchBox.on('keyup',function (e) { for (var i = 0; i < _this.markers.length; i++) { var haystack = ''; From ac7679d36089d41158a8050a45c41e8a9c266640 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Wed, 2 Oct 2013 14:11:49 +0000 Subject: [PATCH 017/163] Localisation updates from http://translatewiki.net. Change-Id: Ib0c13d3423d0c16325a0d970b828074e09aef0cb --- Maps.i18n.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index 12293f269..d22eee19f 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -6157,6 +6157,7 @@ /** Slovenian (slovenščina) * @author Dbc334 + * @author Eleassar * @author Lesko987 */ $messages['sl'] = array( @@ -6165,6 +6166,10 @@ 'maps_map' => 'Zemljevid', 'maps-loading-map' => 'Nakladanje zemljevida...', 'maps-load-failed' => 'Zemljevid ni bilo mogoče naložiti.', + 'maps-kml-parsing-failed' => 'Razčlenjevanje ene ali več datotek KML ni uspelo. Navadno je vzrok neuspešen priklic ali slabo oblikovan XML.', + 'maps-fullscreen-button' => 'Vklopi celozaslonski prikaz', + 'maps-fullscreen-button-tooltip' => 'Celozaslonski/vključeni prikaz zemljevida.', + 'maps-googlemaps3-par-enable-fullscreen' => 'Omogoči gumb za celozaslonski prikaz', 'maps-abb-north' => 'S', 'maps-abb-east' => 'V', 'maps-abb-south' => 'J', @@ -7046,6 +7051,7 @@ /** Simplified Chinese (中文(简体)‎) * @author Hydra + * @author Hzy980512 * @author Kuailong * @author PhiLiP * @author Xiaomingyan @@ -7068,6 +7074,7 @@ 'maps-error-invalid-layerdef' => '这一层定义不是有效的。', 'maps-finddestination-par-location' => '初始位置。', 'maps-finddestination-par-bearing' => '最初的影响。', + 'maps-googlemaps3-par-enable-fullscreen' => '启用全屏按钮', 'validation-error-invalid-location' => '参数 $1 必须是一个有效的位置。', 'validation-error-invalid-locations' => '参数 $1 必须有一个或多个有效的位置。', 'validation-error-invalid-width' => '参数 $1 必须是一个有效的宽度。', @@ -7103,6 +7110,7 @@ ); /** Traditional Chinese (中文(繁體)‎) + * @author Cwlin0416 * @author Horacewai2 * @author Justincheng12345 * @author Mark85296341 @@ -7127,6 +7135,9 @@ 'maps-error-invalid-layerdef' => '這一層定義不是有效的。', 'maps-finddestination-par-location' => '初始位置。', 'maps-finddestination-par-bearing' => '最初的影響。', + 'maps-fullscreen-button' => '切換全螢幕', + 'maps-fullscreen-button-tooltip' => '檢視地圖使用全螢幕或嵌入式', + 'maps-googlemaps3-par-enable-fullscreen' => '開啟全螢幕的按鈕', 'validation-error-invalid-location' => '參數 $1 必須是一個有效的位置。', 'validation-error-invalid-locations' => '參數 $1 必須有一個或多個有效的位置。', 'validation-error-invalid-width' => '參數 $1 必須是一個有效的寬度。', From 341801709aa06cc605df789add2418d929ef3519 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Wed, 2 Oct 2013 19:40:23 +0000 Subject: [PATCH 018/163] Localisation updates from http://translatewiki.net. Change-Id: I9c9b0d972171b06d9506d7aa3f11a5e558137455 --- Maps.i18n.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index d22eee19f..124f38f3d 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -2532,6 +2532,9 @@ 'maps-displaymap-par-rectangles' => 'Rectángulos a mostrar', 'maps-displaymap-par-static' => 'Se o mapa debe ser estático', 'maps-displaymap-par-wmsoverlay' => 'Utilizar unha sobreposición WMS', + 'maps-fullscreen-button' => 'Activar ou desactivar a pantalla completa', + 'maps-fullscreen-button-tooltip' => 'Mostrar o mapa en pantalla completa/incrustado.', + 'maps-googlemaps3-par-enable-fullscreen' => 'Activar o botón de pantalla completa', 'validation-error-invalid-location' => 'O parámetro $1 debe ser unha localización válida.', 'validation-error-invalid-locations' => 'O parámetro $1 debe ser unha ou máis localizacións válidas.', 'validation-error-invalid-width' => 'O parámetro $1 debe ser un largo válido.', From eea29ea7c4c94c37c0e2a9d595c2bf944d4ccad9 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Thu, 3 Oct 2013 21:40:38 +0200 Subject: [PATCH 019/163] Use "or" instead of "/" Spotted by Niklas and reported at https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Maps-fullscreen-button-tooltip/en Change-Id: Id17477628d2770a93c2f044578fb34ffc8b5d7ca --- Maps.i18n.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index 124f38f3d..4d5b9c763 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -124,7 +124,7 @@ 'maps-displaymap-par-wmsoverlay' => 'Use a WMS overlay', 'maps-fullscreen-button' => 'Toggle fullscreen', - 'maps-fullscreen-button-tooltip' => 'View the map as fullscreen/embedded.', + 'maps-fullscreen-button-tooltip' => 'View the map as fullscreen or embedded.', 'maps-googlemaps3-par-enable-fullscreen' => 'Enable fullscreen button', // Validation From f10ea398b49ef76344d9e7f23e08ce8509ee7999 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sun, 6 Oct 2013 18:38:58 +0000 Subject: [PATCH 020/163] Localisation updates from http://translatewiki.net. Change-Id: Ife274ffe29c39ca6fb4966598bccd19c76abe753 --- Maps.i18n.alias.php | 1 + Maps.i18n.php | 88 +++++++++++++-------------------------------- 2 files changed, 25 insertions(+), 64 deletions(-) diff --git a/Maps.i18n.alias.php b/Maps.i18n.alias.php index ee89d8414..36e1806d4 100644 --- a/Maps.i18n.alias.php +++ b/Maps.i18n.alias.php @@ -4,6 +4,7 @@ /** English * @author netbrain */ +// @codingStandardsIgnoreFile $specialPageAliases = array(); diff --git a/Maps.i18n.php b/Maps.i18n.php index 4d5b9c763..d5bff1cfd 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -10,16 +10,13 @@ $messages = array(); -/** English +/** English (English) * @author Jeroen De Dauw * @author Karsten Hoffmeyer (kghbln) */ $messages['en'] = array( - // General - 'maps-desc' => "Enables embedding of dynamic maps into wiki pages, geocoding of addresses and other geographical operations. ([https://www.semantic-mediawiki.org/wiki/Maps more info...])", - + 'maps-desc' => 'Enables embedding of dynamic maps into wiki pages, geocoding of addresses and other geographical operations. ([https://www.semantic-mediawiki.org/wiki/Maps more info...])', 'right-geocode' => 'Geocode', - 'maps_map' => 'Map', 'maps-loading-map' => 'Loading map...', 'maps-load-failed' => 'Could not load the map!', @@ -28,7 +25,6 @@ 'maps-searchmarkers-text' => 'Filter markers', 'maps-others' => 'others', 'maps-kml-parsing-failed' => 'Failed parsing one or more KML files, usually due to retrieval failure or malformed XML.', - //TODO: move to namespaces i18n 'maps-ns-layer' => 'Layer', 'maps-ns-layer-talk' => 'Layer talk', 'maps-layer-property' => 'Property', @@ -41,44 +37,32 @@ 'validation-error-invalid-layers' => 'Parameter $1 must be one or more valid layers.', 'maps-layer-of-type' => 'Layer of type $1', 'maps-layer-type-supported-by' => 'This layer type can {{PLURAL:$2|only be used with the $1 mapping service|be used with these mapping services: $1}}.', - - // Parser function descriptions 'maps-coordinates-description' => 'Parser hook to format coordinates, from and to any of the supported formats.', 'maps-displaymap-description' => 'Display geographical maps without any wiki-defined markers on them.', 'maps-displaypoint-description' => 'Display geographical maps with one or more wiki-defined markers on them.', - 'maps-distance-description' => "Convert a distance using a certain supported unit to its equivalent using another unit.", + 'maps-distance-description' => 'Convert a distance using a certain supported unit to its equivalent using another unit.', 'maps-finddestination-description' => 'Find a destination given a starting point (that can be in any of the supported formats), an initial bearing and a distance.', 'maps-geocode-description' => 'Enables the geocoding of addresses, in other words, turning human readable locations into sets of coordinates. There is support for several geocoding services, which should not be confused with mapping services.', 'maps-geodistance-description' => 'Calculate the geographical distance between two points, from and to any of the supported formats.', 'maps-mapsdoc-description' => 'Display a table with the parameters for a specified mapping service together with their default values and descriptions.', - - // Mapsdoc parser hook 'maps-mapsdoc-par-service' => 'The mapping service to display parameter documentation for.', 'maps-mapsdoc-par-language' => 'The language in which to display the documentation. If no such translation is available, English will be used instead.', - - // Coordinates parser hook 'maps-coordinates-par-location' => 'The coordinates you want to format.', 'maps-coordinates-par-format' => 'The target format for the coordinates.', 'maps-coordinates-par-directional' => 'Indicates if the coordinates should be outputted directional or not.', - - // Distance parser hook - 'maps-distance-par-distance' => "The distance to convert to its equivalent with a specified unit.", + 'maps-distance-par-distance' => 'The distance to convert to its equivalent with a specified unit.', 'maps-distance-par-decimals' => 'The maximum number of fractional digits to use in the resulting value.', 'maps-distance-par-unit' => 'The unit to output the distance in.', - - // Finddestination paser hook 'maps-finddestination-par-location' => 'The initial location.', 'maps-finddestination-par-bearing' => 'The initial bearing.', 'maps-finddestination-par-distance' => 'The distance to travel.', 'maps-finddestination-par-format' => 'The format in which to output the destination.', 'maps-finddestination-par-directional' => 'Indicates if the format of the destination should be directional or not.', 'maps-finddestination-par-allowcoordinates' => 'Indicates if coordinates should be allowed. If set to no, only addresses will be accepted.', - 'maps-finddestination-par-geoservice' => "The geocoding service to use to geocode the value in case it is an address.", - 'maps-finddestination-par-mappingservice' => "Parameter to indicate the mapping service to use with this function. + 'maps-finddestination-par-geoservice' => 'The geocoding service to use to geocode the value in case it is an address.', + 'maps-finddestination-par-mappingservice' => 'Parameter to indicate the mapping service to use with this function. This will allow maps to override the default value of the service parameter by the one that is optimal for the mapping service. -(Example: In case of Google Maps, the Google geocoder will be used.)", - - // Geocode parser hook +(Example: In case of Google Maps, the Google geocoder will be used.)', 'maps-geocode-par-location' => 'The address you want to geocode.', 'maps-geocode-par-mappingservice' => 'The geocoding service you want to use. See the available geocoding services.', 'maps-geocode-par-geoservice' => 'This parameter allows you to indicate you are using this geocoding request in combination with a specific mapping service. @@ -89,8 +73,6 @@ When no, every value will be geocoded, even valid coordinates.', 'maps-geocode-par-format' => 'The format for the resulting coordinates.', 'maps-geocode-par-directional' => 'Indicates if the coordinates should be outputted directional or not.', - - // Geodistance parser hook 'maps-geodistance-par-location1' => 'The first point in the set to calculate the distance between.', 'maps-geodistance-par-location2' => 'The second point in the set to calculate the distance between.', 'maps-geodistance-par-unit' => 'The unit to output the distance in.', @@ -98,14 +80,11 @@ 'maps-geodistance-par-mappingservice' => 'The geocoding service to use to geocode any addresses.', 'maps-geodistance-par-geoservice' => 'The mapping service this is used together with. This can affect the default geocoding service value.', - - // display_map parser hook 'maps-displaymap-par-mappingservice' => 'Allows setting the mapping service that will be used to generate the map.', - 'maps-displaymap-par-coordinates' => 'The location the map will initially be centered on.', + 'maps-displaymap-par-coordinates' => 'One or more locations to display on the map. They will be indicated with a marker.', 'maps-displaymap-par-visitedicon' => 'The name of an image to be used for marker icons after they have been clicked', 'maps-displaymap-par-zoom' => 'Allows setting the zoom level of the map. When not provided and multiple markers are present on the map, the best fitting zoom will be taken, not the configurable default.', - 'maps-displaymap-par-coordinates' => 'One or more locations to display on the map. They will be indicated with a marker.', 'maps-displaymap-par-centre' => "Allows setting the coordinates of the map's center for display_point(s). Accepts both addresses and coordinates. When this property is not provided, the map will center itself on the provided marker, or between the provided markers.", @@ -122,12 +101,9 @@ 'maps-displaymap-par-rectangles' => 'Rectangles to display', 'maps-displaymap-par-static' => 'If the map should be static', 'maps-displaymap-par-wmsoverlay' => 'Use a WMS overlay', - 'maps-fullscreen-button' => 'Toggle fullscreen', 'maps-fullscreen-button-tooltip' => 'View the map as fullscreen or embedded.', 'maps-googlemaps3-par-enable-fullscreen' => 'Enable fullscreen button', - - // Validation 'validation-error-invalid-location' => 'Parameter $1 must be a valid location.', 'validation-error-invalid-locations' => 'Parameter $1 must be one or more valid locations.', 'validation-error-invalid-width' => 'Parameter $1 must be a valid width.', @@ -136,22 +112,17 @@ 'validation-error-invalid-distances' => 'Parameter $1 must be one or more valid distances.', 'validation-error-invalid-image' => 'Parameter $1 must be a valid image.', 'validation-error-invalid-images' => 'Parameter $1 must be one or more valid images.', - 'validation-error-invalid-goverlay' => 'Parameter $1 must be a valid overlay.', 'validation-error-invalid-goverlays' => 'Parameter $1 must be one or more valid overlays.', 'validation-error-invalid-line-param' => 'Invalid "lines" parameter specified.', 'validation-error-invalid-polyline-param' => 'Invalid "polylines" parameter specified.', 'validation-error-invalid-searchmarkers-param' => 'Invalid searchmarkers value, should be either "all" or "title"', - - // Coordinate handling 'maps-abb-north' => 'N', 'maps-abb-east' => 'E', 'maps-abb-south' => 'S', 'maps-abb-west' => 'W', - 'maps-latitude' => 'Latitude:', + 'maps-latitude' => 'Latitude:', 'maps-longitude' => 'Longitude:', - - // Coordinate errors 'maps-invalid-coordinates' => 'The value $1 was not recognized as a valid set of coordinates.', 'maps_coordinates_missing' => 'No coordinates provided for the map.', 'maps_geocoding_failed' => 'The following {{PLURAL:$2|address|addresses}} could not be geocoded: $1.', @@ -161,20 +132,12 @@ 'maps_unrecognized_coords_for' => 'The following {{PLURAL:$2|coordinate was|coordinates were}} not recognized and {{PLURAL:$2|has|have}} been omitted from the map: $1', 'maps_map_cannot_be_displayed' => 'The map cannot be displayed.', - - // Geocoding 'maps-geocoder-not-available' => 'The geocoding feature of Maps is not available. Your location cannot be geocoded.', - - // Mapping services 'maps_googlemaps3' => 'Google Maps v3', 'maps_openlayers' => 'OpenLayers', 'maps_osm' => 'OpenStreetMap', - - // Static maps 'maps_click_to_activate' => 'Click to activate map', 'maps_centred_on' => 'Map centered on $1, $2.', - - // Params common to all mapping features (ie display_map, query printers, form inputs) 'maps-par-mappingservice' => 'Allows setting the mapping service that will be used to generate the map.', 'maps-par-resizable' => 'Makes the map resizable by dragging at its lower right corner.', 'maps-par-geoservice' => 'The geocoding service to use to make translations between addresses and coordinates.', @@ -182,8 +145,6 @@ 'maps-par-width' => 'Allows setting the width of the map. By default pixels will be assumed as unit, but you can explicitly specify one of these units: px, ex, em, %.', 'maps-par-height' => 'Allows setting the height of the map. By default pixels will be assumed as unit, but you can explicitly specify one of these units: px, ex, em, %.', 'maps-par-centre' => 'The location on which the map should be centered', - - // Google Maps v3 'maps-googlemaps3-incompatbrowser' => 'Your browser is not compatible with Google Maps v3.', 'maps-googlemaps3-par-type' => 'The map type to initially show.', 'maps-googlemaps3-par-types' => 'The map types that will be available via the type control.', @@ -198,16 +159,10 @@ 'maps-googlemaps3-par-tilt' => 'Tilt for the Map when using Google Maps.', 'maps-googlemaps3-par-kmlrezoom' => 'Rezoom the map after the KML layers have been loaded.', 'maps-googlemaps3-par-poi' => 'Show points of interest.', - - // OpenLayers 'maps-openlayers-par-controls' => 'The controls to place on the map.', 'maps-openlayers-par-layers' => 'The layers that will be available in the layer selector. The first layer will be shown when the map loads.', - - // OSM 'maps-osm-par-thumbs' => 'Show thumbs', 'maps-osm-par-photos' => 'Show photos', - - // Special:MapEditor 'mapeditor' => 'Map editor', 'specialpages-group-maps' => 'Maps', 'mapeditor-parser-error' => 'An error occurred when parsing metadata. Ignoring user input.', @@ -244,7 +199,6 @@ 'mapeditor-form-field-image' => 'Image', 'mapeditor-imageoverlay-title' => 'Image overlay details', 'mapeditor-form-field-visitedicon' => 'Visited icon', - ); /** Message documentation (Message documentation) @@ -266,6 +220,7 @@ 'maps-copycoords-prompt' => 'text displayed in javascript prompt to indicate first press ctrl+c to copy text, and press enter to close prompt', 'maps-others' => '{{Identical|Other}}', 'maps-kml-parsing-failed' => 'text displayed in the event of parsing failure of kml file(s).', + 'maps-ns-layer' => '{{Identical|Layer}}', 'maps-layer-property' => '{{Identical|Property}}', 'maps-layer-value' => '{{Identical|Value}}', 'maps-layer-errors' => '{{Identical|Error}}', @@ -623,7 +578,7 @@ 'maps-displaymap-par-static' => "Si'l mapa tien de ser estáticu", 'maps-displaymap-par-wmsoverlay' => 'Usar una superposición WMS', 'maps-fullscreen-button' => 'Conmutar pantalla completa', - 'maps-fullscreen-button-tooltip' => 'Ver el mapa como pantalla completa/incrustáu.', + 'maps-fullscreen-button-tooltip' => 'Ver el mapa como pantalla completa/incrustáu.', # Fuzzy 'maps-googlemaps3-par-enable-fullscreen' => 'Activar el botón de pantalla completa', 'validation-error-invalid-location' => 'El parámetru $1 tien de ser un llugar válidu.', 'validation-error-invalid-locations' => 'El parámetru $1 tien de ser un o más llugares válidos.', @@ -1343,7 +1298,7 @@ 'maps-displaymap-par-static' => 'Soll die Karte statisch sein', 'maps-displaymap-par-wmsoverlay' => 'Eine WMS-Überlagerung verwenden', 'maps-fullscreen-button' => 'Auf Vollbild umschalten', - 'maps-fullscreen-button-tooltip' => 'Die Karte als Vollbild darstellen/eingebettet.', + 'maps-fullscreen-button-tooltip' => 'Die Karte als Vollbild oder eingebettet darstellen.', 'maps-googlemaps3-par-enable-fullscreen' => 'Vollbildbutton aktivieren', 'validation-error-invalid-location' => 'Parameter $1 muss einem gültigen Standort entsprechen.', 'validation-error-invalid-locations' => 'Parameter $1 muss einem oder mehreren gültigen Standorten entsprechen.', @@ -2060,7 +2015,7 @@ 'maps-displaymap-par-rectangles' => 'Näytettävät suorakulmiot', 'maps-displaymap-par-static' => 'Onko kartan on oltava staattinen', 'maps-fullscreen-button' => 'Koko näytön tila', - 'maps-fullscreen-button-tooltip' => 'Näytä kartta koko näytön tilassa tai upotettuna.', + 'maps-fullscreen-button-tooltip' => 'Näytä kartta koko näytön tilassa tai upotettuna.', # Fuzzy 'maps-googlemaps3-par-enable-fullscreen' => 'Koko näytön tila -painike', 'validation-error-invalid-location' => 'Parametrin $1 on oltava sallittu sijainti.', 'validation-error-invalid-locations' => 'Parametrin $1 on oltava yksi tai useampi sallittu sijainti.', @@ -2245,7 +2200,7 @@ 'maps-displaymap-par-static' => 'Si la carte doit être statique', 'maps-displaymap-par-wmsoverlay' => 'Utiliser une superposition WMS', 'maps-fullscreen-button' => 'Basculer en plein écran', - 'maps-fullscreen-button-tooltip' => 'Afficher la carte en plein écran/incorporé', + 'maps-fullscreen-button-tooltip' => 'Visualiser la carte en plein écran ou incorporé.', 'maps-googlemaps3-par-enable-fullscreen' => 'Activer le bouton plein écran', 'validation-error-invalid-location' => 'Le paramètre $1 doit être un emplacement valide.', 'validation-error-invalid-locations' => 'Le paramètre $1 doit être un ou plusieurs emplacement(s) valide(s).', @@ -2533,7 +2488,7 @@ 'maps-displaymap-par-static' => 'Se o mapa debe ser estático', 'maps-displaymap-par-wmsoverlay' => 'Utilizar unha sobreposición WMS', 'maps-fullscreen-button' => 'Activar ou desactivar a pantalla completa', - 'maps-fullscreen-button-tooltip' => 'Mostrar o mapa en pantalla completa/incrustado.', + 'maps-fullscreen-button-tooltip' => 'Mostrar o mapa en pantalla completa/incrustado.', # Fuzzy 'maps-googlemaps3-par-enable-fullscreen' => 'Activar o botón de pantalla completa', 'validation-error-invalid-location' => 'O parámetro $1 debe ser unha localización válida.', 'validation-error-invalid-locations' => 'O parámetro $1 debe ser unha ou máis localizacións válidas.', @@ -4290,7 +4245,7 @@ 'maps-displaymap-par-static' => 'Дали картата да биде неподвижна', 'maps-displaymap-par-wmsoverlay' => 'Користи WMS-облога', 'maps-fullscreen-button' => 'Префрли на широк екран', - 'maps-fullscreen-button-tooltip' => 'Поглед на картата на цел екран/вгнездено', + 'maps-fullscreen-button-tooltip' => 'Поглед на картата на цел екран или вгнездено.', 'maps-googlemaps3-par-enable-fullscreen' => 'Овозможи копче за цел екран', 'validation-error-invalid-location' => 'Параметарот $1 мора да претставува важечка местоположба.', 'validation-error-invalid-locations' => 'Параметарот $1 мора да претставува една или повеќе важечки местоположби.', @@ -6171,7 +6126,7 @@ 'maps-load-failed' => 'Zemljevid ni bilo mogoče naložiti.', 'maps-kml-parsing-failed' => 'Razčlenjevanje ene ali več datotek KML ni uspelo. Navadno je vzrok neuspešen priklic ali slabo oblikovan XML.', 'maps-fullscreen-button' => 'Vklopi celozaslonski prikaz', - 'maps-fullscreen-button-tooltip' => 'Celozaslonski/vključeni prikaz zemljevida.', + 'maps-fullscreen-button-tooltip' => 'Celozaslonski/vključeni prikaz zemljevida.', # Fuzzy 'maps-googlemaps3-par-enable-fullscreen' => 'Omogoči gumb za celozaslonski prikaz', 'maps-abb-north' => 'S', 'maps-abb-east' => 'V', @@ -6765,7 +6720,7 @@ 'maps-displaymap-par-static' => 'Якщо карта повинна бути нерухомою', 'maps-displaymap-par-wmsoverlay' => 'Використовувати накладення WMS', 'maps-fullscreen-button' => 'Перемкнути повноекранний режим', - 'maps-fullscreen-button-tooltip' => 'Переглянути мапу на весь екран/як вбудовану.', + 'maps-fullscreen-button-tooltip' => 'Переглянути мапу на весь екран або як вбудовану.', 'maps-googlemaps3-par-enable-fullscreen' => 'Увімкнути кнопку повноекранного режиму', 'validation-error-invalid-location' => 'Параметр $1 повинен бути коректним місцем розташування.', 'validation-error-invalid-locations' => 'Параметр $1 повинен бути одним або більше коректних місць розташування.', @@ -7056,6 +7011,7 @@ * @author Hydra * @author Hzy980512 * @author Kuailong + * @author Liuxinyu970226 * @author PhiLiP * @author Xiaomingyan * @author Yfdyh000 @@ -7077,6 +7033,7 @@ 'maps-error-invalid-layerdef' => '这一层定义不是有效的。', 'maps-finddestination-par-location' => '初始位置。', 'maps-finddestination-par-bearing' => '最初的影响。', + 'maps-fullscreen-button' => '切换全屏显示', 'maps-googlemaps3-par-enable-fullscreen' => '启用全屏按钮', 'validation-error-invalid-location' => '参数 $1 必须是一个有效的位置。', 'validation-error-invalid-locations' => '参数 $1 必须有一个或多个有效的位置。', @@ -7095,12 +7052,15 @@ 'maps-latitude' => '纬度:', 'maps-longitude' => '经度:', 'maps_map_cannot_be_displayed' => '该地图无法显示。', + 'maps_click_to_activate' => '点击激活地图', + 'maps-googlemaps3-incompatbrowser' => '您的浏览器不兼容Google Maps v3。', 'maps-osm-par-thumbs' => '显示大拇指', 'maps-osm-par-photos' => '显示图片', 'mapeditor' => '地图编辑器', 'specialpages-group-maps' => '地图', 'mapeditor-none-text' => '无', 'mapeditor-done-button' => '完成', + 'mapeditor-remove-button' => '移除', 'mapeditor-import-button2' => '汇入', 'mapeditor-export-button' => '汇出到 wiki 代码', 'mapeditor-form-title' => '编辑详情', @@ -7139,7 +7099,7 @@ 'maps-finddestination-par-location' => '初始位置。', 'maps-finddestination-par-bearing' => '最初的影響。', 'maps-fullscreen-button' => '切換全螢幕', - 'maps-fullscreen-button-tooltip' => '檢視地圖使用全螢幕或嵌入式', + 'maps-fullscreen-button-tooltip' => '檢視地圖使用全螢幕或嵌入式', # Fuzzy 'maps-googlemaps3-par-enable-fullscreen' => '開啟全螢幕的按鈕', 'validation-error-invalid-location' => '參數 $1 必須是一個有效的位置。', 'validation-error-invalid-locations' => '參數 $1 必須有一個或多個有效的位置。', From 5b7776c40496c8f0674a58b03aada0065444938f Mon Sep 17 00:00:00 2001 From: Siebrand Date: Sun, 6 Oct 2013 21:20:42 +0000 Subject: [PATCH 021/163] Revert "Localisation updates from http://translatewiki.net." This reverts commit f10ea398b49ef76344d9e7f23e08ce8509ee7999. Change-Id: I147cc93003b49ca8f3fdf9be84dd18343d9e1183 --- Maps.i18n.alias.php | 1 - Maps.i18n.php | 88 ++++++++++++++++++++++++++++++++------------- 2 files changed, 64 insertions(+), 25 deletions(-) diff --git a/Maps.i18n.alias.php b/Maps.i18n.alias.php index 36e1806d4..ee89d8414 100644 --- a/Maps.i18n.alias.php +++ b/Maps.i18n.alias.php @@ -4,7 +4,6 @@ /** English * @author netbrain */ -// @codingStandardsIgnoreFile $specialPageAliases = array(); diff --git a/Maps.i18n.php b/Maps.i18n.php index d5bff1cfd..4d5b9c763 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -10,13 +10,16 @@ $messages = array(); -/** English (English) +/** English * @author Jeroen De Dauw * @author Karsten Hoffmeyer (kghbln) */ $messages['en'] = array( - 'maps-desc' => 'Enables embedding of dynamic maps into wiki pages, geocoding of addresses and other geographical operations. ([https://www.semantic-mediawiki.org/wiki/Maps more info...])', + // General + 'maps-desc' => "Enables embedding of dynamic maps into wiki pages, geocoding of addresses and other geographical operations. ([https://www.semantic-mediawiki.org/wiki/Maps more info...])", + 'right-geocode' => 'Geocode', + 'maps_map' => 'Map', 'maps-loading-map' => 'Loading map...', 'maps-load-failed' => 'Could not load the map!', @@ -25,6 +28,7 @@ 'maps-searchmarkers-text' => 'Filter markers', 'maps-others' => 'others', 'maps-kml-parsing-failed' => 'Failed parsing one or more KML files, usually due to retrieval failure or malformed XML.', + //TODO: move to namespaces i18n 'maps-ns-layer' => 'Layer', 'maps-ns-layer-talk' => 'Layer talk', 'maps-layer-property' => 'Property', @@ -37,32 +41,44 @@ 'validation-error-invalid-layers' => 'Parameter $1 must be one or more valid layers.', 'maps-layer-of-type' => 'Layer of type $1', 'maps-layer-type-supported-by' => 'This layer type can {{PLURAL:$2|only be used with the $1 mapping service|be used with these mapping services: $1}}.', + + // Parser function descriptions 'maps-coordinates-description' => 'Parser hook to format coordinates, from and to any of the supported formats.', 'maps-displaymap-description' => 'Display geographical maps without any wiki-defined markers on them.', 'maps-displaypoint-description' => 'Display geographical maps with one or more wiki-defined markers on them.', - 'maps-distance-description' => 'Convert a distance using a certain supported unit to its equivalent using another unit.', + 'maps-distance-description' => "Convert a distance using a certain supported unit to its equivalent using another unit.", 'maps-finddestination-description' => 'Find a destination given a starting point (that can be in any of the supported formats), an initial bearing and a distance.', 'maps-geocode-description' => 'Enables the geocoding of addresses, in other words, turning human readable locations into sets of coordinates. There is support for several geocoding services, which should not be confused with mapping services.', 'maps-geodistance-description' => 'Calculate the geographical distance between two points, from and to any of the supported formats.', 'maps-mapsdoc-description' => 'Display a table with the parameters for a specified mapping service together with their default values and descriptions.', + + // Mapsdoc parser hook 'maps-mapsdoc-par-service' => 'The mapping service to display parameter documentation for.', 'maps-mapsdoc-par-language' => 'The language in which to display the documentation. If no such translation is available, English will be used instead.', + + // Coordinates parser hook 'maps-coordinates-par-location' => 'The coordinates you want to format.', 'maps-coordinates-par-format' => 'The target format for the coordinates.', 'maps-coordinates-par-directional' => 'Indicates if the coordinates should be outputted directional or not.', - 'maps-distance-par-distance' => 'The distance to convert to its equivalent with a specified unit.', + + // Distance parser hook + 'maps-distance-par-distance' => "The distance to convert to its equivalent with a specified unit.", 'maps-distance-par-decimals' => 'The maximum number of fractional digits to use in the resulting value.', 'maps-distance-par-unit' => 'The unit to output the distance in.', + + // Finddestination paser hook 'maps-finddestination-par-location' => 'The initial location.', 'maps-finddestination-par-bearing' => 'The initial bearing.', 'maps-finddestination-par-distance' => 'The distance to travel.', 'maps-finddestination-par-format' => 'The format in which to output the destination.', 'maps-finddestination-par-directional' => 'Indicates if the format of the destination should be directional or not.', 'maps-finddestination-par-allowcoordinates' => 'Indicates if coordinates should be allowed. If set to no, only addresses will be accepted.', - 'maps-finddestination-par-geoservice' => 'The geocoding service to use to geocode the value in case it is an address.', - 'maps-finddestination-par-mappingservice' => 'Parameter to indicate the mapping service to use with this function. + 'maps-finddestination-par-geoservice' => "The geocoding service to use to geocode the value in case it is an address.", + 'maps-finddestination-par-mappingservice' => "Parameter to indicate the mapping service to use with this function. This will allow maps to override the default value of the service parameter by the one that is optimal for the mapping service. -(Example: In case of Google Maps, the Google geocoder will be used.)', +(Example: In case of Google Maps, the Google geocoder will be used.)", + + // Geocode parser hook 'maps-geocode-par-location' => 'The address you want to geocode.', 'maps-geocode-par-mappingservice' => 'The geocoding service you want to use. See the available geocoding services.', 'maps-geocode-par-geoservice' => 'This parameter allows you to indicate you are using this geocoding request in combination with a specific mapping service. @@ -73,6 +89,8 @@ When no, every value will be geocoded, even valid coordinates.', 'maps-geocode-par-format' => 'The format for the resulting coordinates.', 'maps-geocode-par-directional' => 'Indicates if the coordinates should be outputted directional or not.', + + // Geodistance parser hook 'maps-geodistance-par-location1' => 'The first point in the set to calculate the distance between.', 'maps-geodistance-par-location2' => 'The second point in the set to calculate the distance between.', 'maps-geodistance-par-unit' => 'The unit to output the distance in.', @@ -80,11 +98,14 @@ 'maps-geodistance-par-mappingservice' => 'The geocoding service to use to geocode any addresses.', 'maps-geodistance-par-geoservice' => 'The mapping service this is used together with. This can affect the default geocoding service value.', + + // display_map parser hook 'maps-displaymap-par-mappingservice' => 'Allows setting the mapping service that will be used to generate the map.', - 'maps-displaymap-par-coordinates' => 'One or more locations to display on the map. They will be indicated with a marker.', + 'maps-displaymap-par-coordinates' => 'The location the map will initially be centered on.', 'maps-displaymap-par-visitedicon' => 'The name of an image to be used for marker icons after they have been clicked', 'maps-displaymap-par-zoom' => 'Allows setting the zoom level of the map. When not provided and multiple markers are present on the map, the best fitting zoom will be taken, not the configurable default.', + 'maps-displaymap-par-coordinates' => 'One or more locations to display on the map. They will be indicated with a marker.', 'maps-displaymap-par-centre' => "Allows setting the coordinates of the map's center for display_point(s). Accepts both addresses and coordinates. When this property is not provided, the map will center itself on the provided marker, or between the provided markers.", @@ -101,9 +122,12 @@ 'maps-displaymap-par-rectangles' => 'Rectangles to display', 'maps-displaymap-par-static' => 'If the map should be static', 'maps-displaymap-par-wmsoverlay' => 'Use a WMS overlay', + 'maps-fullscreen-button' => 'Toggle fullscreen', 'maps-fullscreen-button-tooltip' => 'View the map as fullscreen or embedded.', 'maps-googlemaps3-par-enable-fullscreen' => 'Enable fullscreen button', + + // Validation 'validation-error-invalid-location' => 'Parameter $1 must be a valid location.', 'validation-error-invalid-locations' => 'Parameter $1 must be one or more valid locations.', 'validation-error-invalid-width' => 'Parameter $1 must be a valid width.', @@ -112,17 +136,22 @@ 'validation-error-invalid-distances' => 'Parameter $1 must be one or more valid distances.', 'validation-error-invalid-image' => 'Parameter $1 must be a valid image.', 'validation-error-invalid-images' => 'Parameter $1 must be one or more valid images.', + 'validation-error-invalid-goverlay' => 'Parameter $1 must be a valid overlay.', 'validation-error-invalid-goverlays' => 'Parameter $1 must be one or more valid overlays.', 'validation-error-invalid-line-param' => 'Invalid "lines" parameter specified.', 'validation-error-invalid-polyline-param' => 'Invalid "polylines" parameter specified.', 'validation-error-invalid-searchmarkers-param' => 'Invalid searchmarkers value, should be either "all" or "title"', + + // Coordinate handling 'maps-abb-north' => 'N', 'maps-abb-east' => 'E', 'maps-abb-south' => 'S', 'maps-abb-west' => 'W', - 'maps-latitude' => 'Latitude:', + 'maps-latitude' => 'Latitude:', 'maps-longitude' => 'Longitude:', + + // Coordinate errors 'maps-invalid-coordinates' => 'The value $1 was not recognized as a valid set of coordinates.', 'maps_coordinates_missing' => 'No coordinates provided for the map.', 'maps_geocoding_failed' => 'The following {{PLURAL:$2|address|addresses}} could not be geocoded: $1.', @@ -132,12 +161,20 @@ 'maps_unrecognized_coords_for' => 'The following {{PLURAL:$2|coordinate was|coordinates were}} not recognized and {{PLURAL:$2|has|have}} been omitted from the map: $1', 'maps_map_cannot_be_displayed' => 'The map cannot be displayed.', + + // Geocoding 'maps-geocoder-not-available' => 'The geocoding feature of Maps is not available. Your location cannot be geocoded.', + + // Mapping services 'maps_googlemaps3' => 'Google Maps v3', 'maps_openlayers' => 'OpenLayers', 'maps_osm' => 'OpenStreetMap', + + // Static maps 'maps_click_to_activate' => 'Click to activate map', 'maps_centred_on' => 'Map centered on $1, $2.', + + // Params common to all mapping features (ie display_map, query printers, form inputs) 'maps-par-mappingservice' => 'Allows setting the mapping service that will be used to generate the map.', 'maps-par-resizable' => 'Makes the map resizable by dragging at its lower right corner.', 'maps-par-geoservice' => 'The geocoding service to use to make translations between addresses and coordinates.', @@ -145,6 +182,8 @@ 'maps-par-width' => 'Allows setting the width of the map. By default pixels will be assumed as unit, but you can explicitly specify one of these units: px, ex, em, %.', 'maps-par-height' => 'Allows setting the height of the map. By default pixels will be assumed as unit, but you can explicitly specify one of these units: px, ex, em, %.', 'maps-par-centre' => 'The location on which the map should be centered', + + // Google Maps v3 'maps-googlemaps3-incompatbrowser' => 'Your browser is not compatible with Google Maps v3.', 'maps-googlemaps3-par-type' => 'The map type to initially show.', 'maps-googlemaps3-par-types' => 'The map types that will be available via the type control.', @@ -159,10 +198,16 @@ 'maps-googlemaps3-par-tilt' => 'Tilt for the Map when using Google Maps.', 'maps-googlemaps3-par-kmlrezoom' => 'Rezoom the map after the KML layers have been loaded.', 'maps-googlemaps3-par-poi' => 'Show points of interest.', + + // OpenLayers 'maps-openlayers-par-controls' => 'The controls to place on the map.', 'maps-openlayers-par-layers' => 'The layers that will be available in the layer selector. The first layer will be shown when the map loads.', + + // OSM 'maps-osm-par-thumbs' => 'Show thumbs', 'maps-osm-par-photos' => 'Show photos', + + // Special:MapEditor 'mapeditor' => 'Map editor', 'specialpages-group-maps' => 'Maps', 'mapeditor-parser-error' => 'An error occurred when parsing metadata. Ignoring user input.', @@ -199,6 +244,7 @@ 'mapeditor-form-field-image' => 'Image', 'mapeditor-imageoverlay-title' => 'Image overlay details', 'mapeditor-form-field-visitedicon' => 'Visited icon', + ); /** Message documentation (Message documentation) @@ -220,7 +266,6 @@ 'maps-copycoords-prompt' => 'text displayed in javascript prompt to indicate first press ctrl+c to copy text, and press enter to close prompt', 'maps-others' => '{{Identical|Other}}', 'maps-kml-parsing-failed' => 'text displayed in the event of parsing failure of kml file(s).', - 'maps-ns-layer' => '{{Identical|Layer}}', 'maps-layer-property' => '{{Identical|Property}}', 'maps-layer-value' => '{{Identical|Value}}', 'maps-layer-errors' => '{{Identical|Error}}', @@ -578,7 +623,7 @@ 'maps-displaymap-par-static' => "Si'l mapa tien de ser estáticu", 'maps-displaymap-par-wmsoverlay' => 'Usar una superposición WMS', 'maps-fullscreen-button' => 'Conmutar pantalla completa', - 'maps-fullscreen-button-tooltip' => 'Ver el mapa como pantalla completa/incrustáu.', # Fuzzy + 'maps-fullscreen-button-tooltip' => 'Ver el mapa como pantalla completa/incrustáu.', 'maps-googlemaps3-par-enable-fullscreen' => 'Activar el botón de pantalla completa', 'validation-error-invalid-location' => 'El parámetru $1 tien de ser un llugar válidu.', 'validation-error-invalid-locations' => 'El parámetru $1 tien de ser un o más llugares válidos.', @@ -1298,7 +1343,7 @@ 'maps-displaymap-par-static' => 'Soll die Karte statisch sein', 'maps-displaymap-par-wmsoverlay' => 'Eine WMS-Überlagerung verwenden', 'maps-fullscreen-button' => 'Auf Vollbild umschalten', - 'maps-fullscreen-button-tooltip' => 'Die Karte als Vollbild oder eingebettet darstellen.', + 'maps-fullscreen-button-tooltip' => 'Die Karte als Vollbild darstellen/eingebettet.', 'maps-googlemaps3-par-enable-fullscreen' => 'Vollbildbutton aktivieren', 'validation-error-invalid-location' => 'Parameter $1 muss einem gültigen Standort entsprechen.', 'validation-error-invalid-locations' => 'Parameter $1 muss einem oder mehreren gültigen Standorten entsprechen.', @@ -2015,7 +2060,7 @@ 'maps-displaymap-par-rectangles' => 'Näytettävät suorakulmiot', 'maps-displaymap-par-static' => 'Onko kartan on oltava staattinen', 'maps-fullscreen-button' => 'Koko näytön tila', - 'maps-fullscreen-button-tooltip' => 'Näytä kartta koko näytön tilassa tai upotettuna.', # Fuzzy + 'maps-fullscreen-button-tooltip' => 'Näytä kartta koko näytön tilassa tai upotettuna.', 'maps-googlemaps3-par-enable-fullscreen' => 'Koko näytön tila -painike', 'validation-error-invalid-location' => 'Parametrin $1 on oltava sallittu sijainti.', 'validation-error-invalid-locations' => 'Parametrin $1 on oltava yksi tai useampi sallittu sijainti.', @@ -2200,7 +2245,7 @@ 'maps-displaymap-par-static' => 'Si la carte doit être statique', 'maps-displaymap-par-wmsoverlay' => 'Utiliser une superposition WMS', 'maps-fullscreen-button' => 'Basculer en plein écran', - 'maps-fullscreen-button-tooltip' => 'Visualiser la carte en plein écran ou incorporé.', + 'maps-fullscreen-button-tooltip' => 'Afficher la carte en plein écran/incorporé', 'maps-googlemaps3-par-enable-fullscreen' => 'Activer le bouton plein écran', 'validation-error-invalid-location' => 'Le paramètre $1 doit être un emplacement valide.', 'validation-error-invalid-locations' => 'Le paramètre $1 doit être un ou plusieurs emplacement(s) valide(s).', @@ -2488,7 +2533,7 @@ 'maps-displaymap-par-static' => 'Se o mapa debe ser estático', 'maps-displaymap-par-wmsoverlay' => 'Utilizar unha sobreposición WMS', 'maps-fullscreen-button' => 'Activar ou desactivar a pantalla completa', - 'maps-fullscreen-button-tooltip' => 'Mostrar o mapa en pantalla completa/incrustado.', # Fuzzy + 'maps-fullscreen-button-tooltip' => 'Mostrar o mapa en pantalla completa/incrustado.', 'maps-googlemaps3-par-enable-fullscreen' => 'Activar o botón de pantalla completa', 'validation-error-invalid-location' => 'O parámetro $1 debe ser unha localización válida.', 'validation-error-invalid-locations' => 'O parámetro $1 debe ser unha ou máis localizacións válidas.', @@ -4245,7 +4290,7 @@ 'maps-displaymap-par-static' => 'Дали картата да биде неподвижна', 'maps-displaymap-par-wmsoverlay' => 'Користи WMS-облога', 'maps-fullscreen-button' => 'Префрли на широк екран', - 'maps-fullscreen-button-tooltip' => 'Поглед на картата на цел екран или вгнездено.', + 'maps-fullscreen-button-tooltip' => 'Поглед на картата на цел екран/вгнездено', 'maps-googlemaps3-par-enable-fullscreen' => 'Овозможи копче за цел екран', 'validation-error-invalid-location' => 'Параметарот $1 мора да претставува важечка местоположба.', 'validation-error-invalid-locations' => 'Параметарот $1 мора да претставува една или повеќе важечки местоположби.', @@ -6126,7 +6171,7 @@ 'maps-load-failed' => 'Zemljevid ni bilo mogoče naložiti.', 'maps-kml-parsing-failed' => 'Razčlenjevanje ene ali več datotek KML ni uspelo. Navadno je vzrok neuspešen priklic ali slabo oblikovan XML.', 'maps-fullscreen-button' => 'Vklopi celozaslonski prikaz', - 'maps-fullscreen-button-tooltip' => 'Celozaslonski/vključeni prikaz zemljevida.', # Fuzzy + 'maps-fullscreen-button-tooltip' => 'Celozaslonski/vključeni prikaz zemljevida.', 'maps-googlemaps3-par-enable-fullscreen' => 'Omogoči gumb za celozaslonski prikaz', 'maps-abb-north' => 'S', 'maps-abb-east' => 'V', @@ -6720,7 +6765,7 @@ 'maps-displaymap-par-static' => 'Якщо карта повинна бути нерухомою', 'maps-displaymap-par-wmsoverlay' => 'Використовувати накладення WMS', 'maps-fullscreen-button' => 'Перемкнути повноекранний режим', - 'maps-fullscreen-button-tooltip' => 'Переглянути мапу на весь екран або як вбудовану.', + 'maps-fullscreen-button-tooltip' => 'Переглянути мапу на весь екран/як вбудовану.', 'maps-googlemaps3-par-enable-fullscreen' => 'Увімкнути кнопку повноекранного режиму', 'validation-error-invalid-location' => 'Параметр $1 повинен бути коректним місцем розташування.', 'validation-error-invalid-locations' => 'Параметр $1 повинен бути одним або більше коректних місць розташування.', @@ -7011,7 +7056,6 @@ * @author Hydra * @author Hzy980512 * @author Kuailong - * @author Liuxinyu970226 * @author PhiLiP * @author Xiaomingyan * @author Yfdyh000 @@ -7033,7 +7077,6 @@ 'maps-error-invalid-layerdef' => '这一层定义不是有效的。', 'maps-finddestination-par-location' => '初始位置。', 'maps-finddestination-par-bearing' => '最初的影响。', - 'maps-fullscreen-button' => '切换全屏显示', 'maps-googlemaps3-par-enable-fullscreen' => '启用全屏按钮', 'validation-error-invalid-location' => '参数 $1 必须是一个有效的位置。', 'validation-error-invalid-locations' => '参数 $1 必须有一个或多个有效的位置。', @@ -7052,15 +7095,12 @@ 'maps-latitude' => '纬度:', 'maps-longitude' => '经度:', 'maps_map_cannot_be_displayed' => '该地图无法显示。', - 'maps_click_to_activate' => '点击激活地图', - 'maps-googlemaps3-incompatbrowser' => '您的浏览器不兼容Google Maps v3。', 'maps-osm-par-thumbs' => '显示大拇指', 'maps-osm-par-photos' => '显示图片', 'mapeditor' => '地图编辑器', 'specialpages-group-maps' => '地图', 'mapeditor-none-text' => '无', 'mapeditor-done-button' => '完成', - 'mapeditor-remove-button' => '移除', 'mapeditor-import-button2' => '汇入', 'mapeditor-export-button' => '汇出到 wiki 代码', 'mapeditor-form-title' => '编辑详情', @@ -7099,7 +7139,7 @@ 'maps-finddestination-par-location' => '初始位置。', 'maps-finddestination-par-bearing' => '最初的影響。', 'maps-fullscreen-button' => '切換全螢幕', - 'maps-fullscreen-button-tooltip' => '檢視地圖使用全螢幕或嵌入式', # Fuzzy + 'maps-fullscreen-button-tooltip' => '檢視地圖使用全螢幕或嵌入式', 'maps-googlemaps3-par-enable-fullscreen' => '開啟全螢幕的按鈕', 'validation-error-invalid-location' => '參數 $1 必須是一個有效的位置。', 'validation-error-invalid-locations' => '參數 $1 必須有一個或多個有效的位置。', From 14a0195154beb90b175854136dd9e9d16f3d7784 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Mon, 7 Oct 2013 01:43:33 +0000 Subject: [PATCH 022/163] Localisation updates from http://translatewiki.net. Change-Id: Iaed711696f2fa5a4a96e3fc0db4d3a3e7d7b81da --- Maps.i18n.alias.php | 1 + Maps.i18n.php | 26 ++++++++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Maps.i18n.alias.php b/Maps.i18n.alias.php index ee89d8414..36e1806d4 100644 --- a/Maps.i18n.alias.php +++ b/Maps.i18n.alias.php @@ -4,6 +4,7 @@ /** English * @author netbrain */ +// @codingStandardsIgnoreFile $specialPageAliases = array(); diff --git a/Maps.i18n.php b/Maps.i18n.php index 4d5b9c763..35c8e3700 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -266,6 +266,7 @@ 'maps-copycoords-prompt' => 'text displayed in javascript prompt to indicate first press ctrl+c to copy text, and press enter to close prompt', 'maps-others' => '{{Identical|Other}}', 'maps-kml-parsing-failed' => 'text displayed in the event of parsing failure of kml file(s).', + 'maps-ns-layer' => '{{Identical|Layer}}', 'maps-layer-property' => '{{Identical|Property}}', 'maps-layer-value' => '{{Identical|Value}}', 'maps-layer-errors' => '{{Identical|Error}}', @@ -623,7 +624,7 @@ 'maps-displaymap-par-static' => "Si'l mapa tien de ser estáticu", 'maps-displaymap-par-wmsoverlay' => 'Usar una superposición WMS', 'maps-fullscreen-button' => 'Conmutar pantalla completa', - 'maps-fullscreen-button-tooltip' => 'Ver el mapa como pantalla completa/incrustáu.', + 'maps-fullscreen-button-tooltip' => 'Ver el mapa como pantalla completa/incrustáu.', # Fuzzy 'maps-googlemaps3-par-enable-fullscreen' => 'Activar el botón de pantalla completa', 'validation-error-invalid-location' => 'El parámetru $1 tien de ser un llugar válidu.', 'validation-error-invalid-locations' => 'El parámetru $1 tien de ser un o más llugares válidos.', @@ -1343,7 +1344,7 @@ 'maps-displaymap-par-static' => 'Soll die Karte statisch sein', 'maps-displaymap-par-wmsoverlay' => 'Eine WMS-Überlagerung verwenden', 'maps-fullscreen-button' => 'Auf Vollbild umschalten', - 'maps-fullscreen-button-tooltip' => 'Die Karte als Vollbild darstellen/eingebettet.', + 'maps-fullscreen-button-tooltip' => 'Die Karte als Vollbild oder eingebettet darstellen.', 'maps-googlemaps3-par-enable-fullscreen' => 'Vollbildbutton aktivieren', 'validation-error-invalid-location' => 'Parameter $1 muss einem gültigen Standort entsprechen.', 'validation-error-invalid-locations' => 'Parameter $1 muss einem oder mehreren gültigen Standorten entsprechen.', @@ -2060,7 +2061,7 @@ 'maps-displaymap-par-rectangles' => 'Näytettävät suorakulmiot', 'maps-displaymap-par-static' => 'Onko kartan on oltava staattinen', 'maps-fullscreen-button' => 'Koko näytön tila', - 'maps-fullscreen-button-tooltip' => 'Näytä kartta koko näytön tilassa tai upotettuna.', + 'maps-fullscreen-button-tooltip' => 'Näytä kartta koko näytön tilassa tai upotettuna.', # Fuzzy 'maps-googlemaps3-par-enable-fullscreen' => 'Koko näytön tila -painike', 'validation-error-invalid-location' => 'Parametrin $1 on oltava sallittu sijainti.', 'validation-error-invalid-locations' => 'Parametrin $1 on oltava yksi tai useampi sallittu sijainti.', @@ -2245,7 +2246,7 @@ 'maps-displaymap-par-static' => 'Si la carte doit être statique', 'maps-displaymap-par-wmsoverlay' => 'Utiliser une superposition WMS', 'maps-fullscreen-button' => 'Basculer en plein écran', - 'maps-fullscreen-button-tooltip' => 'Afficher la carte en plein écran/incorporé', + 'maps-fullscreen-button-tooltip' => 'Visualiser la carte en plein écran ou incorporé.', 'maps-googlemaps3-par-enable-fullscreen' => 'Activer le bouton plein écran', 'validation-error-invalid-location' => 'Le paramètre $1 doit être un emplacement valide.', 'validation-error-invalid-locations' => 'Le paramètre $1 doit être un ou plusieurs emplacement(s) valide(s).', @@ -2533,7 +2534,7 @@ 'maps-displaymap-par-static' => 'Se o mapa debe ser estático', 'maps-displaymap-par-wmsoverlay' => 'Utilizar unha sobreposición WMS', 'maps-fullscreen-button' => 'Activar ou desactivar a pantalla completa', - 'maps-fullscreen-button-tooltip' => 'Mostrar o mapa en pantalla completa/incrustado.', + 'maps-fullscreen-button-tooltip' => 'Mostrar o mapa en pantalla completa/incrustado.', # Fuzzy 'maps-googlemaps3-par-enable-fullscreen' => 'Activar o botón de pantalla completa', 'validation-error-invalid-location' => 'O parámetro $1 debe ser unha localización válida.', 'validation-error-invalid-locations' => 'O parámetro $1 debe ser unha ou máis localizacións válidas.', @@ -4290,7 +4291,7 @@ 'maps-displaymap-par-static' => 'Дали картата да биде неподвижна', 'maps-displaymap-par-wmsoverlay' => 'Користи WMS-облога', 'maps-fullscreen-button' => 'Префрли на широк екран', - 'maps-fullscreen-button-tooltip' => 'Поглед на картата на цел екран/вгнездено', + 'maps-fullscreen-button-tooltip' => 'Поглед на картата на цел екран или вгнездено.', 'maps-googlemaps3-par-enable-fullscreen' => 'Овозможи копче за цел екран', 'validation-error-invalid-location' => 'Параметарот $1 мора да претставува важечка местоположба.', 'validation-error-invalid-locations' => 'Параметарот $1 мора да претставува една или повеќе важечки местоположби.', @@ -4876,7 +4877,7 @@ Dit kan invloed hebben op de standaardwaarde voor de geocoderingsdienst.', 'maps-displaymap-par-mappingservice' => 'Maakt het mogelijk om de kaartdienst in te stellen die wordt gebruikt om de kaart te maken.', 'maps-displaymap-par-coordinates' => 'De locatie die zich bij de eerste keer laden in het centrum van de kaart bevindt.', - 'maps-displaymap-par-visitedicon' => 'De locatie van een bestand om te gebruiken als bezocht pictogram', # Fuzzy + 'maps-displaymap-par-visitedicon' => 'De naam van een te gebruiken afbeeldingen voor markeericonen nadat ze zijn aangeklikt', 'maps-displaymap-par-zoom' => 'Maakt het mogelijk het schaalniveau van de kaart in te stellen. Als deze waarde niet wordt ingesteld en er staan meerdere markers op de kaart, dan wordt het best passende schaalniveau gekozen, niet het instelbare standaardniveau.', 'maps-displaymap-par-centre' => 'Maakt het mogelijk de coördinaten voor het midden van de kaart in te stellen voor display_point(s). @@ -6171,7 +6172,7 @@ 'maps-load-failed' => 'Zemljevid ni bilo mogoče naložiti.', 'maps-kml-parsing-failed' => 'Razčlenjevanje ene ali več datotek KML ni uspelo. Navadno je vzrok neuspešen priklic ali slabo oblikovan XML.', 'maps-fullscreen-button' => 'Vklopi celozaslonski prikaz', - 'maps-fullscreen-button-tooltip' => 'Celozaslonski/vključeni prikaz zemljevida.', + 'maps-fullscreen-button-tooltip' => 'Celozaslonski/vključeni prikaz zemljevida.', # Fuzzy 'maps-googlemaps3-par-enable-fullscreen' => 'Omogoči gumb za celozaslonski prikaz', 'maps-abb-north' => 'S', 'maps-abb-east' => 'V', @@ -6765,7 +6766,7 @@ 'maps-displaymap-par-static' => 'Якщо карта повинна бути нерухомою', 'maps-displaymap-par-wmsoverlay' => 'Використовувати накладення WMS', 'maps-fullscreen-button' => 'Перемкнути повноекранний режим', - 'maps-fullscreen-button-tooltip' => 'Переглянути мапу на весь екран/як вбудовану.', + 'maps-fullscreen-button-tooltip' => 'Переглянути мапу на весь екран або як вбудовану.', 'maps-googlemaps3-par-enable-fullscreen' => 'Увімкнути кнопку повноекранного режиму', 'validation-error-invalid-location' => 'Параметр $1 повинен бути коректним місцем розташування.', 'validation-error-invalid-locations' => 'Параметр $1 повинен бути одним або більше коректних місць розташування.', @@ -7056,6 +7057,7 @@ * @author Hydra * @author Hzy980512 * @author Kuailong + * @author Liuxinyu970226 * @author PhiLiP * @author Xiaomingyan * @author Yfdyh000 @@ -7077,6 +7079,7 @@ 'maps-error-invalid-layerdef' => '这一层定义不是有效的。', 'maps-finddestination-par-location' => '初始位置。', 'maps-finddestination-par-bearing' => '最初的影响。', + 'maps-fullscreen-button' => '切换全屏显示', 'maps-googlemaps3-par-enable-fullscreen' => '启用全屏按钮', 'validation-error-invalid-location' => '参数 $1 必须是一个有效的位置。', 'validation-error-invalid-locations' => '参数 $1 必须有一个或多个有效的位置。', @@ -7095,12 +7098,15 @@ 'maps-latitude' => '纬度:', 'maps-longitude' => '经度:', 'maps_map_cannot_be_displayed' => '该地图无法显示。', + 'maps_click_to_activate' => '点击激活地图', + 'maps-googlemaps3-incompatbrowser' => '您的浏览器不兼容Google Maps v3。', 'maps-osm-par-thumbs' => '显示大拇指', 'maps-osm-par-photos' => '显示图片', 'mapeditor' => '地图编辑器', 'specialpages-group-maps' => '地图', 'mapeditor-none-text' => '无', 'mapeditor-done-button' => '完成', + 'mapeditor-remove-button' => '移除', 'mapeditor-import-button2' => '汇入', 'mapeditor-export-button' => '汇出到 wiki 代码', 'mapeditor-form-title' => '编辑详情', @@ -7139,7 +7145,7 @@ 'maps-finddestination-par-location' => '初始位置。', 'maps-finddestination-par-bearing' => '最初的影響。', 'maps-fullscreen-button' => '切換全螢幕', - 'maps-fullscreen-button-tooltip' => '檢視地圖使用全螢幕或嵌入式', + 'maps-fullscreen-button-tooltip' => '檢視地圖使用全螢幕或嵌入式', # Fuzzy 'maps-googlemaps3-par-enable-fullscreen' => '開啟全螢幕的按鈕', 'validation-error-invalid-location' => '參數 $1 必須是一個有效的位置。', 'validation-error-invalid-locations' => '參數 $1 必須有一個或多個有效的位置。', From 6e4aa00f54af2dd0f9f847d78a54730f6fdbdea7 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Mon, 7 Oct 2013 14:08:25 +0000 Subject: [PATCH 023/163] Localisation updates from http://translatewiki.net. Change-Id: Iea4e817e8ad4e099e686bd90454be7d11d425444 --- Maps.i18n.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index 35c8e3700..c8069cacb 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -3805,6 +3805,7 @@ ); /** Korean (한국어) + * @author Hym411 * @author 아라 */ $messages['ko'] = array( @@ -3892,6 +3893,7 @@ 'maps-displaymap-par-rectangles' => '보려줄 네모', 'maps-displaymap-par-static' => '지도는 정적이어야 할 때', 'maps-displaymap-par-wmsoverlay' => 'WMS 오버레이 사용', + 'maps-googlemaps3-par-enable-fullscreen' => '전체 화면 버튼 활성화', 'validation-error-invalid-location' => '$1 변수는 올바른 위치여야 합니다.', 'validation-error-invalid-locations' => '$1 변수는 하나 이상의 올바른 위치여야 합니다.', 'validation-error-invalid-width' => '$1 변수는 올바른 너비여야 합니다.', From 2e772952d4cc53caf6d7e84c6565178fabf7112c Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Tue, 8 Oct 2013 00:55:56 +0000 Subject: [PATCH 024/163] Localisation updates from http://translatewiki.net. Change-Id: I896488c51eb13769ca0284e87b773f159b76d2a6 --- Maps.i18n.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index c8069cacb..ad5dc2fa7 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -1024,6 +1024,7 @@ 'maps-displaymap-par-maxzoom' => 'Live zoum uhelañ', 'maps-displaymap-par-minzoom' => 'Live zoum izelañ', 'maps-displaymap-par-polygons' => 'Lieskornegoù da ziskwel', + 'maps-fullscreen-button' => 'Gweredekaat ar skramm leun', 'validation-error-invalid-location' => "Rankout a ra an arventenn $1 bezañ evit ul lec'hiadur reizh.", 'validation-error-invalid-locations' => "Rankout a ra an arventenn $1 bezañ evit ul lec'hiadur reizh, da nebeutañ.", 'validation-error-invalid-width' => 'Rankout a ra an arventenn $1 bezañ evit ul ledander reizh.', From 032a5118d82d0975ff963c0a5a293951a909c807 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Tue, 8 Oct 2013 19:05:46 +0000 Subject: [PATCH 025/163] Localisation updates from http://translatewiki.net. Change-Id: I42caec4e869e10754739085b5b674994c37ab490 --- Maps.i18n.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index ad5dc2fa7..7d36911ec 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -4812,6 +4812,7 @@ * @author Konovalov * @author SPQRobin * @author Siebrand + * @author Sjoerddebruin */ $messages['nl'] = array( 'maps-desc' => 'Biedt de mogelijkheid om locatiegegevens weer te geven op kaarten en adressen om te zetten naar coördinaten ([https://www.semantic-mediawiki.org/wiki/Maps meer...])', @@ -4899,6 +4900,9 @@ 'maps-displaymap-par-rectangles' => 'Weer te geven rechthoeken', 'maps-displaymap-par-static' => 'Of de kaart statisch moet zijn', 'maps-displaymap-par-wmsoverlay' => 'WMS-overlay gebruiken', + 'maps-fullscreen-button' => 'Volledig scherm in- of uitschakelen', + 'maps-fullscreen-button-tooltip' => 'De kaart als volledig scherm of ingesloten bekijken.', + 'maps-googlemaps3-par-enable-fullscreen' => 'Knop voor volledig scherm inschakelen', 'validation-error-invalid-location' => 'Parameter $1 moet een geldige locatie zijn.', 'validation-error-invalid-locations' => 'Parameter $1 moet een of meer geldige locaties zijn.', 'validation-error-invalid-width' => 'Parameter $1 moet een geldige breedte zijn.', @@ -5883,6 +5887,7 @@ * @author Lockal * @author MaxSem * @author McDutchie + * @author Okras * @author Yuriy Apostol * @author Александр Сигачёв */ @@ -5953,6 +5958,7 @@ 'maps-displaymap-par-minzoom' => 'Минимальный уровень масштабирования', 'maps-displaymap-par-static' => 'Если карта должна быть статичной', 'maps-fullscreen-button' => 'Переключить полноэкранный режим', + 'maps-googlemaps3-par-enable-fullscreen' => 'Включить кнопку полноэкранного режима', 'validation-error-invalid-location' => 'Параметр $1 должен быть корректным местоположением.', 'validation-error-invalid-locations' => 'Параметр $1 должен содержать одно или несколько корректных местоположений.', 'validation-error-invalid-width' => 'Параметр $1 должен быть корректной шириной.', From 6e7d136489df9340ee9ec878fb1731301ac92499 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Wed, 9 Oct 2013 19:37:10 +0000 Subject: [PATCH 026/163] Localisation updates from http://translatewiki.net. Change-Id: I60c3ad264c9d934d3d16f5d856ed1d0dccb9516d --- Maps.i18n.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index 7d36911ec..d9d5641e3 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -1240,9 +1240,11 @@ ); /** Danish (dansk) + * @author Christian List * @author Peter Alberti */ $messages['da'] = array( + 'maps-ns-layer' => 'Lag', 'maps-abb-north' => 'N', 'maps-abb-east' => 'Ø', 'maps-abb-south' => 'S', @@ -7068,6 +7070,7 @@ * @author Kuailong * @author Liuxinyu970226 * @author PhiLiP + * @author Qiyue2001 * @author Xiaomingyan * @author Yfdyh000 */ @@ -7088,6 +7091,14 @@ 'maps-error-invalid-layerdef' => '这一层定义不是有效的。', 'maps-finddestination-par-location' => '初始位置。', 'maps-finddestination-par-bearing' => '最初的影响。', + 'maps-geodistance-par-unit' => '要输出的距离单位。', + 'maps-displaymap-par-lines' => '要显示的行', + 'maps-displaymap-par-maxzoom' => '最大缩放级别', + 'maps-displaymap-par-minzoom' => '最小缩放级别', + 'maps-displaymap-par-polygons' => '要显示的多边形', + 'maps-displaymap-par-rectangles' => '要显示的矩形', + 'maps-displaymap-par-static' => '如果地图应该是静态', + 'maps-displaymap-par-wmsoverlay' => '使用一个WMS覆盖', 'maps-fullscreen-button' => '切换全屏显示', 'maps-googlemaps3-par-enable-fullscreen' => '启用全屏按钮', 'validation-error-invalid-location' => '参数 $1 必须是一个有效的位置。', @@ -7100,6 +7111,7 @@ 'validation-error-invalid-images' => '参数 $1 必须是一个或多个有效的图像。', 'validation-error-invalid-goverlay' => '参数 $1 必须是一个有效的重叠。', 'validation-error-invalid-goverlays' => '参数 $1 必须是一个或多个有效重叠。', + 'validation-error-invalid-line-param' => '指定了无效的“线”参数。', 'maps-abb-north' => '北', 'maps-abb-east' => '东', 'maps-abb-south' => '南', @@ -7118,12 +7130,22 @@ 'mapeditor-remove-button' => '移除', 'mapeditor-import-button2' => '汇入', 'mapeditor-export-button' => '汇出到 wiki 代码', + 'mapeditor-code-title' => '维基代码', + 'mapeditor-import-title' => '导入维基代码', 'mapeditor-form-title' => '编辑详情', 'mapeditor-link-title-switcher-link-text' => '链接', 'mapeditor-form-field-title' => '标题', 'mapeditor-form-field-text' => '文字', 'mapeditor-form-field-link' => '链接', 'mapeditor-form-field-icon' => '图标', + 'mapeditor-form-field-group' => '组', + 'mapeditor-form-field-inlinelabel' => '内联标签', + 'mapeditor-form-field-strokecolor' => '描边颜色', + 'mapeditor-form-field-strokeopacity' => '描线不透明度', + 'mapeditor-form-field-strokeweight' => '描边粗细', + 'mapeditor-form-field-fillcolor' => '填充颜色', + 'mapeditor-form-field-fillopcaity' => '填充不透明度', + 'mapeditor-mapparam-title' => '编辑地图参数', 'mapeditor-form-field-image' => '图片', ); From cdc13cea2decd30b3c8461f9e903450826a22b4a Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Fri, 11 Oct 2013 19:10:40 +0000 Subject: [PATCH 027/163] Localisation updates from http://translatewiki.net. Change-Id: I9a0bb9c1bf980e0b25a55a83ca2ad783777e5461 --- Maps.i18n.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index d9d5641e3..eacfa0523 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -1155,6 +1155,8 @@ 'mapeditor-link-title-switcher-link-text' => 'Хьажориг', 'mapeditor-form-field-title' => 'ЦӀе', 'mapeditor-form-field-link' => 'Хьажориг', + 'mapeditor-form-field-image' => 'Сурт', + 'mapeditor-imageoverlay-title' => 'Сурт', ); /** Czech (česky) @@ -2537,7 +2539,7 @@ 'maps-displaymap-par-static' => 'Se o mapa debe ser estático', 'maps-displaymap-par-wmsoverlay' => 'Utilizar unha sobreposición WMS', 'maps-fullscreen-button' => 'Activar ou desactivar a pantalla completa', - 'maps-fullscreen-button-tooltip' => 'Mostrar o mapa en pantalla completa/incrustado.', # Fuzzy + 'maps-fullscreen-button-tooltip' => 'Mostrar o mapa en pantalla completa ou incrustado.', 'maps-googlemaps3-par-enable-fullscreen' => 'Activar o botón de pantalla completa', 'validation-error-invalid-location' => 'O parámetro $1 debe ser unha localización válida.', 'validation-error-invalid-locations' => 'O parámetro $1 debe ser unha ou máis localizacións válidas.', From 5497356f0a9ada4bc0e9bcbc29cb4262cda71e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20M=C3=B8lster=20Lidal?= Date: Fri, 5 Oct 2012 13:08:01 +0200 Subject: [PATCH 028/163] Rescale map after adding markers with labels Markers with labels are added through callback to mw.loader. Which means that they are not available when the map is scaled to show all markers. Therefore I have extracted the rescaling code into two functions (getBounds and setZoom) which can be called at the original location for this code and after adding marker with label. Split into two functions as code for centering the map also needs the bounds object. This commit was merged in Oct 2012, but for some reason it doesn't exist on master (or 3.0.x), so I'm submitting it again Fixes bug 40791 Change-Id: I61dbd498461c82fc04d622b5a2f7937d7f660af9 --- .../services/GoogleMaps3/jquery.googlemap.js | 42 ++++++++++++------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/includes/services/GoogleMaps3/jquery.googlemap.js b/includes/services/GoogleMaps3/jquery.googlemap.js index c90b9a150..188949e09 100644 --- a/includes/services/GoogleMaps3/jquery.googlemap.js +++ b/includes/services/GoogleMaps3/jquery.googlemap.js @@ -51,6 +51,28 @@ this.imageoverlays = []; + var getBounds = function() { + if (( options.centre === false || options.zoom === false ) && options.locations.length > 1) { + bounds = new google.maps.LatLngBounds(); + + for (var i = _this.markers.length - 1; i >= 0; i--) { + bounds.extend(_this.markers[i].getPosition()); + } + return bounds; + } + return null; + }; + + var setZoom = function(bounds) { + if (options.zoom === false) { + _this.map.fitBounds(bounds); + } + else { + _this.map.setZoom(options.zoom); + } + }; + + /** * Creates a new marker with the provided data, * adds it to the map, and returns it. @@ -111,7 +133,8 @@ 'ext.maps.gm3.markerwithlabel', function() { marker = new MarkerWithLabel( markerOptions ); - return addToMapAndHandlers( marker ); + addToMapAndHandlers( marker ); + setZoom(getBounds()); } ); } @@ -501,22 +524,9 @@ layer.setMap(map); } - var bounds; - - if (( options.centre === false || options.zoom === false ) && options.locations.length > 1) { - bounds = new google.maps.LatLngBounds(); + var bounds = getBounds(); - for (var i = this.markers.length - 1; i >= 0; i--) { - bounds.extend(this.markers[i].getPosition()); - } - } - - if (options.zoom === false) { - map.fitBounds(bounds); - } - else { - map.setZoom(options.zoom); - } + setZoom(bounds); var centre; From 8fd92a2aa6c82dda0133d372a7b2dd149cbe1694 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Tue, 22 Oct 2013 19:19:44 +0000 Subject: [PATCH 029/163] Localisation updates from http://translatewiki.net. Change-Id: I71ba926c4c500727c5cd54d007ffd23099e118cb --- Maps.i18n.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index eacfa0523..7705aada5 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -938,8 +938,10 @@ 'maps-latitude' => 'Географска ширина:', 'maps-longitude' => 'Географска дължина:', 'maps-googlemaps3-incompatbrowser' => 'Вашият браузър не е съвместим с Google Maps v3.', + 'mapeditor-done-button' => 'Готово', 'mapeditor-remove-button' => 'Премахване', 'mapeditor-import-button2' => 'Внасяне', + 'mapeditor-code-title' => 'Уики код', 'mapeditor-link-title-switcher-link-text' => 'Препратка', 'mapeditor-form-field-title' => 'Заглавие', 'mapeditor-form-field-text' => 'Текст', From 9e652b732bfcf22d4ac6d0a2a8d061826da0ed6f Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Thu, 24 Oct 2013 20:48:18 +0000 Subject: [PATCH 030/163] Localisation updates from http://translatewiki.net. Change-Id: I3b7ec377edabf7129a0bfe4f149e714d5be74006 --- Maps.i18n.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index 7705aada5..88e248139 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -6331,6 +6331,7 @@ 'maps_centred_on' => 'Karta centrerad på $1, $2.', 'maps-par-centre' => 'Platsen där kartan ska vara centrerad', 'maps-googlemaps3-incompatbrowser' => 'Din webbläsare är inte kompatibel med Google Maps v3.', + 'maps-googlemaps3-par-type' => 'Karttyp att visa initialt', 'maps-googlemaps3-par-controls' => 'Kontroller att placera på kartan.', 'maps-googlemaps3-par-autoinfowindows' => 'Öppna automatiskt alla informationsfönster när sidan har lästs in.', 'maps-googlemaps3-par-kml' => 'KML-filer att ladda upp på kartan.', From 4559162b894ceaffac1286279e8ea9102d3ecd84 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Fri, 25 Oct 2013 18:58:19 +0000 Subject: [PATCH 031/163] Localisation updates from http://translatewiki.net. Change-Id: Ief920bc927036dca42cfc904650d921e61f4a964 --- Maps.i18n.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index 88e248139..72ac9afaa 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -1154,9 +1154,9 @@ */ $messages['ce'] = array( 'maps-layer-value' => 'МаьӀна', - 'mapeditor-link-title-switcher-link-text' => 'Хьажориг', + 'mapeditor-link-title-switcher-link-text' => 'Хьажораг', 'mapeditor-form-field-title' => 'ЦӀе', - 'mapeditor-form-field-link' => 'Хьажориг', + 'mapeditor-form-field-link' => 'Хьажораг', 'mapeditor-form-field-image' => 'Сурт', 'mapeditor-imageoverlay-title' => 'Сурт', ); From a40391865770e919b595d3558a5c809f7a83538d Mon Sep 17 00:00:00 2001 From: Ike Hecht Date: Sun, 27 Oct 2013 14:10:12 -0700 Subject: [PATCH 032/163] Added geocoder.us geocoding service Change-Id: I22926c7b66046146e5723e583b0698ea4059f750 --- Maps.classes.php | 1 + Maps.php | 3 + Maps_Settings.php | 1 + .../geocoders/Maps_GeocoderusGeocoder.php | 62 +++++++++++++++++++ 4 files changed, 67 insertions(+) create mode 100644 includes/geocoders/Maps_GeocoderusGeocoder.php diff --git a/Maps.classes.php b/Maps.classes.php index 248e640d2..1ddb3254b 100644 --- a/Maps.classes.php +++ b/Maps.classes.php @@ -49,6 +49,7 @@ $classes['MapsGeonamesGeocoder'] = __DIR__ . '/includes/geocoders/Maps_GeonamesGeocoder.php'; $classes['MapsGoogleGeocoder'] = __DIR__ . '/includes/geocoders/Maps_GoogleGeocoder.php'; +$classes['MapsGeocoderusGeocoder'] = __DIR__ . '/includes/geocoders/Maps_GeocoderusGeocoder.php'; $classes['SpecialMapEditor'] = __DIR__ . '/includes/specials/SpecialMapEditor.php'; diff --git a/Maps.php b/Maps.php index 1c48a53c3..f596d3d2f 100644 --- a/Maps.php +++ b/Maps.php @@ -210,6 +210,9 @@ // Registration of the Google Geocoding (v2) service geocoder. $wgHooks['GeocoderFirstCallInit'][] = 'MapsGoogleGeocoder::register'; + // Registration of the geocoder.us service geocoder. + $wgHooks['GeocoderFirstCallInit'][] = 'MapsGeocoderusGeocoder::register'; + // Layers // Registration of the image layer type. diff --git a/Maps_Settings.php b/Maps_Settings.php index 3543ff834..bc69a91cd 100644 --- a/Maps_Settings.php +++ b/Maps_Settings.php @@ -62,6 +62,7 @@ $egMapsAvailableGeoServices = array( 'geonames', 'google', + 'geocoderus', ); // String. The default geocoding service, which will be used when no service is diff --git a/includes/geocoders/Maps_GeocoderusGeocoder.php b/includes/geocoders/Maps_GeocoderusGeocoder.php new file mode 100644 index 000000000..4469cb1da --- /dev/null +++ b/includes/geocoders/Maps_GeocoderusGeocoder.php @@ -0,0 +1,62 @@ +=5.3 becomes acceptable. + * + * @since 3.0 + */ + public static function register() { + \Maps\Geocoders::registerGeocoder( 'geocoderus', __CLASS__ ); + return true; + } + + /** + * @see \Maps\Geocoder::getRequestUrl + * + * @since 3.0 + * + * @param string $address + * + * @return string + */ + protected function getRequestUrl( $address ) { + return 'http://geocoder.us/service/rest/?address=' . urlencode( $address ); + } + + /** + * @see \Maps\Geocoder::parseResponse + * + * @since 3.0 + * + * @param string $address + * + * @return array + */ + protected function parseResponse( $response ) { + $lon = self::getXmlElementValue( $response, 'geo:long' ); + $lat = self::getXmlElementValue( $response, 'geo:lat' ); + + // In case one of the values is not found, return false. + if ( !$lon || !$lat ) return false; + + return array( + 'lat' => (float)$lat, + 'lon' => (float)$lon + ); + } +} From bde4d7876530085d2dbad36a008ed52ddef810b1 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Mon, 28 Oct 2013 20:11:14 +0000 Subject: [PATCH 033/163] Localisation updates from http://translatewiki.net. Change-Id: I02a670fef1becbecdc889f71c96640b83473509b --- Maps.i18n.magic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maps.i18n.magic.php b/Maps.i18n.magic.php index 9173d13bd..d5cf7a561 100644 --- a/Maps.i18n.magic.php +++ b/Maps.i18n.magic.php @@ -348,6 +348,6 @@ /** Vietnamese (Tiếng Việt) */ $magicWords['vi'] = array( - 'geocode' => array( 0, 'mãhóađịalý', 'mãhoáđịalý', 'mãhóađịalí', 'mãhoáđịalí' ), - 'coordinates' => array( 0, 'tọađộ' ), + 'geocode' => array( 0, 'mã_hóa_địa_lý', 'mãhóađịalý', 'mã_hoá_địa_lý', 'mãhoáđịalý', 'mã_hóa_địa_lí', 'mãhóađịalí', 'mã_hoá_địa_lí', 'mãhoáđịalí' ), + 'coordinates' => array( 0, 'tọa_độ', 'tọađộ' ), ); \ No newline at end of file From 9225c72bc2aa003ae8b6dd63d80940e711549da7 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Wed, 30 Oct 2013 19:35:00 +0000 Subject: [PATCH 034/163] Localisation updates from http://translatewiki.net. Change-Id: Idabd2429eaa8276963ad73ee575780c9b828c0f0 --- Maps.i18n.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index 72ac9afaa..acd146348 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -1951,12 +1951,13 @@ ); /** Persian (فارسی) + * @author Ebraminio * @author Mjbmr * @author ZxxZxxZ */ $messages['fa'] = array( 'maps_map' => 'نقشه', - 'maps-loading-map' => 'در حال بارگذاری نقشه...', + 'maps-loading-map' => 'در حال بارگیری نقشه...', 'maps-load-failed' => 'قادر به بارگیری نقشه نبود!', 'maps-markers' => 'نشانگرها', 'maps-others' => 'دیگران', From 714368f5b5af13be2afcd8b345859919e76cae8f Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sun, 3 Nov 2013 19:56:34 +0000 Subject: [PATCH 035/163] Localisation updates from http://translatewiki.net. Change-Id: I261cd503c3a2679f8a076ac870f83b0b8e748c3e --- Maps.i18n.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index acd146348..d5700e529 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -1540,6 +1540,7 @@ ); /** Greek (Ελληνικά) + * @author Evropi * @author Glavkos * @author Omnipaedista * @author Protnet @@ -1555,6 +1556,7 @@ 'maps-copycoords-prompt' => 'CTRL+C, ENTER', 'maps-searchmarkers-text' => 'Φιλτράρισμα σημαδιών', 'maps-others' => 'άλλοι', + 'maps-ns-layer' => 'Στρώμα', 'maps-layer-property' => 'Ιδιότητα', 'maps-layer-value' => 'Τιμή', 'maps-layer-errors' => 'Σφάλματα', From 48c9abe67f119ab31e2c95b5816f68f3a78a97c9 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Thu, 7 Nov 2013 20:20:56 +0000 Subject: [PATCH 036/163] Localisation updates from http://translatewiki.net. Change-Id: Iec44aee14529f8dfc9861893c25f80691de9bc51 --- Maps.i18n.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index d5700e529..17c387001 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -5908,7 +5908,9 @@ 'maps-load-failed' => 'Невозможно загрузить карту!', 'maps-markers' => 'Отметки', 'maps-copycoords-prompt' => 'CTRL+C, ENTER', + 'maps-searchmarkers-text' => 'Маркеры фильтра', 'maps-others' => 'другие', + 'maps-kml-parsing-failed' => 'Не удалось выполнить разбор одного или нескольких KML-файлов, обычно вследствие отказа в получении или некорректного XML.', 'maps-ns-layer' => 'Слой', 'maps-ns-layer-talk' => 'Обсуждение слоя', 'maps-layer-property' => 'Свойство', @@ -5960,6 +5962,7 @@ 'maps-geodistance-par-decimals' => 'Наибольшее количество цифр в дробной части результата.', 'maps-geodistance-par-mappingservice' => 'Служба геокодирования, используемая для кодирования любого адреса.', 'maps-displaymap-par-mappingservice' => 'Позволяет выбрать сервис карт, который будет использоваться.', + 'maps-displaymap-par-coordinates' => 'Одно или несколько мест для отображения на карте. Они будут обозначаться маркером.', 'maps-displaymap-par-icon' => 'Позволяет установить значок, используемый для всех маркеров.', 'maps-displaymap-par-circles' => 'Кружки для отображения', 'maps-displaymap-par-lines' => 'Линии для отображения', @@ -5998,11 +6001,16 @@ 'maps_click_to_activate' => 'Нажмите для активации карты', 'maps_centred_on' => 'Центр карты — $1, $2.', 'maps-par-mappingservice' => 'Позволяет выбрать сервис карт, который будет использоваться.', + 'maps-par-resizable' => 'Даёт возможность изменять размер карты, потащив её за правый нижний угол.', 'maps-googlemaps3-incompatbrowser' => 'Ваш браузер несовместим с Google Maps v3.', + 'maps-googlemaps3-par-type' => 'Тип карты для начального отображения.', 'maps-googlemaps3-par-layers' => 'Специальные слои для загрузки на карту.', + 'maps-googlemaps3-par-zoomstyle' => 'Стиль элемента управления масштабом.', + 'maps-googlemaps3-par-autoinfowindows' => 'Автоматически открывает все информационные окна после загрузки страницы.', 'maps-googlemaps3-par-kml' => 'KML файлы для загрузки на карту.', 'maps-googlemaps3-par-gkml' => 'KML файлы, хранящиеся в Google для загрузки на карту.', 'maps-googlemaps3-par-poi' => 'Показать достопримечательности.', + 'maps-openlayers-par-controls' => 'Элементы управления для размещения на карте.', 'maps-osm-par-thumbs' => 'Показать превью', 'maps-osm-par-photos' => 'Показать фото', 'mapeditor' => 'Редактор карт', @@ -6014,6 +6022,7 @@ 'mapeditor-import-button2' => 'Импортировать', 'mapeditor-export-button' => 'Экспортировать в викитекст', 'mapeditor-import-button' => 'Импортировать из викитекста', + 'mapeditor-select-button' => 'Выберите этот полигон', 'mapeditor-mapparam-button' => 'Править параметры карты', 'mapeditor-clear-button' => 'Очистить карту', 'mapeditor-code-title' => 'Викитекст', From 7fd99e7c84c5aab35d8d9dd131c33ed59ef52ed0 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sat, 9 Nov 2013 19:11:43 +0000 Subject: [PATCH 037/163] Localisation updates from http://translatewiki.net. Change-Id: If7c86941e0d7ab689e76eacb71ddcd7ceb06768c --- Maps.i18n.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index 17c387001..3d4424e0d 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -6301,19 +6301,26 @@ 'maps-mapsdoc-par-language' => 'Språket som du vill visa dokumentationen i. Om det finns någon sådan översättning kommer engelska att användas istället.', 'maps-coordinates-par-location' => 'Koordinaterna du vill formatera.', 'maps-coordinates-par-format' => 'Målformatet för koordinaterna.', + 'maps-distance-par-unit' => 'Enheten för utmatning av avståndet.', 'maps-finddestination-par-location' => 'Startplats', 'maps-finddestination-par-bearing' => 'Inledande bäring.', 'maps-finddestination-par-distance' => 'Reseavståndet.', + 'maps-finddestination-par-format' => 'Formatet för utmatning av destinationen.', 'maps-finddestination-par-allowcoordinates' => 'Indikerar om koordinater bör tillåtas. Om nej anges kommer endast adresser att accepteras.', 'maps-geocode-par-location' => 'Adressen som du vill geokoda.', 'maps-geocode-par-mappingservice' => 'Geokodningstjänsten du vill använda. Se de tillgängliga geokodningtjänsterna.', 'maps-geocode-par-format' => 'Formatet för de resulterande koordinaterna.', + 'maps-geodistance-par-unit' => 'Enheten för utmatning av avståndet.', 'maps-displaymap-par-circles' => 'Cirklar att visa', 'maps-displaymap-par-lines' => 'Rader att visa', 'maps-displaymap-par-maxzoom' => 'Maximala zoomnivån', 'maps-displaymap-par-minzoom' => 'Minimala zoomnivån', 'maps-displaymap-par-polygons' => 'Polygoner att visa', 'maps-displaymap-par-rectangles' => 'Rektanglar att visa', + 'maps-displaymap-par-static' => 'Om kartan borde vara statisk', + 'maps-fullscreen-button' => 'Växla fullskärmsläge', + 'maps-fullscreen-button-tooltip' => 'Visa kartan i helskärm eller som inbäddad.', + 'maps-googlemaps3-par-enable-fullscreen' => 'Aktivera helskärmsknappen', 'validation-error-invalid-location' => 'Parameter $1 måste vara en giltig plats.', 'validation-error-invalid-locations' => 'Parameter $1 måste vara en eller flera giltiga platser.', 'validation-error-invalid-width' => 'Parameter $1 måste vara en giltig bredd.', From 96b3fb7222b8479e075ef06cd7364bc2f425df78 Mon Sep 17 00:00:00 2001 From: Wikinaut Date: Mon, 4 Nov 2013 18:17:44 +0100 Subject: [PATCH 038/163] Add a tracking category Bug: 56917 Change-Id: I228919de5c7c550ec0a6e91397475b57a5e49079 --- Maps.i18n.php | 2 ++ includes/parserhooks/Maps_DisplayMap.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index 3d4424e0d..58e281ec2 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -21,6 +21,7 @@ 'right-geocode' => 'Geocode', 'maps_map' => 'Map', + 'maps-tracking-category' => 'Pages with a map rendered by the Maps extension', 'maps-loading-map' => 'Loading map...', 'maps-load-failed' => 'Could not load the map!', 'maps-markers' => 'Markers', @@ -263,6 +264,7 @@ 'maps-desc' => '{{desc|name=Maps|url=http://www.mediawiki.org/wiki/Extension:Maps}}', 'right-geocode' => '{{doc-right|geocode}}', 'maps_map' => '{{Identical|Map}}', + 'maps-tracking-category' => 'The name of a category for all pages which use the display_map parser extension function or tag. The category is automatically added unless the feature is disabled.', 'maps-copycoords-prompt' => 'text displayed in javascript prompt to indicate first press ctrl+c to copy text, and press enter to close prompt', 'maps-others' => '{{Identical|Other}}', 'maps-kml-parsing-failed' => 'text displayed in the event of parsing failure of kml file(s).', diff --git a/includes/parserhooks/Maps_DisplayMap.php b/includes/parserhooks/Maps_DisplayMap.php index a6136d973..96ad9fd1a 100644 --- a/includes/parserhooks/Maps_DisplayMap.php +++ b/includes/parserhooks/Maps_DisplayMap.php @@ -198,11 +198,12 @@ public function render( array $parameters ) { $parameters['zoom'] = false; } + $this->parser->addTrackingCategory( 'maps-tracking-category' ); return $mapClass->renderMap( $parameters, $this->parser ); } /** - * Returns the parser function otpions. + * Returns the parser function options. * @see ParserHook::getFunctionOptions * * @since 0.7 From ea73b0c280d250e2817902d3fe82b4f7b368c66e Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 20:31:53 +0100 Subject: [PATCH 039/163] Tweaks to CoordinatesTest Change-Id: Ibc114db72238917c855d732938e7e483006ab0f6 --- tests/phpunit/parserhooks/CoordinatesTest.php | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/phpunit/parserhooks/CoordinatesTest.php b/tests/phpunit/parserhooks/CoordinatesTest.php index a26662179..f3aed1602 100644 --- a/tests/phpunit/parserhooks/CoordinatesTest.php +++ b/tests/phpunit/parserhooks/CoordinatesTest.php @@ -2,14 +2,11 @@ namespace Maps\Test; +use DataValues\LatLongValue; +use ParamProcessor\ParamDefinition; + /** - * Tests for the Maps\Coordinates class. - * - * @file - * @since 2.0 - * - * @ingroup Maps - * @ingroup Test + * @covers Maps\Coordinates * * @group Maps * @group ParserHook @@ -67,7 +64,7 @@ public function parametersProvider() { * @return array */ public function processingProvider() { - $definitions = \ParamDefinition::getCleanDefinitions( $this->getInstance()->getParamDefinitions() ); + $definitions = ParamDefinition::getCleanDefinitions( $this->getInstance()->getParamDefinitions() ); $argLists = array(); $values = array( @@ -75,7 +72,7 @@ public function processingProvider() { ); $expected = array( - 'location' => new \DataValues\LatLongValue( 4, 2 ), + 'location' => new LatLongValue( 4, 2 ), ); $argLists[] = array( $values, $expected ); @@ -87,7 +84,7 @@ public function processingProvider() { ); $expected = array( - 'location' => new \DataValues\LatLongValue( 4, 2 ), + 'location' => new LatLongValue( 4, 2 ), 'directional' => !$definitions['directional']->getDefault(), 'format' => Maps_COORDS_DD, ); @@ -101,7 +98,7 @@ public function processingProvider() { ); $expected = array( - 'location' => new \DataValues\LatLongValue( 4, 2 ), + 'location' => new LatLongValue( 4, 2 ), 'directional' => !$definitions['directional']->getDefault(), 'format' => Maps_COORDS_DD, ); From 7e7dfc96f9d5e0bd778a72ae0de627f29bc2c033 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 20:33:02 +0100 Subject: [PATCH 040/163] Doc improvements Change-Id: I1c95fcf9f5835bdc8adb7612212408682f9a053b --- tests/phpunit/parserhooks/DisplayMapTest.php | 6 ------ tests/phpunit/parserhooks/DistanceTest.php | 6 ------ tests/phpunit/parserhooks/FinddestinationTest.php | 6 ------ tests/phpunit/parserhooks/GeocodeTest.php | 6 ------ tests/phpunit/parserhooks/GeodistanceTest.php | 6 ------ tests/phpunit/parserhooks/MapsDocTest.php | 6 ------ tests/phpunit/parserhooks/ParserHookTest.php | 6 ------ tests/phpunit/parsers/DistanceParserTest.php | 6 +----- tests/phpunit/parsers/LineParserTest.php | 2 -- tests/phpunit/parsers/LocationParserTest.php | 2 -- tests/phpunit/parsers/WmsOverlayParserTest.php | 2 -- 11 files changed, 1 insertion(+), 53 deletions(-) diff --git a/tests/phpunit/parserhooks/DisplayMapTest.php b/tests/phpunit/parserhooks/DisplayMapTest.php index 8af51a7f6..fd5db4dde 100644 --- a/tests/phpunit/parserhooks/DisplayMapTest.php +++ b/tests/phpunit/parserhooks/DisplayMapTest.php @@ -7,12 +7,6 @@ /** * Tests for the Maps\DisplayMap class. * - * @file - * @since 2.0 - * - * @ingroup Maps - * @ingroup Test - * * @group Maps * @group ParserHook * @group DisplayMapTest diff --git a/tests/phpunit/parserhooks/DistanceTest.php b/tests/phpunit/parserhooks/DistanceTest.php index fccf41766..8330e6437 100644 --- a/tests/phpunit/parserhooks/DistanceTest.php +++ b/tests/phpunit/parserhooks/DistanceTest.php @@ -5,12 +5,6 @@ /** * Tests for the Maps\Distance class. * - * @file - * @since 2.0 - * - * @ingroup Maps - * @ingroup Test - * * @group Maps * @group ParserHook * @group MapsDistanceTest diff --git a/tests/phpunit/parserhooks/FinddestinationTest.php b/tests/phpunit/parserhooks/FinddestinationTest.php index 49d76134d..da0aa2a21 100644 --- a/tests/phpunit/parserhooks/FinddestinationTest.php +++ b/tests/phpunit/parserhooks/FinddestinationTest.php @@ -7,12 +7,6 @@ /** * Tests for the Maps\Finddestination class. * - * @file - * @since 2.0 - * - * @ingroup Maps - * @ingroup Test - * * @group Maps * @group ParserHook * @group MapsFinddestinationTest diff --git a/tests/phpunit/parserhooks/GeocodeTest.php b/tests/phpunit/parserhooks/GeocodeTest.php index f720a422e..dfb914e42 100644 --- a/tests/phpunit/parserhooks/GeocodeTest.php +++ b/tests/phpunit/parserhooks/GeocodeTest.php @@ -7,12 +7,6 @@ /** * Tests for the Maps\Geocode class. * - * @file - * @since 2.0 - * - * @ingroup Maps - * @ingroup Test - * * @group Maps * @group ParserHook * diff --git a/tests/phpunit/parserhooks/GeodistanceTest.php b/tests/phpunit/parserhooks/GeodistanceTest.php index 3cf612f4e..ed8ac3cc8 100644 --- a/tests/phpunit/parserhooks/GeodistanceTest.php +++ b/tests/phpunit/parserhooks/GeodistanceTest.php @@ -8,12 +8,6 @@ /** * Tests for the Maps\Geodistance class. * - * @file - * @since 2.0 - * - * @ingroup Maps - * @ingroup Test - * * @group Maps * @group ParserHook * @group GeodistanceTest diff --git a/tests/phpunit/parserhooks/MapsDocTest.php b/tests/phpunit/parserhooks/MapsDocTest.php index 8285aa028..d46982b7e 100644 --- a/tests/phpunit/parserhooks/MapsDocTest.php +++ b/tests/phpunit/parserhooks/MapsDocTest.php @@ -5,12 +5,6 @@ /** * Tests for the Maps\MapsDoc class. * - * @file - * @since 2.0 - * - * @ingroup Maps - * @ingroup Test - * * @group Maps * @group ParserHook * diff --git a/tests/phpunit/parserhooks/ParserHookTest.php b/tests/phpunit/parserhooks/ParserHookTest.php index c7b6ac2ac..3a765596b 100644 --- a/tests/phpunit/parserhooks/ParserHookTest.php +++ b/tests/phpunit/parserhooks/ParserHookTest.php @@ -5,12 +5,6 @@ /** * Tests for the MapsCoordinates class. * - * @file - * @since 2.0 - * - * @ingroup Maps - * @ingroup Test - * * @group Maps * @group ParserHook * diff --git a/tests/phpunit/parsers/DistanceParserTest.php b/tests/phpunit/parsers/DistanceParserTest.php index 2caccefd8..c6b11922c 100644 --- a/tests/phpunit/parsers/DistanceParserTest.php +++ b/tests/phpunit/parsers/DistanceParserTest.php @@ -3,11 +3,7 @@ namespace Maps\Test; /** - * Unit tests for the Maps\DistanceParser class. - * - * @since 3.0 - * - * @ingroup MapsTest + * @covers Maps\DistanceParser * * @group ValueParsers * @group Maps diff --git a/tests/phpunit/parsers/LineParserTest.php b/tests/phpunit/parsers/LineParserTest.php index 0cdcbfa7f..ffe3e171a 100644 --- a/tests/phpunit/parsers/LineParserTest.php +++ b/tests/phpunit/parsers/LineParserTest.php @@ -8,8 +8,6 @@ /** * @covers Maps\LineParser * - * @since 3.0 - * * @group ValueParsers * @group Maps * @group LineParserTest diff --git a/tests/phpunit/parsers/LocationParserTest.php b/tests/phpunit/parsers/LocationParserTest.php index c16cdc3c6..40fd7da8a 100644 --- a/tests/phpunit/parsers/LocationParserTest.php +++ b/tests/phpunit/parsers/LocationParserTest.php @@ -8,8 +8,6 @@ /** * @covers Maps\LocationParser * - * @since 3.0 - * * @group ValueParsers * @group Maps * @group LocationParserTest diff --git a/tests/phpunit/parsers/WmsOverlayParserTest.php b/tests/phpunit/parsers/WmsOverlayParserTest.php index 980beb778..3fdb45e3e 100644 --- a/tests/phpunit/parsers/WmsOverlayParserTest.php +++ b/tests/phpunit/parsers/WmsOverlayParserTest.php @@ -7,8 +7,6 @@ /** * @covers Maps\WmsOverlayParser * - * @since 3.0 - * * @group ValueParsers * @group Maps * @group WmsOverlayParserTest From 61bf3c57f743bf5fa51d4b92fd03a693d8125ba3 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 20:43:31 +0100 Subject: [PATCH 041/163] Remove clutter docs Change-Id: Id85a53f98e9faf6c1cd25cca8c73a9b5825848a2 --- Maps.hooks.php | 3 --- Maps.i18n.magic.php | 4 +--- Maps.i18n.php | 3 --- Maps.php | 3 --- Maps.resources.php | 3 --- Maps_Settings.php | 3 --- includes/Element.php | 1 - includes/Elements/BaseElement.php | 1 - includes/Elements/Circle.php | 1 - includes/Elements/ImageOverlay.php | 1 - includes/Elements/Line.php | 1 - includes/Elements/Polygon.php | 1 - includes/Elements/Rectangle.php | 1 - includes/Geocoder.php | 3 --- includes/Geocoders.php | 3 --- includes/Maps_BaseFillableElement.php | 1 + includes/Maps_BaseStrokableElement.php | 3 --- includes/Maps_DisplayMapRenderer.php | 3 --- includes/Maps_DistanceParser.php | 3 --- includes/Maps_GeoFunctions.php | 3 --- includes/Maps_Layer.php | 3 --- includes/Maps_LayerPage.php | 3 --- includes/Maps_Layers.php | 3 --- includes/Maps_Mapper.php | 1 - includes/Maps_MappingService.php | 3 --- includes/ServiceParam.php | 3 --- includes/api/ApiGeocode.php | 1 - includes/editor/MapEditorHTML.php | 3 --- includes/ext.maps.common.js | 3 +-- includes/ext.maps.coord.js | 3 +-- includes/geocoders/Maps_GeocoderusGeocoder.php | 5 ----- includes/geocoders/Maps_GeonamesGeocoder.php | 3 --- includes/geocoders/Maps_GoogleGeocoder.php | 4 ---- includes/iMappingService.php | 3 --- includes/parserhooks/Maps_Coordinates.php | 3 --- includes/parserhooks/Maps_DisplayMap.php | 3 --- includes/parserhooks/Maps_Distance.php | 3 --- includes/parserhooks/Maps_Finddestination.php | 3 --- includes/parserhooks/Maps_Geocode.php | 3 --- includes/parserhooks/Maps_Geodistance.php | 3 --- includes/parserhooks/Maps_MapsDoc.php | 3 --- includes/services/GoogleMaps3/GoogleMaps3.php | 4 ---- includes/services/GoogleMaps3/Maps_GoogleMaps3.php | 3 --- includes/services/Leaflet/Leaflet.php | 4 ---- includes/services/Leaflet/Maps_Leaflet.php | 3 --- includes/services/OpenLayers/Maps_OpenLayers.php | 3 --- includes/services/OpenLayers/OpenLayers.php | 4 ---- includes/specials/SpecialMapEditor.php | 3 --- tests/bootstrap.php | 3 --- tests/phpunit/MapsDistanceParserTest.php | 6 +----- 50 files changed, 5 insertions(+), 135 deletions(-) diff --git a/Maps.hooks.php b/Maps.hooks.php index 0651be3e5..e1f6036e0 100644 --- a/Maps.hooks.php +++ b/Maps.hooks.php @@ -5,9 +5,6 @@ * * @since 0.7 * - * @file Maps.hooks.php - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/Maps.i18n.magic.php b/Maps.i18n.magic.php index d5cf7a561..526225d2f 100644 --- a/Maps.i18n.magic.php +++ b/Maps.i18n.magic.php @@ -1,9 +1,7 @@ */ diff --git a/Maps.resources.php b/Maps.resources.php index f2b8211fe..b5f3bfa0f 100644 --- a/Maps.resources.php +++ b/Maps.resources.php @@ -5,9 +5,6 @@ * * @since 3.0 * - * @file - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > * diff --git a/Maps_Settings.php b/Maps_Settings.php index bc69a91cd..046965ed1 100644 --- a/Maps_Settings.php +++ b/Maps_Settings.php @@ -7,9 +7,6 @@ * Changing one of these settings can be done by copieng or cutting it, * and placing it in LocalSettings.php, AFTER the inclusion of Maps. * - * @file Maps_Settings.php - * @ingroup Maps - * * @author Jeroen De Dauw * * TODO: clean up, update docs diff --git a/includes/Element.php b/includes/Element.php index 670b59799..2725a6c47 100644 --- a/includes/Element.php +++ b/includes/Element.php @@ -9,7 +9,6 @@ * * @since 3.0 * - * @ingroup Maps * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > diff --git a/includes/Elements/BaseElement.php b/includes/Elements/BaseElement.php index 776165115..5e7935f8f 100644 --- a/includes/Elements/BaseElement.php +++ b/includes/Elements/BaseElement.php @@ -10,7 +10,6 @@ * * @since 3.0 * - * @ingroup Maps * * @licence GNU GPL v2+ * @author Kim Eik < kim@heldig.org > diff --git a/includes/Elements/Circle.php b/includes/Elements/Circle.php index b965860f8..d70ffa0de 100644 --- a/includes/Elements/Circle.php +++ b/includes/Elements/Circle.php @@ -7,7 +7,6 @@ /** * @since 3.0 * - * @ingroup Maps * * @licence GNU GPL v2+ * @author Kim Eik < kim@heldig.org > diff --git a/includes/Elements/ImageOverlay.php b/includes/Elements/ImageOverlay.php index 69e427a26..8eaf15403 100644 --- a/includes/Elements/ImageOverlay.php +++ b/includes/Elements/ImageOverlay.php @@ -7,7 +7,6 @@ /** * @since 3.0 * - * @ingroup Maps * * @licence GNU GPL v2+ * @author Kim Eik < kim@heldig.org > diff --git a/includes/Elements/Line.php b/includes/Elements/Line.php index e7b0b1f28..6bbb6d143 100644 --- a/includes/Elements/Line.php +++ b/includes/Elements/Line.php @@ -10,7 +10,6 @@ * * @since 3.0 * - * @ingroup Maps * * @licence GNU GPL v2+ * @author Kim Eik < kim@heldig.org > diff --git a/includes/Elements/Polygon.php b/includes/Elements/Polygon.php index 2f28b55d5..7a6ecf87b 100644 --- a/includes/Elements/Polygon.php +++ b/includes/Elements/Polygon.php @@ -7,7 +7,6 @@ /** * @since 3.0 * - * @ingroup Maps * * @licence GNU GPL v2+ * @author Kim Eik < kim@heldig.org > diff --git a/includes/Elements/Rectangle.php b/includes/Elements/Rectangle.php index a1d891a7a..414add2f3 100644 --- a/includes/Elements/Rectangle.php +++ b/includes/Elements/Rectangle.php @@ -7,7 +7,6 @@ /** * @since 3.0 * - * @ingroup Maps * * @licence GNU GPL v2+ * @author Kim Eik < kim@heldig.org > diff --git a/includes/Geocoder.php b/includes/Geocoder.php index d34549932..c93aaf829 100644 --- a/includes/Geocoder.php +++ b/includes/Geocoder.php @@ -7,9 +7,6 @@ * * @since 0.7 * - * @file Maps_Geocoder.php - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/Geocoders.php b/includes/Geocoders.php index 8d063e618..cbf6635e0 100644 --- a/includes/Geocoders.php +++ b/includes/Geocoders.php @@ -12,9 +12,6 @@ * FIXME: this is procedural spaghetti * * @since 0.4 - * - * @file Maps_Geocoders.php - * @ingroup Maps * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > diff --git a/includes/Maps_BaseFillableElement.php b/includes/Maps_BaseFillableElement.php index df9da0af4..09bbffc5a 100644 --- a/includes/Maps_BaseFillableElement.php +++ b/includes/Maps_BaseFillableElement.php @@ -1,4 +1,5 @@ */ diff --git a/includes/Maps_DisplayMapRenderer.php b/includes/Maps_DisplayMapRenderer.php index 96e1d5890..70b7f969a 100644 --- a/includes/Maps_DisplayMapRenderer.php +++ b/includes/Maps_DisplayMapRenderer.php @@ -5,9 +5,6 @@ /** * Class handling the #display_map rendering. * - * @file - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > * @author Kim Eik diff --git a/includes/Maps_DistanceParser.php b/includes/Maps_DistanceParser.php index 9e3e5207f..d3b906295 100644 --- a/includes/Maps_DistanceParser.php +++ b/includes/Maps_DistanceParser.php @@ -5,9 +5,6 @@ * * TODO: migrate to DataValue, ValueParser and ValueFormatter * - * @file Maps_DistanceParser.php - * @ingroup Maps - * * @since 0.6 * * @licence GNU GPL v2+ diff --git a/includes/Maps_GeoFunctions.php b/includes/Maps_GeoFunctions.php index 7d8aa89cf..e439b4e05 100644 --- a/includes/Maps_GeoFunctions.php +++ b/includes/Maps_GeoFunctions.php @@ -9,9 +9,6 @@ * Static class containing geographical functions. * * @since 0.6 - * - * @file Maps_GeoFunctions.php - * @ingroup Maps * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > diff --git a/includes/Maps_Layer.php b/includes/Maps_Layer.php index 56a379c80..b9306e555 100644 --- a/includes/Maps_Layer.php +++ b/includes/Maps_Layer.php @@ -4,9 +4,6 @@ * Class for describing map layers. * * @since 0.7.1 - * - * @file Maps_Layer.php - * @ingroup Maps * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > diff --git a/includes/Maps_LayerPage.php b/includes/Maps_LayerPage.php index a2049ece4..fd0712da7 100644 --- a/includes/Maps_LayerPage.php +++ b/includes/Maps_LayerPage.php @@ -4,9 +4,6 @@ * Special handling for image description pages * * @since 0.7.1 - * - * @file Maps_LayerPage.php - * @ingroup Maps * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > diff --git a/includes/Maps_Layers.php b/includes/Maps_Layers.php index 8b38c9e01..41ddeb546 100644 --- a/includes/Maps_Layers.php +++ b/includes/Maps_Layers.php @@ -4,9 +4,6 @@ * Static class for layer functionality. * * @since 0.7.2 - * - * @file Maps_Layers.php - * @ingroup Maps * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > diff --git a/includes/Maps_Mapper.php b/includes/Maps_Mapper.php index 487408dac..c9700d2c7 100644 --- a/includes/Maps_Mapper.php +++ b/includes/Maps_Mapper.php @@ -5,7 +5,6 @@ * * @since 0.1 * - * @ingroup Maps * @deprecated * * @licence GNU GPL v2+ diff --git a/includes/Maps_MappingService.php b/includes/Maps_MappingService.php index 0dbaa6837..365d6925d 100644 --- a/includes/Maps_MappingService.php +++ b/includes/Maps_MappingService.php @@ -6,9 +6,6 @@ * * @since 0.6.3 * - * @file Maps_MappingService.php - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/ServiceParam.php b/includes/ServiceParam.php index 483ea5272..cd8b09f1c 100644 --- a/includes/ServiceParam.php +++ b/includes/ServiceParam.php @@ -10,11 +10,8 @@ /** * Parameter definition for mapping service parameters. * - * @file * @since 2.0 * - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/api/ApiGeocode.php b/includes/api/ApiGeocode.php index dbd33a687..66415017e 100644 --- a/includes/api/ApiGeocode.php +++ b/includes/api/ApiGeocode.php @@ -9,7 +9,6 @@ * * @since 1.0.3 * - * @ingroup Maps * @ingroup API * * @licence GNU GPL v2++ diff --git a/includes/editor/MapEditorHTML.php b/includes/editor/MapEditorHTML.php index 29efdc2e3..21aa70397 100644 --- a/includes/editor/MapEditorHTML.php +++ b/includes/editor/MapEditorHTML.php @@ -5,9 +5,6 @@ * * @since 2.1 * - * @file MapEditorHTML.php - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Nischayn22 */ diff --git a/includes/ext.maps.common.js b/includes/ext.maps.common.js index 2dab2a49d..f61da8854 100644 --- a/includes/ext.maps.common.js +++ b/includes/ext.maps.common.js @@ -3,8 +3,7 @@ * @see http://www.mediawiki.org/wiki/Extension:Maps * * @since 1.0 - * @ingroup Maps - * + * * @licence GNU GPL v2++ * @author Jeroen De Dauw */ diff --git a/includes/ext.maps.coord.js b/includes/ext.maps.coord.js index d568f67f9..729281ae5 100644 --- a/includes/ext.maps.coord.js +++ b/includes/ext.maps.coord.js @@ -3,8 +3,7 @@ * @see http://www.mediawiki.org/wiki/Extension:Maps * * @since 1.0 - * @ingroup Maps - * + * * @licence GNU GPL v2++ * @author Jeroen De Dauw */ diff --git a/includes/geocoders/Maps_GeocoderusGeocoder.php b/includes/geocoders/Maps_GeocoderusGeocoder.php index 4469cb1da..825e05e3a 100644 --- a/includes/geocoders/Maps_GeocoderusGeocoder.php +++ b/includes/geocoders/Maps_GeocoderusGeocoder.php @@ -3,11 +3,6 @@ /** * Class for geocoding requests with geocoder.us Service. * - * - * @file Maps_GeocoderusGeocoder.php - * @ingroup Maps - * @ingroup Geocoders - * * @licence GNU GPL v2+ */ final class MapsGeocoderusGeocoder extends \Maps\Geocoder { diff --git a/includes/geocoders/Maps_GeonamesGeocoder.php b/includes/geocoders/Maps_GeonamesGeocoder.php index 69450740b..5fd8b85a5 100644 --- a/includes/geocoders/Maps_GeonamesGeocoder.php +++ b/includes/geocoders/Maps_GeonamesGeocoder.php @@ -4,9 +4,6 @@ * Class for geocoding requests with the GeoNames webservice. * * @since 1.0 - * @file Maps_GeonamesGeocoder.php - * @ingroup Maps - * @ingroup Geocoders * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > diff --git a/includes/geocoders/Maps_GoogleGeocoder.php b/includes/geocoders/Maps_GoogleGeocoder.php index 58dcbe0c0..d73347a19 100644 --- a/includes/geocoders/Maps_GoogleGeocoder.php +++ b/includes/geocoders/Maps_GoogleGeocoder.php @@ -5,10 +5,6 @@ * * Webservice documentation: http://code.google.com/apis/maps/documentation/geocoding/ * - * @file Maps_GoogleGeocoder.php - * @ingroup Maps - * @ingroup Geocoders - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > * @author Sergey Chernyshev diff --git a/includes/iMappingService.php b/includes/iMappingService.php index ec8987200..6f4c2ac45 100644 --- a/includes/iMappingService.php +++ b/includes/iMappingService.php @@ -4,9 +4,6 @@ * Interface that should be implemented by all mapping feature classes. * * @since 0.6.3 - * - * @file iMappingService.php - * @ingroup Maps * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > diff --git a/includes/parserhooks/Maps_Coordinates.php b/includes/parserhooks/Maps_Coordinates.php index 3e1c38bc7..f37acf590 100644 --- a/includes/parserhooks/Maps_Coordinates.php +++ b/includes/parserhooks/Maps_Coordinates.php @@ -6,9 +6,6 @@ * * @since 0.7 * - * @file Maps_Coordinates.php - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/parserhooks/Maps_DisplayMap.php b/includes/parserhooks/Maps_DisplayMap.php index 96ad9fd1a..475b3784a 100644 --- a/includes/parserhooks/Maps_DisplayMap.php +++ b/includes/parserhooks/Maps_DisplayMap.php @@ -5,9 +5,6 @@ * * @since 0.7 * - * @file Maps_DisplayMap.php - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/parserhooks/Maps_Distance.php b/includes/parserhooks/Maps_Distance.php index 7e79de744..45f2cccbb 100644 --- a/includes/parserhooks/Maps_Distance.php +++ b/includes/parserhooks/Maps_Distance.php @@ -6,9 +6,6 @@ * * @since 0.7 * - * @file Maps_Distance.php - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/parserhooks/Maps_Finddestination.php b/includes/parserhooks/Maps_Finddestination.php index a9ea5e56c..38e33e399 100644 --- a/includes/parserhooks/Maps_Finddestination.php +++ b/includes/parserhooks/Maps_Finddestination.php @@ -6,9 +6,6 @@ * * @since 0.7 * - * @file Maps_Finddestination.php - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/parserhooks/Maps_Geocode.php b/includes/parserhooks/Maps_Geocode.php index 9504d3e88..bf0b67ed4 100644 --- a/includes/parserhooks/Maps_Geocode.php +++ b/includes/parserhooks/Maps_Geocode.php @@ -6,9 +6,6 @@ * * @since 0.7 * - * @file Maps_Geocode.php - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/parserhooks/Maps_Geodistance.php b/includes/parserhooks/Maps_Geodistance.php index aca666fb1..d19a76c50 100644 --- a/includes/parserhooks/Maps_Geodistance.php +++ b/includes/parserhooks/Maps_Geodistance.php @@ -6,9 +6,6 @@ * * @since 0.7 * - * @file Maps_Geodistance.php - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/parserhooks/Maps_MapsDoc.php b/includes/parserhooks/Maps_MapsDoc.php index e10785c10..8d7ec5ac6 100644 --- a/includes/parserhooks/Maps_MapsDoc.php +++ b/includes/parserhooks/Maps_MapsDoc.php @@ -6,9 +6,6 @@ * * @since 1.0 * - * @file Maps_MapsDoc.php - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/services/GoogleMaps3/GoogleMaps3.php b/includes/services/GoogleMaps3/GoogleMaps3.php index f245ae3bf..a9deef97f 100644 --- a/includes/services/GoogleMaps3/GoogleMaps3.php +++ b/includes/services/GoogleMaps3/GoogleMaps3.php @@ -4,15 +4,11 @@ * This groupe contains all Google Maps v3 related files of the Maps extension. * * @defgroup MapsGoogleMaps3 Google Maps v3 - * @ingroup Maps */ /** * This file holds the hook and initialization for the Google Maps v3 service. * - * @file GoogleMaps3.php - * @ingroup MapsGoogleMaps3 - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/services/GoogleMaps3/Maps_GoogleMaps3.php b/includes/services/GoogleMaps3/Maps_GoogleMaps3.php index 069f3cefb..50565a6ca 100644 --- a/includes/services/GoogleMaps3/Maps_GoogleMaps3.php +++ b/includes/services/GoogleMaps3/Maps_GoogleMaps3.php @@ -6,9 +6,6 @@ * * @since 0.7 * - * @file Maps_GoogleMaps3.php - * @ingroup MapsGoogleMaps3 - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/services/Leaflet/Leaflet.php b/includes/services/Leaflet/Leaflet.php index 4c53c9908..c7ac202d4 100644 --- a/includes/services/Leaflet/Leaflet.php +++ b/includes/services/Leaflet/Leaflet.php @@ -4,15 +4,11 @@ * This groupe contains all Leaflet related files of the Maps extension. * * @defgroup Leaflet - * @ingroup Maps */ /** * This file holds the hook and initialization for the Leaflet service. * - * @file - * @ingroup Leaflet - * * @licence GNU GPL v2+ * @author Pavel Astakhov < pastakhov@yandex.ru > */ diff --git a/includes/services/Leaflet/Maps_Leaflet.php b/includes/services/Leaflet/Maps_Leaflet.php index 58bb2d08b..052e73ada 100644 --- a/includes/services/Leaflet/Maps_Leaflet.php +++ b/includes/services/Leaflet/Maps_Leaflet.php @@ -4,9 +4,6 @@ * Class holding information and functionality specific to Leaflet. * This information and features can be used by any mapping feature. * - * @file Maps_Leaflet.php - * @ingroup Leaflet - * * @licence GNU GPL v2+ * @author Pavel Astakhov < pastakhov@yandex.ru > */ diff --git a/includes/services/OpenLayers/Maps_OpenLayers.php b/includes/services/OpenLayers/Maps_OpenLayers.php index 094ee1654..6feaca918 100644 --- a/includes/services/OpenLayers/Maps_OpenLayers.php +++ b/includes/services/OpenLayers/Maps_OpenLayers.php @@ -6,9 +6,6 @@ * * @since 0.1 * - * @file Maps_OpenLayers.php - * @ingroup MapsOpenLayers - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/services/OpenLayers/OpenLayers.php b/includes/services/OpenLayers/OpenLayers.php index 5c6114b06..bd9f58c19 100644 --- a/includes/services/OpenLayers/OpenLayers.php +++ b/includes/services/OpenLayers/OpenLayers.php @@ -4,15 +4,11 @@ * This group contains all OpenLayers related files of the Maps extension. * * @defgroup MapsOpenLayers OpenLayers - * @ingroup Maps */ /** * This file holds the hook and initialization for the OpenLayers service. * - * @file OpenLayers.php - * @ingroup MapsOpenLayers - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/includes/specials/SpecialMapEditor.php b/includes/specials/SpecialMapEditor.php index 1c0ba758f..1a5ccb94a 100644 --- a/includes/specials/SpecialMapEditor.php +++ b/includes/specials/SpecialMapEditor.php @@ -5,9 +5,6 @@ * * @since 2.0 * - * @file - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Kim Eik * @author Jeroen De Dauw < jeroendedauw@gmail.com > diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 748f304a6..ed221c4b0 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -5,9 +5,6 @@ * * @since 3.0 * - * @file - * @ingroup Maps - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/tests/phpunit/MapsDistanceParserTest.php b/tests/phpunit/MapsDistanceParserTest.php index f2c801c58..b9c5a94d2 100644 --- a/tests/phpunit/MapsDistanceParserTest.php +++ b/tests/phpunit/MapsDistanceParserTest.php @@ -5,14 +5,10 @@ use MapsDistanceParser; /** - * Tests for the MapsCoordinates class. + * @covers MapsCoordinates * - * @file * @since 0.6.5 * - * @ingroup Maps - * @ingroup Test - * * @group Maps * * @licence GNU GPL v2+ From 8cb752bf5c67fc9a1c992da001286895e0b600e9 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 20:46:08 +0100 Subject: [PATCH 042/163] Some cleanup in ParserHookTest Change-Id: Idda8fef9a36252a1a8f641cd601dcc0df26a1060 --- tests/phpunit/parserhooks/ParserHookTest.php | 21 ++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/phpunit/parserhooks/ParserHookTest.php b/tests/phpunit/parserhooks/ParserHookTest.php index 3a765596b..2dc3ef7ea 100644 --- a/tests/phpunit/parserhooks/ParserHookTest.php +++ b/tests/phpunit/parserhooks/ParserHookTest.php @@ -2,6 +2,9 @@ namespace Maps\Test; +use ParamProcessor\ParamDefinition; +use ParamProcessor\Processor; + /** * Tests for the MapsCoordinates class. * @@ -71,16 +74,16 @@ public function processingProvider() { public function testParamProcessing( array $parameters, array $expectedValues ) { $definitions = $this->getInstance()->getParamDefinitions(); - $processor = \ParamProcessor\Processor::newDefault(); + $processor = Processor::newDefault(); $processor->setParameters( $parameters, $definitions ); - $processor->validateParameters(); + $result = $processor->processParameters(); - if ( $processor->hasFatalError() ) { - throw new \MWException( 'Fatal error occurred during the param processing: ' . $processor->hasFatalError()->getMessage() ); + if ( $result->hasFatal() ) { + $this->fail( 'Fatal error occurred during the param processing: ' . $processor->hasFatalError()->getMessage() ); } - $actual = $processor->getParameterValues(); + $actual = $result->getParameters(); $expectedValues = array_merge( $this->getDefaultValues(), $expectedValues ); @@ -89,8 +92,10 @@ public function testParamProcessing( array $parameters, array $expectedValues ) $this->assertEquals( $expected, - $actual[$name], - 'Expected ' . var_export( $expected, true ) . ' should match actual ' . var_export( $actual[$name], true ) + $actual[$name]->getValue(), + 'Expected ' . var_export( $expected, true ) + . ' should match actual ' + . var_export( $actual[$name]->getValue(), true ) ); } } @@ -103,7 +108,7 @@ public function testParamProcessing( array $parameters, array $expectedValues ) * @return array */ protected function getDefaultValues() { - $definitions = \ParamDefinition::getCleanDefinitions( $this->getInstance()->getParamDefinitions() ); + $definitions = ParamDefinition::getCleanDefinitions( $this->getInstance()->getParamDefinitions() ); $defaults = array(); From 3de71af31a1b820d9d310f8429b4c5be86bcc876 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 20:50:06 +0100 Subject: [PATCH 043/163] Add tests for directional coord notation Change-Id: Ibc91af92d45a095709a2a1edf728e09ab4bc8e64 --- tests/phpunit/parserhooks/CoordinatesTest.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/phpunit/parserhooks/CoordinatesTest.php b/tests/phpunit/parserhooks/CoordinatesTest.php index f3aed1602..beed075ee 100644 --- a/tests/phpunit/parserhooks/CoordinatesTest.php +++ b/tests/phpunit/parserhooks/CoordinatesTest.php @@ -40,6 +40,7 @@ public function parametersProvider() { ), '4° 0\' 0", 2° 0\' 0"' ); + $paramLists[] = array( array( 'location' => '55 S, 37.6176330 W' @@ -55,6 +56,23 @@ public function parametersProvider() { '4, 2' ); +// $paramLists[] = array( +// array( +// 'location' => '-4,-2', +// 'format' => 'float', +// 'directional' => 'yes', +// ), +// '4 W, 2 S' +// ); +// +// $paramLists[] = array( +// array( +// 'location' => '55 S, 37.6176330 W', +// 'directional' => 'yes', +// ), +// '55° 0\' 0" W, 37° 37\' 3.4788" S' +// ); + return $paramLists; } From 9db087042a051d14713c1fb8453691d302741f59 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 20:57:19 +0100 Subject: [PATCH 044/163] Fix @covers tag Change-Id: I54988ee0410cafbb10f854db3bb8a1d509027a11 --- tests/phpunit/parserhooks/CoordinatesTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/parserhooks/CoordinatesTest.php b/tests/phpunit/parserhooks/CoordinatesTest.php index beed075ee..0fadc1f07 100644 --- a/tests/phpunit/parserhooks/CoordinatesTest.php +++ b/tests/phpunit/parserhooks/CoordinatesTest.php @@ -6,7 +6,7 @@ use ParamProcessor\ParamDefinition; /** - * @covers Maps\Coordinates + * @covers MapsCoordinates * * @group Maps * @group ParserHook From acd8c3573a6b6a2747b696c993140bea8ee363d3 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 20:58:51 +0100 Subject: [PATCH 045/163] Improve @covers tags Change-Id: I08122a1a3c9a2faea6dbd25a2c9e1edbb07fce95 --- tests/phpunit/parserhooks/DisplayMapTest.php | 2 +- tests/phpunit/parserhooks/DistanceTest.php | 2 +- tests/phpunit/parserhooks/FinddestinationTest.php | 2 +- tests/phpunit/parserhooks/GeocodeTest.php | 2 +- tests/phpunit/parserhooks/GeodistanceTest.php | 2 +- tests/phpunit/parserhooks/MapsDocTest.php | 2 +- tests/phpunit/parserhooks/ParserHookTest.php | 2 -- 7 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/phpunit/parserhooks/DisplayMapTest.php b/tests/phpunit/parserhooks/DisplayMapTest.php index fd5db4dde..7324c0b99 100644 --- a/tests/phpunit/parserhooks/DisplayMapTest.php +++ b/tests/phpunit/parserhooks/DisplayMapTest.php @@ -5,7 +5,7 @@ use Maps\Elements\Location; /** - * Tests for the Maps\DisplayMap class. + * @covers MapsDisplayMap * * @group Maps * @group ParserHook diff --git a/tests/phpunit/parserhooks/DistanceTest.php b/tests/phpunit/parserhooks/DistanceTest.php index 8330e6437..3f25b02ea 100644 --- a/tests/phpunit/parserhooks/DistanceTest.php +++ b/tests/phpunit/parserhooks/DistanceTest.php @@ -3,7 +3,7 @@ namespace Maps\Test; /** - * Tests for the Maps\Distance class. + * @covers MapsDistance * * @group Maps * @group ParserHook diff --git a/tests/phpunit/parserhooks/FinddestinationTest.php b/tests/phpunit/parserhooks/FinddestinationTest.php index da0aa2a21..7bbfe53ba 100644 --- a/tests/phpunit/parserhooks/FinddestinationTest.php +++ b/tests/phpunit/parserhooks/FinddestinationTest.php @@ -5,7 +5,7 @@ use Maps\Elements\Location; /** - * Tests for the Maps\Finddestination class. + * @covers MapsFinddestination * * @group Maps * @group ParserHook diff --git a/tests/phpunit/parserhooks/GeocodeTest.php b/tests/phpunit/parserhooks/GeocodeTest.php index dfb914e42..c3bb0878f 100644 --- a/tests/phpunit/parserhooks/GeocodeTest.php +++ b/tests/phpunit/parserhooks/GeocodeTest.php @@ -5,7 +5,7 @@ use Maps\Elements\Location; /** - * Tests for the Maps\Geocode class. + * @covers MapsGeocode * * @group Maps * @group ParserHook diff --git a/tests/phpunit/parserhooks/GeodistanceTest.php b/tests/phpunit/parserhooks/GeodistanceTest.php index ed8ac3cc8..632f21f8d 100644 --- a/tests/phpunit/parserhooks/GeodistanceTest.php +++ b/tests/phpunit/parserhooks/GeodistanceTest.php @@ -6,7 +6,7 @@ use Maps\Elements\Location; /** - * Tests for the Maps\Geodistance class. + * @covers MapsGeodistance * * @group Maps * @group ParserHook diff --git a/tests/phpunit/parserhooks/MapsDocTest.php b/tests/phpunit/parserhooks/MapsDocTest.php index d46982b7e..77151bacf 100644 --- a/tests/phpunit/parserhooks/MapsDocTest.php +++ b/tests/phpunit/parserhooks/MapsDocTest.php @@ -3,7 +3,7 @@ namespace Maps\Test; /** - * Tests for the Maps\MapsDoc class. + * @covers MapsMapsDoc * * @group Maps * @group ParserHook diff --git a/tests/phpunit/parserhooks/ParserHookTest.php b/tests/phpunit/parserhooks/ParserHookTest.php index 2dc3ef7ea..f43ad96d9 100644 --- a/tests/phpunit/parserhooks/ParserHookTest.php +++ b/tests/phpunit/parserhooks/ParserHookTest.php @@ -6,8 +6,6 @@ use ParamProcessor\Processor; /** - * Tests for the MapsCoordinates class. - * * @group Maps * @group ParserHook * From 9c8ad02358e9fef041d6e80d6d0b27dbc9ab926d Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 21:00:32 +0100 Subject: [PATCH 046/163] Rem obsolete file Change-Id: Icbdf600aa23c563e52d12593f55f22ebe3e670be --- ROADMAP | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 ROADMAP diff --git a/ROADMAP b/ROADMAP deleted file mode 100644 index 7eccace2b..000000000 --- a/ROADMAP +++ /dev/null @@ -1,10 +0,0 @@ -This is the roadmap and release schedule for the Maps extension. - -Extension page on mediawiki.org: https://www.mediawiki.org/wiki/Extension:Maps -Latest version of the roadmap: https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Maps.git;a=blob;f=ROADMAP - -== Maps 2.1 == - -End 2012 - -* Migrate parameters to Validator >=0.5 style definitions \ No newline at end of file From 1f111b02b966c57a0d9627bf2a5d17630fd324f4 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 21:01:35 +0100 Subject: [PATCH 047/163] Up rel notes Change-Id: Ibde6fe35cde6848bcda3ec215643a4f9b926cb52 --- RELEASE-NOTES | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ca61fdd5a..8a82cc77e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -21,6 +21,7 @@ bugs have been found and fixed. No big new features have been added. ; New features * Added leaflet service +* Added Geocoder.us geoservice support ; Breaking internal changes From 622dd9216e2923f41da88ce64732cafa69b833c0 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 21:16:55 +0100 Subject: [PATCH 048/163] Update composer.json Change-Id: I495853014dff6a798ebddcf2fe6ce7762da8b54a --- composer.json | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index c5d95cd7d..20d4d6f7c 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,15 @@ { "name": "mediawiki/maps", "description": "Adds various mapping features to MediaWiki", - "keywords": ["MediaWiki", "Semantic MediaWiki", "Maps", "Google Maps", "OpenLayers", "OSM", "OpenStreetMap"], + "keywords": [ + "MediaWiki", + "Semantic MediaWiki", + "Maps", + "Google Maps", + "OpenLayers", + "OSM", + "OpenStreetMap" + ], "homepage": "https://www.mediawiki.org/wiki/Extension:Maps", "license": "GPL-2.0+", "authors": [ @@ -18,10 +26,10 @@ "irc": "irc://irc.freenode.net/mediawiki", "forum": "https://www.mediawiki.org/wiki/Extension_talk:Maps", "wiki": "https://www.mediawiki.org/wiki/Extension:Maps", - "source": "https://github.com/wikimedia/mediawiki-extensions-Maps" + "source": "https://github.com/JeroenDeDauw/Maps" }, "require": { - "php": ">=5.3.0", + "php": ">=5.3.2", "param-processor/param-processor": "dev-master", "data-values/data-values": "dev-master" }, From 6ce86cb5a683569d0f7dba5dc3929366dbf34292 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 21:21:45 +0100 Subject: [PATCH 049/163] Add scrutinizer ci config Change-Id: Ib70eb0eb21c7e72daf9259521ef2c51691a24c0a --- .gitignore | 7 +------ .scrutinizer.yml | 12 ++++++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 .scrutinizer.yml diff --git a/.gitignore b/.gitignore index e6124c968..f078e9121 100644 --- a/.gitignore +++ b/.gitignore @@ -2,12 +2,7 @@ *~ *.kate-swp -!.gitignore -!.gitreview - -!.travis.yml -!.travis.sh -!.coveralls.yml +!.* composer.phar composer.lock \ No newline at end of file diff --git a/.scrutinizer.yml b/.scrutinizer.yml new file mode 100644 index 000000000..e455f06ba --- /dev/null +++ b/.scrutinizer.yml @@ -0,0 +1,12 @@ +inherit: true + +tools: + php_code_coverage: false + php_code_sniffer: true + php_cpd: true + php_cs_fixer: true + php_loc: true + php_mess_detector: true + php_pdepend: true + php_analyzer: true + sensiolabs_security_checker: true \ No newline at end of file From d7d1ddeacde641dc9b62313e427cbf0713ebc4ca Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 21:31:06 +0100 Subject: [PATCH 050/163] Remove unused imports Change-Id: Ia003d5603382947d3bb845ba5a6d0c9c9fe4b433 --- includes/parserhooks/Maps_Finddestination.php | 1 - includes/parserhooks/Maps_Geodistance.php | 1 - includes/parsers/WmsOverlayParser.php | 2 -- 3 files changed, 4 deletions(-) diff --git a/includes/parserhooks/Maps_Finddestination.php b/includes/parserhooks/Maps_Finddestination.php index 38e33e399..ed4ab6a9c 100644 --- a/includes/parserhooks/Maps_Finddestination.php +++ b/includes/parserhooks/Maps_Finddestination.php @@ -9,7 +9,6 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ -use DataValues\LatLongValue; class MapsFinddestination extends ParserHook { diff --git a/includes/parserhooks/Maps_Geodistance.php b/includes/parserhooks/Maps_Geodistance.php index d19a76c50..34ee88d11 100644 --- a/includes/parserhooks/Maps_Geodistance.php +++ b/includes/parserhooks/Maps_Geodistance.php @@ -9,7 +9,6 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ -use ValueParsers\GeoCoordinateParser; class MapsGeodistance extends ParserHook { diff --git a/includes/parsers/WmsOverlayParser.php b/includes/parsers/WmsOverlayParser.php index b9b060d2e..0b918ab5e 100644 --- a/includes/parsers/WmsOverlayParser.php +++ b/includes/parsers/WmsOverlayParser.php @@ -3,8 +3,6 @@ namespace Maps; use Maps\Elements\WmsOverlay; -use MWException; -use ValueParsers\GeoCoordinateParser; use ValueParsers\ParseException; use ValueParsers\StringValueParser; From a813cc7a744f59346e4db30daeee5a75a074e3cf Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Tue, 12 Nov 2013 20:31:11 +0000 Subject: [PATCH 051/163] Localisation updates from http://translatewiki.net. Change-Id: Id619d00c6b02aa0f146d777082cdca6b5f09028f --- Maps.i18n.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index cf1abbb3f..8df19874b 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -410,7 +410,8 @@ 'mapeditor-form-field-fillopcaity' => 'Form field name', 'mapeditor-form-field-showonhover' => 'Checkbox text', 'mapeditor-mapparam-title' => 'Title of dialogue', - 'mapeditor-mapparam-defoption' => 'Default option in map parameters select list', + 'mapeditor-mapparam-defoption' => 'Default option in map parameters select list. +{{Identical|Select parameter}}', 'mapeditor-imageoverlay-button' => 'Button text that starts the "add image overlay process"', 'mapeditor-form-field-image' => 'Form field name. {{Identical|Image}}', @@ -1267,6 +1268,7 @@ 'maps-desc' => 'Ermöglicht die Einbindung dynamischer Karten in Wikiseiten, die Georeferenzierung von Adressen und andere geographische Operationen ([https://www.semantic-mediawiki.org/wiki/Maps Weitere Informationen …])', 'right-geocode' => 'Georeferenzieren', 'maps_map' => 'Karte', + 'maps-tracking-category' => 'Seiten mit einer von der Maps-Erweiterung gerenderten Karte', 'maps-loading-map' => 'Die Karte wird geladen …', 'maps-load-failed' => 'Die Karte konnte nicht geladen werden.', 'maps-markers' => 'Markierungen', @@ -5968,6 +5970,7 @@ 'maps-displaymap-par-maxzoom' => 'Максимальный уровень масштабирования', 'maps-displaymap-par-minzoom' => 'Минимальный уровень масштабирования', 'maps-displaymap-par-static' => 'Если карта должна быть статичной', + 'maps-displaymap-par-wmsoverlay' => 'Использовать слой WMS', 'maps-fullscreen-button' => 'Переключить полноэкранный режим', 'maps-googlemaps3-par-enable-fullscreen' => 'Включить кнопку полноэкранного режима', 'validation-error-invalid-location' => 'Параметр $1 должен быть корректным местоположением.', @@ -6003,7 +6006,9 @@ 'maps-par-resizable' => 'Даёт возможность изменять размер карты, потащив её за правый нижний угол.', 'maps-googlemaps3-incompatbrowser' => 'Ваш браузер несовместим с Google Maps v3.', 'maps-googlemaps3-par-type' => 'Тип карты для начального отображения.', + 'maps-googlemaps3-par-types' => 'Типы карты, которые будут доступны через элемент управления типом карты.', 'maps-googlemaps3-par-layers' => 'Специальные слои для загрузки на карту.', + 'maps-googlemaps3-par-controls' => 'Элементы управления для размещения на карте.', 'maps-googlemaps3-par-zoomstyle' => 'Стиль элемента управления масштабом.', 'maps-googlemaps3-par-autoinfowindows' => 'Автоматически открывает все информационные окна после загрузки страницы.', 'maps-googlemaps3-par-kml' => 'KML файлы для загрузки на карту.', @@ -6716,6 +6721,7 @@ 'maps-desc' => 'Дає змогу вбудовування динамічних карт у сторінки вікі, геокодування адрес та інші географічні операції. ([https://www.semantic-mediawiki.org/wiki/Maps детальніше...])', 'right-geocode' => 'Геокод', 'maps_map' => 'Мапа', + 'maps-tracking-category' => 'Сторінки з картою, створеною розширенням карти', 'maps-loading-map' => 'Завантаження мапи...', 'maps-load-failed' => 'Неможливо завантажити карту!', 'maps-markers' => 'Відмітки', From 6831266387f734b46676869bb121da6f364d98eb Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 21:32:37 +0100 Subject: [PATCH 052/163] Minor code issues Change-Id: If86f234175c57f8c003851e464cc170b4ccbd3bf --- includes/Geocoders.php | 2 +- includes/properties/iBubbleMapElement.php | 4 ++-- tests/phpunit/parserhooks/DisplayMapTest.php | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/includes/Geocoders.php b/includes/Geocoders.php index cbf6635e0..a133bfc60 100644 --- a/includes/Geocoders.php +++ b/includes/Geocoders.php @@ -164,7 +164,7 @@ public static function isLocation( $coordsOrAddress, $geoService = '', $mappingS * @param string $service * @param string $mappingService * @param boolean $checkForCoords - * @param coordinate type $targetFormat The notation to which they should be formatted. Defaults to floats. + * @param string $targetFormat The notation to which they should be formatted. Defaults to floats. * @param boolean $directional Indicates if the target notation should be directional. Defaults to false. * * @return string|false diff --git a/includes/properties/iBubbleMapElement.php b/includes/properties/iBubbleMapElement.php index d78606912..74203daff 100644 --- a/includes/properties/iBubbleMapElement.php +++ b/includes/properties/iBubbleMapElement.php @@ -3,12 +3,12 @@ interface iBubbleMapElement { /** - * @param \text $text + * @param string $text */ public function setText( $text ); /** - * @return \text + * @return string */ public function getText(); diff --git a/tests/phpunit/parserhooks/DisplayMapTest.php b/tests/phpunit/parserhooks/DisplayMapTest.php index 7324c0b99..c74d067a6 100644 --- a/tests/phpunit/parserhooks/DisplayMapTest.php +++ b/tests/phpunit/parserhooks/DisplayMapTest.php @@ -62,10 +62,8 @@ public function testForSomeReasonPhpSegfaultsIfThereIsOneMethodLess() { * @return array */ public function processingProvider() { - $definitions = $this->getInstance()->getParamDefinitions(); $argLists = array(); - // TODO $values = array( 'locations' => '4,2', 'width' => '420', From 0eeb0967dbbdd7d74c66bbfdfc65d46a34ad4af4 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 21:35:10 +0100 Subject: [PATCH 053/163] Reduce complexity Change-Id: Iba4e9f8f545b50dcb641b4e2038d48a3269fef6c --- includes/Maps_DisplayMapRenderer.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/includes/Maps_DisplayMapRenderer.php b/includes/Maps_DisplayMapRenderer.php index 70b7f969a..2ce0ac5ea 100644 --- a/includes/Maps_DisplayMapRenderer.php +++ b/includes/Maps_DisplayMapRenderer.php @@ -97,6 +97,8 @@ public final function renderMap( array $params, Parser $parser ) { * Converts the data in the coordinates parameter to JSON-ready objects. * These get stored in the locations parameter, and the coordinates on gets deleted. * + * FIXME: complexity + * * @since 1.0 * * @param array &$params @@ -143,6 +145,14 @@ protected function handleMarkerData( array &$params, Parser $parser ) { unset( $params['coordinates'] ); + $this->handleShapeData( $params, $parserClone ); + + if ( $params['mappingservice'] === 'openlayers' ) { + $params['layers'] = $this->evilOpenLayersHack( $params['layers'] ); + } + } + + protected function handleShapeData( array &$params, Parser $parserClone ) { $textContainers = array( &$params['lines'] , &$params['polygons'] , @@ -163,10 +173,6 @@ protected function handleMarkerData( array &$params, Parser $parser ) { } } } - - if ( $params['mappingservice'] === 'openlayers' ) { - $params['layers'] = $this->evilOpenLayersHack( $params['layers'] ); - } } /** From 2440590640b6bf2975ba501cab88c23c54e1bc37 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 21:36:11 +0100 Subject: [PATCH 054/163] Add method visibility Change-Id: I7395bc92d1c42e720b42ba65e962e49b13a057f1 --- includes/services/GoogleMaps3/Maps_GoogleMaps3.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/services/GoogleMaps3/Maps_GoogleMaps3.php b/includes/services/GoogleMaps3/Maps_GoogleMaps3.php index 50565a6ca..aed3927c7 100644 --- a/includes/services/GoogleMaps3/Maps_GoogleMaps3.php +++ b/includes/services/GoogleMaps3/Maps_GoogleMaps3.php @@ -66,7 +66,7 @@ class MapsGoogleMaps3 extends MapsMappingService { * * @since 0.6.6 */ - function __construct( $serviceName ) { + public function __construct( $serviceName ) { parent::__construct( $serviceName, array( 'googlemaps', 'google' ) From dac52578160e782308e5a7b7db4ea39654ed2a1f Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 21:36:51 +0100 Subject: [PATCH 055/163] Remove silly parameter Change-Id: I946c4f7ae568a3afa914963da58ca5fba7cfe39a --- includes/Elements/Location.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/includes/Elements/Location.php b/includes/Elements/Location.php index 5f670d9e8..adffdaf28 100644 --- a/includes/Elements/Location.php +++ b/includes/Elements/Location.php @@ -161,16 +161,10 @@ public function getCoordinates() { * * @since 0.7.1 * - * @param boolean $geocodeIfEmpty - * * @return string */ - public function getAddress( $geocodeIfEmpty = true ) { + public function getAddress() { if ( is_null( $this->address ) ) { - if ( $geocodeIfEmpty ) { - // TODO: attempt to reverse-geocode - } - $this->address = ''; } From 1cf5144716cbf310f7f769f921cc9472fdba6ca9 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 21:39:10 +0100 Subject: [PATCH 056/163] Add method visibility Change-Id: I68a2abad8a11b1612aa5a6564d71c1b6dbaf85de --- includes/Elements/Location.php | 4 ++++ includes/iMappingService.php | 20 +++++++++---------- includes/services/Leaflet/Maps_Leaflet.php | 2 +- .../services/OpenLayers/Maps_OpenLayers.php | 2 +- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/includes/Elements/Location.php b/includes/Elements/Location.php index adffdaf28..91d4ec24c 100644 --- a/includes/Elements/Location.php +++ b/includes/Elements/Location.php @@ -289,6 +289,8 @@ public function hasVisitedIcon(){ /** * Returns an object that can directly be converted to JS using json_encode or similar. * + * FIXME: complexity + * * @since 1.0 * * @param string $defText @@ -302,6 +304,7 @@ public function hasVisitedIcon(){ */ public function getJSONObject( $defText = '', $defTitle = '', $defIconUrl = '', $defGroup = '', $defInlineLabel = '', $defVisitedIcon = '' ) { $parentArray = parent::getJSONObject( $defText , $defTitle ); + $array = array( 'lat' => $this->coordinates->getLatitude(), 'lon' => $this->coordinates->getLongitude(), @@ -312,6 +315,7 @@ public function getJSONObject( $defText = '', $defTitle = '', $defIconUrl = '', 'inlineLabel' => $this->hasInlineLabel() ? $this->getInlineLabel() : $defInlineLabel, 'visitedicon' => $this->hasVisitedIcon() ? $this->getVisitedIcon() : $defVisitedIcon, ); + return array_merge( $parentArray , $array ); } diff --git a/includes/iMappingService.php b/includes/iMappingService.php index 6f4c2ac45..d73fc7455 100644 --- a/includes/iMappingService.php +++ b/includes/iMappingService.php @@ -17,7 +17,7 @@ interface iMappingService { * * @return string */ - function getName(); + public function getName(); /** * Adds the dependencies to the parser output as head items. @@ -26,7 +26,7 @@ function getName(); * * @param mixed $parserOrOut */ - function addDependencies( &$parserOrOut ); + public function addDependencies( &$parserOrOut ); /** * Adds service-specific parameter definitions to the provided parameter list. @@ -37,7 +37,7 @@ function addDependencies( &$parserOrOut ); * * @return array */ - function addParameterInfo( array &$parameterInfo ); + public function addParameterInfo( array &$parameterInfo ); /** * Adds a feature to this service. This is to indicate this service has support for this feature. @@ -47,7 +47,7 @@ function addParameterInfo( array &$parameterInfo ); * @param string $featureName * @param string $handlingClass */ - function addFeature( $featureName, $handlingClass ); + public function addFeature( $featureName, $handlingClass ); /** * Returns the name of the class that handles the provided feature in this service, or false if there is none. @@ -58,7 +58,7 @@ function addFeature( $featureName, $handlingClass ); * * @return mixed String or false */ - function getFeature( $featureName ); + public function getFeature( $featureName ); /** * Returns an instance of the class handling the provided feature with this service, or false if there is none. @@ -69,7 +69,7 @@ function getFeature( $featureName ); * * @return object or false */ - function getFeatureInstance( $featureName ); + public function getFeatureInstance( $featureName ); /** * Returns a list of aliases. @@ -78,7 +78,7 @@ function getFeatureInstance( $featureName ); * * @return array */ - function getAliases(); + public function getAliases(); /** * Returns if the service has a certain alias or not. @@ -89,7 +89,7 @@ function getAliases(); * * @return boolean */ - function hasAlias( $alias ); + public function hasAlias( $alias ); /** * Returns the default zoomlevel for the mapping service. @@ -98,7 +98,7 @@ function hasAlias( $alias ); * * @return integer */ - function getDefaultZoom(); + public function getDefaultZoom(); /** * Returns the zoomlevel that shows the whole earth for the mapping service. @@ -120,6 +120,6 @@ public function getEarthZoom(); * * @return string */ - function getMapId( $increment = true ); + public function getMapId( $increment = true ); } \ No newline at end of file diff --git a/includes/services/Leaflet/Maps_Leaflet.php b/includes/services/Leaflet/Maps_Leaflet.php index 052e73ada..ce29f43dd 100644 --- a/includes/services/Leaflet/Maps_Leaflet.php +++ b/includes/services/Leaflet/Maps_Leaflet.php @@ -12,7 +12,7 @@ class MapsLeaflet extends MapsMappingService { /** * Constructor */ - function __construct( $serviceName ) { + public function __construct( $serviceName ) { parent::__construct( $serviceName, array( 'leafletmaps', 'leaflet' ) diff --git a/includes/services/OpenLayers/Maps_OpenLayers.php b/includes/services/OpenLayers/Maps_OpenLayers.php index 6feaca918..49632e4b6 100644 --- a/includes/services/OpenLayers/Maps_OpenLayers.php +++ b/includes/services/OpenLayers/Maps_OpenLayers.php @@ -16,7 +16,7 @@ class MapsOpenLayers extends MapsMappingService { * * @since 0.6.6 */ - function __construct( $serviceName ) { + public function __construct( $serviceName ) { parent::__construct( $serviceName, array( 'layers', 'openlayer' ) From 8c290b35fbb1036a40852fc0edb08cd75f10ab6f Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 21:59:32 +0100 Subject: [PATCH 057/163] Update INSTALL Change-Id: I8e437876d653836d8ed06cb9d57940edadd7f895 --- INSTALL => INSTALL.md | 68 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 57 insertions(+), 11 deletions(-) rename INSTALL => INSTALL.md (57%) diff --git a/INSTALL b/INSTALL.md similarity index 57% rename from INSTALL rename to INSTALL.md index a2f7100cf..e0c206674 100644 --- a/INSTALL +++ b/INSTALL.md @@ -6,17 +6,63 @@ Latest version of the install file: https://gerrit.wikimedia.org/r/gitweb?p=medi == Requirements == -Maps requires: - -* MediaWiki 1.18 or above -* PHP 5.3 or above -* Validator 0.4.13 or above - -Not up to specs yet? Maybe you can use Maps 1.0.x which requires: - -* MediaWiki 1.17 or above -* PHP 5.2 or above -* Validator 0.4.11 or above + + + + + + + + + + + + + + + + + + + + + + + + + + +
PHPMediaWikiParamProcessorDataValues
Maps 2.x5.3.2+1.18+Not needed
Maps 3.x5.3.2+1.18+0.1+
Maps 1.0.55.2+1.17+Not needed
+ +; Legend + + + + + + + + + Red + Old release + New features + + + Yellow + Stable release + Security fixes + + + Green + Stable release + Bug and security fixes + + + Blue + Future release + New features + +
ColorMeaningDevelopment
== Download == From a03816cb0e58f19ca3f31f0d0328ac035edf795e Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 22:01:22 +0100 Subject: [PATCH 058/163] Update INSTALL Change-Id: I38ebb11b414bc1ee924fa0876f082138f68483ad --- INSTALL.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index e0c206674..bef6a06ea 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -11,13 +11,14 @@ Latest version of the install file: https://gerrit.wikimedia.org/r/gitweb?p=medi PHP MediaWiki - ParamProcessor + ParamProcessor (Validator) DataValues Maps 2.x 5.3.2+ 1.18+ + 0.5.x Not needed @@ -30,6 +31,7 @@ Latest version of the install file: https://gerrit.wikimedia.org/r/gitweb?p=medi Maps 1.0.5 5.2+ 1.17+ + 0.4.12+ <1.0 Not needed From d743098aa6e500f2e2a55cf8073274a9ed7c3b8d Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 22:02:31 +0100 Subject: [PATCH 059/163] Update INSTALL Change-Id: I0a63645aa08b8d02bae2e2a37af85bb72800540e --- INSTALL.md | 1 + 1 file changed, 1 insertion(+) diff --git a/INSTALL.md b/INSTALL.md index bef6a06ea..a417ce35e 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -25,6 +25,7 @@ Latest version of the install file: https://gerrit.wikimedia.org/r/gitweb?p=medi Maps 3.x 5.3.2+ 1.18+ + 1.0+ 0.1+ From 92bc221f6271c7b6b184a0900a553c06c2bb9ce6 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 22:26:37 +0100 Subject: [PATCH 060/163] Update INSTALL.md --- INSTALL.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index a417ce35e..9369da72f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -46,22 +46,22 @@ Latest version of the install file: https://gerrit.wikimedia.org/r/gitweb?p=medi Development - Red + Red Old release New features - Yellow + Yellow Stable release Security fixes - Green + Green Stable release Bug and security fixes - Blue + Blue Future release New features @@ -92,4 +92,4 @@ Once you have downloaded the code, place the ''Maps'' directory within your Medi 'extensions' directory. Then add the following code to your [[Manual:LocalSettings.php|LocalSettings.php]] file: # Maps -require_once( "$IP/extensions/Maps/Maps.php" ); \ No newline at end of file +require_once( "$IP/extensions/Maps/Maps.php" ); From 8f5c5ee70a575175f86e62b93cc066ccceaa1f39 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 22:26:53 +0100 Subject: [PATCH 061/163] Update INSTALL.md --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 9369da72f..8a240121b 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -46,7 +46,7 @@ Latest version of the install file: https://gerrit.wikimedia.org/r/gitweb?p=medi Development - Red + Red Old release New features From 4d5c1e003dcf0b555bba06f188d8b44454386f76 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 22:27:18 +0100 Subject: [PATCH 062/163] Update INSTALL.md --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 8a240121b..9ead1fd40 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -51,7 +51,7 @@ Latest version of the install file: https://gerrit.wikimedia.org/r/gitweb?p=medi New features - Yellow + Yellow Stable release Security fixes From f83ccf1434a7cf70ae3f03dcdb330d376314a1b1 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 22:27:31 +0100 Subject: [PATCH 063/163] Update INSTALL.md --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 9ead1fd40..5091d39df 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -46,7 +46,7 @@ Latest version of the install file: https://gerrit.wikimedia.org/r/gitweb?p=medi Development - Red + Red Old release New features From da3183da0ee0b4b3a7d8bcc9695575aeef9eba17 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 22:30:56 +0100 Subject: [PATCH 064/163] Update INSTALL.md --- INSTALL.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 5091d39df..bc6fc076c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -46,24 +46,24 @@ Latest version of the install file: https://gerrit.wikimedia.org/r/gitweb?p=medi Development - Red - Old release - New features + Red + Old release + New features - Yellow - Stable release - Security fixes + Yellow + Stable release + Security fixes - Green - Stable release - Bug and security fixes + Green + Stable release + Bug and security fixes - Blue - Future release - New features + Blue + Future release + New features From 4922fc4d61cb46715bc9dc3bd2466967d5893f84 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 22:32:45 +0100 Subject: [PATCH 065/163] Update INSTALL.md --- INSTALL.md | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index bc6fc076c..7200ca2a7 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -37,36 +37,6 @@ Latest version of the install file: https://gerrit.wikimedia.org/r/gitweb?p=medi -; Legend - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ColorMeaningDevelopment
RedOld releaseNew features
YellowStable releaseSecurity fixes
GreenStable releaseBug and security fixes
BlueFuture releaseNew features
- == Download == You can find the current version of Maps on the Google Code download page [0], From 309de2ee6d1750f873dcb560f406b3a58eb3f6b4 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 22:33:50 +0100 Subject: [PATCH 066/163] Update INSTALL.md --- INSTALL.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 7200ca2a7..434eab801 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -9,27 +9,31 @@ Latest version of the install file: https://gerrit.wikimedia.org/r/gitweb?p=medi + - + + - - + + - + + - - + + + From a6368b350799ad528324d26f3fe4e5794f906c38 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 22:40:46 +0100 Subject: [PATCH 067/163] Update INSTALL.md --- INSTALL.md | 43 ++++++++++++++++--------------------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 434eab801..53fd54d33 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,10 +1,8 @@ -This is the install file for the Maps extension. - -Extension page on mediawiki.org: https://www.mediawiki.org/wiki/Extension:Maps -Latest version of the install file: https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Maps.git;a=blob;f=INSTALL +# Maps installation +These are the installation and configuration instructions for the [Maps extension](../README.md). -== Requirements == +## Dependencies
Status PHP MediaWiki ParamProcessor (Validator) DataValues
Maps 2.xMaps 3.xDevelopment version 5.3.2+ 1.18+0.5.xNot needed1.0+0.1+
Maps 3.xMaps 2.xStable release 5.3.2+ 1.18+1.0+0.1+0.5.xNot needed
Maps 1.0.5Legacy release 5.2+ 1.17+ 0.4.12+ <1.0
@@ -41,29 +39,20 @@ Latest version of the install file: https://gerrit.wikimedia.org/r/gitweb?p=medi
-== Download == +## Download and installation -You can find the current version of Maps on the Google Code download page [0], -as well as a list of legacy downloads [1]. +### With Composer -[0] https://code.google.com/p/mwmaps/downloads/list -[1] https://code.google.com/p/mwmaps/downloads/list?can=1 +The recommended way to install Maps is with [Composer](http://getcomposer.org). +See the [extension installation with Composer](https://www.mediawiki.org/wiki/Composer) instructions. -You can also get the code directly from SVN. Tags can be obtained via +The package name is "mediawiki/maps", so your composer.json file should look as follows: - svn checkout http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/Maps/REL_version - -Where 'version' is the version number of the tag, such as 0_1 -(see the available tags at http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/Maps/). - -The latest code can be obtained from trunk: - - svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Maps/ - -== Installation == - -Once you have downloaded the code, place the ''Maps'' directory within your MediaWiki -'extensions' directory. Then add the following code to your [[Manual:LocalSettings.php|LocalSettings.php]] file: - -# Maps -require_once( "$IP/extensions/Maps/Maps.php" ); +```javascript +{ + "require": { + // ... + "mediawiki/maps": ">=1.0" + }, +} +``` From b79a049df226416d235e48e91c6afa4fb9d87988 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 22:41:39 +0100 Subject: [PATCH 068/163] Update INSTALL.md --- INSTALL.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 53fd54d33..5c73a3858 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -2,7 +2,7 @@ These are the installation and configuration instructions for the [Maps extension](../README.md). -## Dependencies +## Compatibility @@ -10,32 +10,24 @@ These are the installation and configuration instructions for the [Maps extensio - - - - - - - -
Status PHP MediaWikiParamProcessor (Validator)DataValues
Maps 3.x Development version 5.3.2+ 1.18+1.0+0.1+
Maps 2.x Stable release 5.3.2+ 1.18+0.5.xNot needed
Maps 1.0.5 Legacy release 5.2+ 1.17+0.4.12+ <1.0Not needed
@@ -56,3 +48,4 @@ The package name is "mediawiki/maps", so your composer.json file should look as }, } ``` + From 4122f91aa07403d130a62b709b824caf019c0c77 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 22:52:23 +0100 Subject: [PATCH 069/163] Update INSTALL.md --- INSTALL.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index 5c73a3858..b6fda43c5 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -49,3 +49,27 @@ The package name is "mediawiki/maps", so your composer.json file should look as } ``` +### Manual installation + +Alternatively you can obtain the Maps code and the code of all its dependencies yourself, and load them all. + +The latest version of Maps requires: + +* ParamProcessor 1.0 or later +* DataValuesInterfaces 0.1 or later +* DataValuesCommon 0.1 or later + +You can get the Maps code itself: + +* Via git: git clone https://github.com/JeroenDeDauw/Maps.git +* As Tarball: https://github.com/JeroenDeDauw/Maps/releases + +The only remaining step is to include SubPageList in your LocalSettings.php file: + +```php +require_once( "$IP/extensions/Maps/Maps.php" ); +``` + +## Configuration + +See the [Maps settings file](../Maps_Settings.php) for the available configuartion options. From 94c1c5617bc4ea223b020a9f0f82ace67e552465 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 22:55:31 +0100 Subject: [PATCH 070/163] Update INSTALL.md --- INSTALL.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index b6fda43c5..f8ca0d8f4 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -46,9 +46,13 @@ The package name is "mediawiki/maps", so your composer.json file should look as // ... "mediawiki/maps": ">=1.0" }, + "minimum-stability" : "dev" } ``` +The "minimum-stability" section needs to be added as well for now. +This need for this will be removed when Maps 3.0 is released. + ### Manual installation Alternatively you can obtain the Maps code and the code of all its dependencies yourself, and load them all. From c64ea59ae8349da45f3c873cd5dc6d21b4cf1049 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 22:59:19 +0100 Subject: [PATCH 071/163] Update INSTALL.md --- INSTALL.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index f8ca0d8f4..8f0eea67b 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -8,24 +8,28 @@ These are the installation and configuration instructions for the [Maps extensio Status + Release date PHP MediaWiki Maps 3.x Development version + Future 5.3.2+ 1.18+ Maps 2.x Stable release + 2012 5.3.2+ 1.18+ Maps 1.0.5 Legacy release + 2011 5.2+ 1.17+ From 190320a64b1066b96b0621ed4296373913cf4731 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 22:59:59 +0100 Subject: [PATCH 072/163] Update INSTALL.md --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 8f0eea67b..bd9c190f5 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -29,7 +29,7 @@ These are the installation and configuration instructions for the [Maps extensio Maps 1.0.5 Legacy release - 2011 + 2011-11-30 5.2+ 1.17+ From ed3771d95028a24e2d2275119605d9f4d1c1d310 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 23:08:43 +0100 Subject: [PATCH 073/163] Improve readme Change-Id: I3aa75446c44342c46a373d6571c49525e2cbd550 --- README.md | 30 +++++++++++++++++++------- INSTALL.md => docs/INSTALL.md | 0 RELEASE-NOTES => docs/RELEASE-NOTES.md | 0 3 files changed, 22 insertions(+), 8 deletions(-) rename INSTALL.md => docs/INSTALL.md (100%) rename RELEASE-NOTES => docs/RELEASE-NOTES.md (100%) diff --git a/README.md b/README.md index ecacb28e4..c203280bc 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # Maps +Maps is a [MediaWiki](https://www.mediawiki.org) extension to work with and visualise geographical +information. + +Features: + Maps is the MediaWiki extension that provides the ability to visualize geographic data with dynamic, JavaScript based, mapping API's such as Google Maps and OpenLayers in your wiki pages. It has build in support for geocoding, displaying maps, displaying markers, @@ -11,23 +16,32 @@ a single map property! These mapping services include Google Maps, Yahoo! Maps, and OpenStreetMap. These also allow you to display maps with Google Earth, OpenStreetMaps, Bing maps and others. -[![Build Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Maps.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Maps) -[![Coverage Status](https://coveralls.io/repos/wikimedia/mediawiki-extensions-Maps/badge.png?branch=master)](https://coveralls.io/r/wikimedia/mediawiki-extensions-Maps?branch=master) +* ... + +View the [release notes](docs/RELEASE-NOTES.md) for recent changes to SubPageList. + +### User manual + +* [Installation and configuration](docs/INSTALL.md) +* [Usage instructions and examples](https://semantic-mediawiki.org/wiki/Maps) + +## Project status + +[![Build Status](https://secure.travis-ci.org/JeroenDeDauw/Maps.png?branch=master)](http://travis-ci.org/JeroenDeDauw/Maps) +[![Coverage Status](https://coveralls.io/repos/JeroenDeDauw/Maps/badge.png?branch=master)](https://coveralls.io/r/JeroenDeDauw/Maps?branch=master) [![Dependency Status](https://www.versioneye.com/php/mediawiki:maps/dev-master/badge.png)](https://www.versioneye.com/php/mediawiki:maps/dev-master) On [Packagist](https://packagist.org/packages/mediawiki/maps): [![Latest Stable Version](https://poser.pugx.org/mediawiki/maps/version.png)](https://packagist.org/packages/mediawiki/maps) [![Download count](https://poser.pugx.org/mediawiki/maps/d/total.png)](https://packagist.org/packages/mediawiki/maps) -Notes on installing Maps are found in the file INSTALL. +* [Maps on Ohloh](https://www.ohloh.net/p/maps/) +* [Blog posts about Maps](www.bn2vs.com/blog/tag/maps) ## Contributing -If you have bug reports or requests, please add them to -[the Talk page](https://www.mediawiki.org/wiki/Extension_talk:Maps). -You can also send them to Jeroen De Dauw, jeroendedauw -at- gmail.com, -and Yaron Koren, at yaron57 -at- gmail.com. - +Feel free to fork the [code on GitHub](https://github.com/JeroenDeDauw/Maps) and to submit pull +requests. ## Credits to other projects diff --git a/INSTALL.md b/docs/INSTALL.md similarity index 100% rename from INSTALL.md rename to docs/INSTALL.md diff --git a/RELEASE-NOTES b/docs/RELEASE-NOTES.md similarity index 100% rename from RELEASE-NOTES rename to docs/RELEASE-NOTES.md From 60a8d6d93a11bf88c942340afad1182bef0d4067 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 23:15:38 +0100 Subject: [PATCH 074/163] Update feature list Change-Id: I581c5e31af4fc00f9940154be4a65aba09f4ce06 --- README.md | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index c203280bc..568ed0289 100644 --- a/README.md +++ b/README.md @@ -5,20 +5,17 @@ information. Features: -Maps is the MediaWiki extension that provides the ability to visualize geographic data -with dynamic, JavaScript based, mapping API's such as Google Maps and OpenLayers in your -wiki pages. It has build in support for geocoding, displaying maps, displaying markers, -adding pop-ups, and more. Maps allows extensive customization of your maps, either per -map, or via a general setting affecting all maps on your wiki. - -Due to Maps modular build, modifying the mapping service of a map is as easy as changing -a single map property! These mapping services include Google Maps, Yahoo! Maps, OpenLayers -and OpenStreetMap. These also allow you to display maps with Google Earth, OpenStreetMaps, -Bing maps and others. - -* ... - -View the [release notes](docs/RELEASE-NOTES.md) for recent changes to SubPageList. +* Powerful #display_map parser hook for embedding highly customizable dynamic maps into wiki pages. +* Support for multiple mapping services: Google Maps, OpenLayers, OpenStreetMap and Leaflet. +* Coordinate formatting and format conversion via the #coordinates parser function. +* Geocoding via several supported services with the #geocode parser function. +* Geospatial operations +** Calculating the distance between two points with #geodistance +** Finding a destination given a starting point, bearing and distance with #finddestination +* Distance formatting and format conversion via the #distance parser function. +* Visual map editor (Special:MapEditor) to edit #display_map wikitext. + +View the [release notes](docs/RELEASE-NOTES.md) for recent changes to Maps. ### User manual @@ -74,8 +71,8 @@ It is released under the ### OpenStreetMap.js -This extension includes the OpenStreetMap.js file which can be found here: -http://www.openstreetmap.org/openlayers/OpenStreetMap.js +This extension includes the OpenStreetMap.js file which can be found +[here](http://www.openstreetmap.org/openlayers/OpenStreetMap.js). ## Links @@ -83,5 +80,5 @@ http://www.openstreetmap.org/openlayers/OpenStreetMap.js * [Maps on Ohloh](https://www.ohloh.net/p/maps) * [Maps on MediaWiki.org](https://www.mediawiki.org/wiki/Extension:Maps) * [Maps on Packagist](https://packagist.org/packages/mediawiki/maps) -* [TravisCI build status](https://travis-ci.org/wikimedia/mediawiki-extensions-Maps) +* [TravisCI build status](https://travis-ci.org/JeroenDeDauw/Maps) * [Semantic Maps on MediaWiki.org](https://www.mediawiki.org/wiki/Extension:Semantic_Maps) \ No newline at end of file From 065a9ac3c849865b3c91806ec6c4facc422b2a66 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 23:16:52 +0100 Subject: [PATCH 075/163] Add link to sm Change-Id: I1df54ccdcc822ed89b9545e8156bc5a9b4249392 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 568ed0289..a2e239455 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Features: ** Finding a destination given a starting point, bearing and distance with #finddestination * Distance formatting and format conversion via the #distance parser function. * Visual map editor (Special:MapEditor) to edit #display_map wikitext. +* Structured data support provided by the [Semantic Maps extension](https://www.mediawiki.org/wiki/Extension:Semantic_Maps). View the [release notes](docs/RELEASE-NOTES.md) for recent changes to Maps. From 1bbb71d8421f47781cb4a97becc18fc30171ef4c Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 23:25:14 +0100 Subject: [PATCH 076/163] Update rel notes Change-Id: Icb68d77348a95c4beb4c1d76f35c62d065ca2b3a --- docs/RELEASE-NOTES.md | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/docs/RELEASE-NOTES.md b/docs/RELEASE-NOTES.md index 8a82cc77e..cdc8f3bed 100644 --- a/docs/RELEASE-NOTES.md +++ b/docs/RELEASE-NOTES.md @@ -1,11 +1,6 @@ -These are the release notes for the Maps extension. +These are the release notes for the [Maps extension](../README.md). -Extension page on mediawiki.org: https://www.mediawiki.org/wiki/Extension:Maps -Latest version of the release notes: https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Maps.git;a=blob;f=RELEASE-NOTES - - -=== Maps 3.0 === -(dev) +## Maps 3.0 (dev) In this version a big part of the PHP codebase has been rewritten to decrease technical debt and thus facilatete maintenance, new feature delopment and debugging. Many tests have been added and a lot of @@ -37,10 +32,9 @@ bugs have been found and fixed. No big new features have been added. * Fixed autoinfowindows functionality. * Fixed various bugs in geocoordinate parsing and formatting. -=== Maps 2.0 === -(2012-10-05) +## Maps 2.0 (2012-10-05) -; Compatibility changes +#### Compatibility changes * Changed minimum PHP version from 5.2 to 5.3. * Changed minimum MediaWiki version from 1.17 to 1.18. @@ -49,7 +43,7 @@ bugs have been found and fixed. No big new features have been added. * Removed support for the now unsupported Yahoo! Maps API and associated geocoding service. * Temporary disabled OSM service (you can still use OSM with the OpenLayers service). -; New features +#### New features * Added support for defining an inline label to markers to GoogleMaps. * Added support for marker clustering to Google Maps. @@ -66,46 +60,42 @@ bugs have been found and fixed. No big new features have been added. * Added an optional link parameter as an alternative to popup bubble with text and title * Added an optional visitedicon parameter (both global and marker parameter), that will change the icon of a marker on click. -; Other improvements +#### Other improvements * Merged display_map and display_point(s) into a single parser function: display_map (display_points is now an alias). * Updates parameter definitions from Validator 0.4.x to Validator 0.5.x. * Improved script loading. * Added various unit tests that caught some bugs and will now prevent regressions. -; Bug fixes +#### Bug fixes * Fixed JavaScript error on some special pages due to incorrect order of map initialization. * Fixed partially broken kml functionality. -=== Maps 1.0.5 === -(2011-11-30) +## Maps 1.0.5 (2011-11-30) * Fixed display of attribution control for OpenLayers. * Fixed to big precision of geographic coordinates in decimal minutes format (bug 32407). -=== Maps 1.0.4 === -(2011-10-15) +## Maps 1.0.4 (2011-10-15) * Updated OpenLayers from 2.10 to 2.11. * Fixed bug in adding adittional markers for Google Maps v3 (mainly affecting the Semantic Maps form input). -=== Maps 1.0.3 === -(2011-09-14) +## Maps 1.0.3 (2011-09-14) * Added API module for geocoding. * Added 'geocoding' right. * Added kmlrezoom parameter for Google Maps v3 and general $egMapsRezoomForKML setting. * Fixed Google Maps v3 JavaScript issue occuring on MediaWiki 1.17. -=== Maps 1.0.2 === -(2011-08-24) +## Maps 1.0.2 (2011-08-24) * Fixed Google Maps v3 JavaScript issue occuring when using Google Earth on unsupported systems. * Fixed internationalization of distances (bug 30467). -=== Maps 1.0.1 === -(2011-08-17) +## Maps 1.0.1 (2011-08-17) + * Added language parameter to the mapsdoc hook. @@ -119,8 +109,7 @@ bugs have been found and fixed. No big new features have been added. * Added tilt parameter for Google Earth in Google Maps v3. -=== Maps 1.0 === -(2011-07-19) +## Maps 1.0 (2011-07-19) This version branched from Maps 0.7.x at version 0.7.3. From 66f6fa7dc4bce7db02afee468cd3582bff8f110a Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 23:33:41 +0100 Subject: [PATCH 077/163] Update rel notes Change-Id: If0889407a2127addbe16b52de4c99ceb99ee0adb --- docs/RELEASE-NOTES.md | 309 +++++++++++++++++++----------------------- 1 file changed, 143 insertions(+), 166 deletions(-) diff --git a/docs/RELEASE-NOTES.md b/docs/RELEASE-NOTES.md index cdc8f3bed..5498b1144 100644 --- a/docs/RELEASE-NOTES.md +++ b/docs/RELEASE-NOTES.md @@ -3,17 +3,17 @@ These are the release notes for the [Maps extension](../README.md). ## Maps 3.0 (dev) In this version a big part of the PHP codebase has been rewritten to decrease technical debt and thus -facilatete maintenance, new feature delopment and debugging. Many tests have been added and a lot of +facilitate maintenance, new feature deployment and debugging. Many tests have been added and a lot of bugs have been found and fixed. No big new features have been added. -; Compatibility changes +#### Compatibility changes * Changed minimum Validator version from 0.5 to 1.0. * DataValues is now required. Version 0.1 or later. * ValueParsers is now required. Version 0.1 or later. * ValueFormatters is now required. Version 0.1 or later. -; New features +#### New features * Added leaflet service * Added Geocoder.us geoservice support @@ -27,7 +27,7 @@ bugs have been found and fixed. No big new features have been added. * Geocoding interfaces changed * MapsLocation interface changed -; Bug fixes +#### Bug fixes * Fixed autoinfowindows functionality. * Fixed various bugs in geocoordinate parsing and formatting. @@ -80,18 +80,18 @@ bugs have been found and fixed. No big new features have been added. ## Maps 1.0.4 (2011-10-15) * Updated OpenLayers from 2.10 to 2.11. -* Fixed bug in adding adittional markers for Google Maps v3 (mainly affecting the Semantic Maps form input). +* Fixed bug in adding additional markers for Google Maps v3 (mainly affecting the Semantic Maps form input). ## Maps 1.0.3 (2011-09-14) * Added API module for geocoding. * Added 'geocoding' right. * Added kmlrezoom parameter for Google Maps v3 and general $egMapsRezoomForKML setting. -* Fixed Google Maps v3 JavaScript issue occuring on MediaWiki 1.17. +* Fixed Google Maps v3 JavaScript issue occurring on MediaWiki 1.17. ## Maps 1.0.2 (2011-08-24) -* Fixed Google Maps v3 JavaScript issue occuring when using Google Earth on unsupported systems. +* Fixed Google Maps v3 JavaScript issue occurring when using Google Earth on unsupported systems. * Fixed internationalization of distances (bug 30467). ## Maps 1.0.1 (2011-08-17) @@ -182,7 +182,7 @@ This version branched from Maps 0.7.x at version 0.7.3. * Fixed incompatibility with MW 1.15.x. -* Fixed incorect parsing of certain DM and DMS coordinates. +* Fixed incorrect parsing of certain DM and DMS coordinates. * Fixed small layout issue with pop-ups in Google Maps. @@ -368,50 +368,39 @@ service interaction. ==== New features ==== -* Added support for width and height in px, ex, em and %, instead of only px, allowing for maps that adjust their size to the screen width and other content. - -* Added full support for both directional and non-directional coordinate notations in DMS, DD, DM and float notation. - +* Added support for width and height in px, ex, em and %, instead of only px, allowing for maps that +adjust their size to the screen width and other content. +* Added full support for both directional and non-directional coordinate notations in DMS, DD, DM +and float notation. * Added #coordinates parser function which allows rewformatting of coordinates to all supported notations. - -* Rewrote the #geocode parser function to work with named parameters and added support for smart geocoding. Now takes in all supported coordinate notations, and is able to output in all of them as well. - +* Rewrote the #geocode parser function to work with named parameters and added support for smart +geocoding. Now takes in all supported coordinate notations, and is able to output in all of them as well. * Added #geodistance function (based on the one in MathFunctions) with smart geocoding support. - * Added #finddestination function with smart geocoding support. ==== Refactoring ==== -* Rewrote the handling of the display_map and display_point(s) parser functions, esp the way the service parameter is getting determined and acted upon. - +* Rewrote the handling of the display_map and display_point(s) parser functions, esp the way the +service parameter is getting determined and acted upon. * Removed the MapsMapFeature class to make the base classes for the features more independent and flexible. - * Restructured the directory structure to make what the services and features are more clear. - * Rewrote map divs and added loading message for each map. - * Rewrote individual map JS to be added to the page header. - -* Mayor clean up of the coordinate handling, to allow for coordinate formatting and to facilitate better integration by the GeoCoords data type in Semantic Maps. All this code is now located in MapsCoordinateParser. - +* Mayor clean up of the coordinate handling, to allow for coordinate formatting and to facilitate +better integration by the GeoCoords data type in Semantic Maps. All this code is now located in MapsCoordinateParser. * Use native MW hook system for mapping services and features if possible. - * Updated the magic words to mw >=1.16 style, and retained backward compatibility. - * Updated the OpenLayers version from 2.8 to 2.9. - * Rewrote the parameter definitions to work with Validator 0.3. - * Rewrote the resource inclusion html to make the code cleaner and more secure. ==== Bug fixes ==== -* Changed parsing of parameters so that '=' signs in values don't cause themselves and proceeding characters to be omitted. - -* Add mapping to the language codes that are send to the Google Maps API to null the naming differences between MW and the API. - +* Changed parsing of parameters so that '=' signs in values don't cause themselves and +proceeding characters to be omitted. +* Add mapping to the language codes that are send to the Google Maps API to null the naming +differences between MW and the API. * Added automatic icon image sizing for Google Maps and Yahoo! Maps markers. - * Fixed conflict with prototype library that caused compatibility problems with the Halo extension. === Maps 0.5.5. === @@ -424,9 +413,7 @@ service interaction. ==== Bug fixes ==== * Fixed issue with scrollbar in pop-ups on Google Maps maps. - * Fixed Google Maps key issue with OpenLayers that arose from the new OpenLayers layer definition system. - * Fixed JS issue with Google Maps default overlays. === Maps 0.5.4 === @@ -435,7 +422,6 @@ service interaction. ==== New features ==== * Added the ability to define the layers (and their dependencies) that can be added by users to an OpenLayers map. - * Added the ability to define "layer groups" for OpenLayers layers. ==== Refactoring ==== @@ -445,9 +431,7 @@ service interaction. ==== Bug fixes ==== * Fixed bug causing the default zoom for each mapping service to be off. - * Fixed potential xss vectors. - * Fixed minor JS error that was present for all maps except OSM. === Maps 0.5.3 === @@ -470,7 +454,8 @@ service interaction. ==== New features ==== -* Added icon parameter to display_point(s), allowing you to set the icon for all markers that do not have a specific icon assigned. +* Added icon parameter to display_point(s), allowing you to set the icon for all markers that do not +have a specific icon assigned. ==== Refactoring ==== @@ -479,7 +464,6 @@ service interaction. ==== Bug fixes ==== * Fixed escaping issue causing wikitext in the title and label parameters not to be displayed correctly. - * Fixed file path for location specific icons. === Maps 0.5.1 === @@ -487,18 +471,16 @@ service interaction. ==== New features ==== -* Integrated further with Validator by holding into account the error level for coordinate validation in the display_ parser functions. +* Integrated further with Validator by holding into account the error level for coordinate validation +in the display_ parser functions. * Added activatable= parameter to the static map support. ==== Refactoring ==== * Cleaned up the static map code for OSM display_map. - * Modified the parameter definitions to work with Validator 0.2 - * Removed redundant (because of Validator 0.2) utility function calls from the mapping classes. - * Removed redundant (because of Validator 0.2) utility functions from the mapping service files. ==== Bug fixes ==== @@ -511,29 +493,26 @@ service interaction. ==== New features ==== * Added strict parameter validation. - * Added smart 'autopanzoom' like control for Google Maps and Yahoo! Maps. - * Added internationalization to the OSM service, and an extra parameter to define per-map languages. - * Static map support, similar and based upon SlippyMap. ==== Refactoring ==== * Rewrite the parameter handling to be more centralized and modular. -** Make it possible to override the info of parameters for mapping services, including their aliases, default values and criteria. -** Make it possible to add and override parameters in each segment of Maps, instead of only the mapping services. +** Make it possible to override the info of parameters for mapping services, including +their aliases, default values and criteria. +** Make it possible to add and override parameters in each segment of Maps, instead of only +the mapping services. * Cleaned up and centralized parser function code. - -* Refactored the marker specific data handling code in every display point class up to a central location. - +* Refactored the marker specific data handling code in every display point class up to +a central location. * Removed backward compatibility (to 0.2.x and earlier) of the earth parameter. - * Removed support for Google Map API map type names for Google Maps. - -* Added code to unload any services from the service hook that are not present in the list of allowed services. This ensures they don't get initialized, and makes any check to see if the service is one of the allowed ones further on unneeded. - +* Added code to unload any services from the service hook that are not present in the list of +allowed services. This ensures they don't get initialized, and makes any check to see if the +service is one of the allowed ones further on unneeded. * Added checks for extension dependencies that need to be present for Maps to be initialized. ==== Bug fixes ==== @@ -543,39 +522,41 @@ service interaction. ==== Documenting ==== * Created screencast demonstrating display_map usage. - * Creates screencast demonstrating display_point usage. - -* Updated the developer documentation about hooking into and extending Maps to be useful for the current version. +* Updated the developer documentation about hooking into and extending Maps to be useful +for the current version. ===Maps 0.4.2=== (2009-11-15) Changes in 0.4.2 discussed on the authors blog: -* [http://blog.bn2vs.com/2009/11/16/maps-and-semantic-maps-0-4-2/ Maps and Semantic Maps 0.4.2 released] -* [http://blog.bn2vs.com/2009/11/12/new-in-maps-0-4-2/ New in Maps 0.4.2] +* [Maps and Semantic Maps 0.4.2 released](http://blog.bn2vs.com/2009/11/16/maps-and-semantic-maps-0-4-2/) +* [New in Maps 0.4.2](http://blog.bn2vs.com/2009/11/12/new-in-maps-0-4-2/) ==== New features ==== -* Added overlays to Google Maps. This includes both an 'overlay' control, and a new parameter to choose the available and default loaded overlays. - -* Added specific handling for the coordinates= and addresses= parameters for both display_map and display_point(s). You can now specify you do not want anything that's not a coordinate on your map (so no geocoding) with the coordinates= parameter, or let Maps know everything is an address with the addresses= parameter, causing everything to be geocoded. Also modified the error messages for wrong addresses and coordinates to fit this new behavior. +* Added overlays to Google Maps. This includes both an 'overlay' control, and a new parameter +to choose the available and default loaded overlays. +* Added specific handling for the coordinates= and addresses= parameters for both display_map +and display_point(s). You can now specify you do not want anything that's not a coordinate on +your map (so no geocoding) with the coordinates= parameter, or let Maps know everything is +an address with the addresses= parameter, causing everything to be geocoded. Also modified +the error messages for wrong addresses and coordinates to fit this new behavior. ==== Refactoring ==== -* Added the version of Maps to the JS files call, to prevent issues when functions or calls are changed in new versions. - -* Changed the JavaScript map parameters for Google Maps from individual parameters to a groupe. +* Added the version of Maps to the JS files call, to prevent issues when functions or calls +are changed in new versions. +* Changed the JavaScript map parameters for Google Maps from individual parameters to a group. ==== Bug fixes ==== * Fixed inclusion path to the OSM JS file. This bug prevented any OSM maps from showing up. - -* Fixed display_map and the centre parameter of display_point(s). Both are unusable by a bug introduced in 0.4.1. - -* Fixed bug causing to many decimal digits in some coordinate notations, making them unrecognisable for Maps. - +* Fixed display_map and the centre parameter of display_point(s). Both are unusable by a bug +introduced in 0.4.1. +* Fixed bug causing to many decimal digits in some coordinate notations, making them unrecognisable +for Maps. * Fixed bug causing a form of DD notation not to get recognized. ===Maps 0.4.1=== @@ -583,108 +564,104 @@ Changes in 0.4.2 discussed on the authors blog: ==== Bug fixes ==== -* Fixed problems with the ° sign, caused by wrong file encodings, resulting into problems with the DMS notation. - -* Fixed flaw in DMS to float translation, resulting into a map being displayed when the values where not separated by a comma. +* Fixed problems with the ° sign, caused by wrong file encodings, resulting into problems with +the DMS notation. +* Fixed flaw in DMS to float translation, resulting into a map being displayed when the values +where not separated by a comma. === Maps 0.4 === (2009-11-03) Changes in 0.4 discussed on the authors blog: -* [http://blog.bn2vs.com/2009/11/03/finally-maps-and-semantic-maps-0-4/ Finally! Maps and Semantic Maps 0.4!] +* [Finally! Maps and Semantic Maps 0.4!](http://blog.bn2vs.com/2009/11/03/finally-maps-and-semantic-maps-0-4/) ==== New features ==== * Added display_map parser function, to display maps without any markers. - * Added parsing of marker-specific title and label values. - -* Added geocoding support for the centre parameter. This is based on automatic detection of non-coordinates to see if geocoding is required, similar to the modified behavior of display_point(s). - +* Added geocoding support for the centre parameter. This is based on automatic detection of +non-coordinates to see if geocoding is required, similar to the modified behavior of display_point(s). * Added minimum and maximum map size restrictions, like done in SlippyMap. - * Added OSM mapping service, which uses OL, but only allows OSM layers and is optimized for OSM. - -* Added smart 'autopanzoom' control to OL and OSM services. It will determine for itself if a panzoom, panzoombar, or no control should be displayed, depending on the maps height. - +* Added smart 'autopanzoom' control to OL and OSM services. It will determine for itself if a +panzoom, panzoombar, or no control should be displayed, depending on the maps height. * Added support for DM and DD coordinate notations. ==== Refactoring ==== -* Created a hook system for the parser functions, allowing the adding or removing of additional parser function support. - +* Created a hook system for the parser functions, allowing the adding or removing of additional +parser function support. * Removed redundant absolute script path variable. This absolute value caused problems for some installations. - * Changed the geocoding functionality into a true feature hook element, enabling easy removal. - * Created service hook for the geocoding feature, loose from the mapping services hook. - -* Changed display_point(s) and display_address(es) to display_point(s), with auto detect functionality to see if the provided value are coordinates or addresses. display_address and display_addresses have been retained for backward compatibility, but will be removed from the docs. Backward compatibility will be removed at some point, so the use of these functions is discouraged. +* Changed display_point(s) and display_address(es) to display_point(s), with auto detect +functionality to see if the provided value are coordinates or addresses. display_address and +display_addresses have been retained for backward compatibility, but will be removed from the docs. +Backward compatibility will be removed at some point, so the use of these functions is discouraged. ==== Bug fixes ==== * Fixed issue with the default parameter for the display_address(es) parser functions. - -* Fixed major bug in the initialization method causing hook code to get executed at a probably wrong moment. This bug can be the cause of some weird problems that surfaced since 0.3.3. - -* Fixed issue with size of pop-ups in Google Maps. They did not stretch far enough vertically for large contents. +* Fixed major bug in the initialization method causing hook code to get executed at a probably +wrong moment. This bug can be the cause of some weird problems that surfaced since 0.3.3. +* Fixed issue with size of pop-ups in Google Maps. They did not stretch far enough vertically +for large contents. ===Maps 0.3.4=== (2009-09-12) Changes in 0.3.4 discussed on the authors blog: -* [http://blog.bn2vs.com/2009/09/12/maps-and-semantic-maps-0-3-4-released/ Maps and Semantic Maps 0.3.4 released] +* [Maps and Semantic Maps 0.3.4 released](http://blog.bn2vs.com/2009/09/12/maps-and-semantic-maps-0-3-4-released/) ====New features==== -* Created hook system for features, which now also allows you to specify which features should be enabled and which not. +* Created hook system for features, which now also allows you to specify which features +should be enabled and which not. ====Refactoring==== -* Added old style geocoding request again for people who do not have cURL enabled, plus a more consistent fall-back mechanism. - +* Added old style geocoding request again for people who do not have cURL enabled, plus a +more consistent fall-back mechanism. * Added internationalization for the mapping service names. - * Added internationalized list notations. - * Restructured the parser function handling code to work with the new feature hook system. - * Improved structure of geocoding classes. - * Moved Semantic Maps JavaScript code from the Maps JS files to new SM JS files. - * Fixed tiny performance issues all over the code. ====Bug fixes==== -* Fixed issue with empty parameters (par=value||par2=value2) that caused the default parameter (coordinate(s)/address(es)) to be overridden if it occurred after the default one was set. - -* Fixed wrong error message when you provide a coordinate(s)/address(es) parameter without any value (ie |coordinates=|) +* Fixed issue with empty parameters (par=value||par2=value2) that caused the default parameter +(coordinate(s)/address(es)) to be overridden if it occurred after the default one was set. +* Fixed wrong error message when you provide a coordinate(s)/address(es) parameter without +any value (ie |coordinates=|) ===Maps 0.3.3=== (2009-08-25) Changes in 0.3.3 discussed on the authors blog: -* [http://blog.bn2vs.com/2009/08/25/maps-and-semantic-maps-0-3-3/ Maps and Semantic Maps 0.3.3] +* [Maps and Semantic Maps 0.3.3](http://blog.bn2vs.com/2009/08/25/maps-and-semantic-maps-0-3-3/) ====New features==== -*Added [http://www.geonames.org GeoNames] geocoding support. This is an open source geocoding service, that does not require a licence. It has been made the default geocoding service. - -* Added wiki-text rendering to the values of the title and label parameters, allowing users to pass along links, images, and more. +*Added [http://www.geonames.org GeoNames] geocoding support. This is an open source geocoding +service, that does not require a licence. It has been made the default geocoding service. +* Added wiki-text rendering to the values of the title and label parameters, allowing users +to pass along links, images, and more. ====Refactoring==== * Refactored some common functionality of the geocoder classes up to MapsBaseGeocoder. - -* Minor issue - the OpenLayers default zoom should be closer, when displaying one point - see the last map in [http://discoursedb.org/wiki/One-point_map the same page]. +* Minor issue - the OpenLayers default zoom should be closer, when displaying one +point - see the last map in [http://discoursedb.org/wiki/One-point_map the same page]. ====Bug fixes==== -* Fixed small bug in MapsMapper::inParamAliases that caused the determination of the geoservice to fail in some cases, and set it to the default. +* Fixed small bug in MapsMapper::inParamAliases that caused the determination of the +geoservice to fail in some cases, and set it to the default. ===Maps 0.3.2=== (2009-08-18) @@ -701,100 +678,100 @@ Release for consistency. Only changes to Semantic Maps where made in 0.3.2. ====Refactoring==== * Added check to see if the classes array is present in a mapping service info array. - -* Added check to see if a mapping service has handling for parser functions. In 0.3, Maps assumed it had, preventing the adding of mapping services that only have a form input or/and query printer. - -* The getValidService function now holds into account that not every service has support for both parser functions, query printers and form inputs. +* Added check to see if a mapping service has handling for parser functions. In 0.3, +Maps assumed it had, preventing the adding of mapping services that only have a form input or/and query printer. +* The getValidService function now holds into account that not every service has support for +both parser functions, query printers and form inputs. ====Bug fixes==== -* Added path to extension directory to non local class item in a service's info array, since adding the path is impossible in the declaration. +* Added path to extension directory to non local class item in a service's info array, +since adding the path is impossible in the declaration. ===Maps 0.3=== (2009-08-14) Changes in 0.3 discussed on the authors blog: -* [http://blog.bn2vs.com/2009/08/13/final-changes-for-maps-and-sm-0-3/ Final changes for Maps and SM 0.3] - -* [http://blog.bn2vs.com/2009/08/07/new-features-in-maps-and-sm-0-3/ New features in Maps and SM 0.3] - -* [http://blog.bn2vs.com/2009/08/05/structural-changes-for-maps-and-sm-0-3/ Structural changes for Maps and SM 0.3] +* [Final changes for Maps and SM 0.3](http://blog.bn2vs.com/2009/08/13/final-changes-for-maps-and-sm-0-3/) +* [New features in Maps and SM 0.3](http://blog.bn2vs.com/2009/08/07/new-features-in-maps-and-sm-0-3/) +* [Structural changes for Maps and SM 0.3](http://blog.bn2vs.com/2009/08/05/structural-changes-for-maps-and-sm-0-3/) ====New features==== -* Multi location parser functions. Two completely new parser functions have been added that allow the displaying of multiple points on a map. - -* Configurable map type controls. Users can now configure the map type controls of Google maps and Yahoo! maps maps. They can set the available map types, and the order they want them to be displayed in the map type control. - -* Property names now have aliases. This means you can add several alternative ways to name the same parameter, for instance, you can make so that ‘auto zoom’ and ‘auto-zoom’ will do excellently the same as the main parameter ‘autozoom’. This is particularly handy for parameters such as ‘centre’ (British spelling) and ‘center’ (American spelling). - +* Multi location parser functions. Two completely new parser functions have been added that +allow the displaying of multiple points on a map. +* Configurable map type controls. Users can now configure the map type controls of Google +maps and Yahoo! maps maps. They can set the available map types, and the order they want +them to be displayed in the map type control. +* Property names now have aliases. This means you can add several alternative ways to name +the same parameter, for instance, you can make so that ‘auto zoom’ and ‘auto-zoom’ will do +excellently the same as the main parameter ‘autozoom’. This is particularly handy for +parameters such as ‘centre’ (British spelling) and ‘center’ (American spelling). * Added Google Maps moon, Mars and sky support. - -* Controls on both Yahoo! Maps and Google Maps map can now be configured by the user with the controls parameter. Yahoo! Maps maps already have this option for a limited set of controls since version 0.2, but the amount of available controls has now been expanded to what the Yahoo! Maps API offers. For Google Maps the change is significantly larger, since a lot of new controls can now be added. These included an overview map, a scale line, a drop down menu for map types, an automated reverse geocoding location determiner and more. - -* Added the ability to specify separate title, label and icon values for each marker in the display_points and display_addresses parser functions. - +* Controls on both Yahoo! Maps and Google Maps map can now be configured by the user with +the controls parameter. Yahoo! Maps maps already have this option for a limited set of +controls since version 0.2, but the amount of available controls has now been expanded +to what the Yahoo! Maps API offers. For Google Maps the change is significantly larger, +since a lot of new controls can now be added. These included an overview map, a scale +line, a drop down menu for map types, an automated reverse geocoding location determiner +and more. +* Added the ability to specify separate title, label and icon values for each marker +in the display_points and display_addresses parser functions. * Added user friendly notices for when geocoding of an address fails. - -* A whole list of OpenLayers base layers have been added. These include the satellite, street and hybrid views for Yahoo! Maps and Bing Maps, but also finally the OpenStreetMap layers. +* A whole list of OpenLayers base layers have been added. These include the satellite, +street and hybrid views for Yahoo! Maps and Bing Maps, but also finally the OpenStreetMap layers. ====Refactoring==== -* Created hook system for the mapping services. All hard-coded references to mapping services in the core code have been removed. A service is now added by one multi dimensional array in Maps.php (note that this can also be done in the initialization file of another extension!), which holds the name of the parser functions class and it’s location, the aliases for the service name (feature added in 0.2), and their allowed specific parameters and their aliases. This architecture allows other people to create their own mapping extension using the Maps (and Semantic Maps) ‘API’. - +* Created hook system for the mapping services. All hard-coded references to mapping +services in the core code have been removed. A service is now added by one multi dimensional +array in Maps.php (note that this can also be done in the initialization file of another +extension!), which holds the name of the parser functions class and it’s location, the +aliases for the service name (feature added in 0.2), and their allowed specific parameters +and their aliases. This architecture allows other people to create their own mapping +extension using the Maps (and Semantic Maps) ‘API’. * Created a class that bundles common functionality from MapsBaseMap and SMFormInput. - -* Rewrote parts of the geocoder base class. - +* Rewrote parts of the geocoder base class. * Added separated handling for default parameter for each mapping service. - * Changed the requests in the geocoder classes to CURL requests to avoid security issues. - * Moved common, parser function specific, functions and variables from MapsMapper to a new MapsParserFunctions class. - * Moved common code within the mapping services out of the parser function class to a new utility classes. ====Bug fixes==== * Fixed issue preventing the extension description from showing up in 0.2.1 & 0.2.2. - * Fixed bug that caused Bing maps (for open layers) to not work. -===Maps 0.2=== -(2009-07-29) +## Maps 0.2 (2009-07-29) -====New features==== +#### New features * Added Backward compatibility by using the $wgGoogleMapsKey when this one is set and $egGoogleMapsKey isn't. - * Added hook for [[Extension:Admin_Links|Admin Links]]. - * Added a true aliasing system for service names. - -* Created a centre parameter, that will allow you to set a custom map centre (different from the place where the marker will be put). - +* Created a centre parameter, that will allow you to set a custom map centre (different from the +place where the marker will be put). * Added pop-ups for the markers with title and label parameters to determine the pop-up contents. - -* Changed the OpenLayers control handling. Make it accept all (36) OL controls by using eval() instead of a switch statement in the JavaScript. - +* Changed the OpenLayers control handling. Make it accept all (36) OL controls by using eval() +instead of a switch statement in the JavaScript. * Added the 'physical' button in the map type control of Google Maps maps when this map type is set. - * Added Yahoo! geocoder support (for parser functions). -====Refactoring==== - -* Refactored MapsBaseMap and all it's child classes. This will vastly increase code centralization and decrease redundant logic and definitions. +#### Refactoring -* Did a major rewrite of the Google Maps and Yahoo! Maps code. The parser function classes now only print a call to a JS function with all needed parameters, which then does all the logic and creates the map. +* Refactored MapsBaseMap and all it's child classes. This will vastly increase code +centralization and decrease redundant logic and definitions. +* Did a major rewrite of the Google Maps and Yahoo! Maps code. The parser function +classes now only print a call to a JS function with all needed parameters, which then +does all the logic and creates the map. -====Bug fixes==== - -* Fixed issue causing aliases for service names getting turned into the default service since they are not in the allowed services list. +#### Bug fixes +* Fixed issue causing aliases for service names getting turned into the default +service since they are not in the allowed services list. * Removed redundant parts of the OpenLayers library. -===Maps 0.1=== -(2009-07-20) +## Maps 0.1 (2009-07-20) * Initial release, featuring Google Maps (+ Google Earth), Yahoo! Maps and OpenLayers mapping services. From 2928d8ef1264943d0f387645f86e892e55b972a7 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 23:34:04 +0100 Subject: [PATCH 078/163] up links in rel notes Change-Id: I27a72f79f66749a1e58a51df474c64f919d4b0d3 --- docs/RELEASE-NOTES.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/RELEASE-NOTES.md b/docs/RELEASE-NOTES.md index 5498b1144..ec7953b9b 100644 --- a/docs/RELEASE-NOTES.md +++ b/docs/RELEASE-NOTES.md @@ -531,8 +531,8 @@ for the current version. Changes in 0.4.2 discussed on the authors blog: -* [Maps and Semantic Maps 0.4.2 released](http://blog.bn2vs.com/2009/11/16/maps-and-semantic-maps-0-4-2/) -* [New in Maps 0.4.2](http://blog.bn2vs.com/2009/11/12/new-in-maps-0-4-2/) +* [Maps and Semantic Maps 0.4.2 released](http://www.bn2vs.com/blog/2009/11/16/maps-and-semantic-maps-0-4-2/) +* [New in Maps 0.4.2](http://www.bn2vs.com/blog/2009/11/12/new-in-maps-0-4-2/) ==== New features ==== @@ -574,7 +574,7 @@ where not separated by a comma. Changes in 0.4 discussed on the authors blog: -* [Finally! Maps and Semantic Maps 0.4!](http://blog.bn2vs.com/2009/11/03/finally-maps-and-semantic-maps-0-4/) +* [Finally! Maps and Semantic Maps 0.4!](http://www.bn2vs.com/blog/2009/11/03/finally-maps-and-semantic-maps-0-4/) ==== New features ==== @@ -613,7 +613,7 @@ for large contents. Changes in 0.3.4 discussed on the authors blog: -* [Maps and Semantic Maps 0.3.4 released](http://blog.bn2vs.com/2009/09/12/maps-and-semantic-maps-0-3-4-released/) +* [Maps and Semantic Maps 0.3.4 released](http://www.bn2vs.com/blog/2009/09/12/maps-and-semantic-maps-0-3-4-released/) ====New features==== @@ -643,7 +643,7 @@ any value (ie |coordinates=|) Changes in 0.3.3 discussed on the authors blog: -* [Maps and Semantic Maps 0.3.3](http://blog.bn2vs.com/2009/08/25/maps-and-semantic-maps-0-3-3/) +* [Maps and Semantic Maps 0.3.3](http://www.bn2vs.com/blog/2009/08/25/maps-and-semantic-maps-0-3-3/) ====New features==== @@ -693,9 +693,9 @@ since adding the path is impossible in the declaration. Changes in 0.3 discussed on the authors blog: -* [Final changes for Maps and SM 0.3](http://blog.bn2vs.com/2009/08/13/final-changes-for-maps-and-sm-0-3/) -* [New features in Maps and SM 0.3](http://blog.bn2vs.com/2009/08/07/new-features-in-maps-and-sm-0-3/) -* [Structural changes for Maps and SM 0.3](http://blog.bn2vs.com/2009/08/05/structural-changes-for-maps-and-sm-0-3/) +* [Final changes for Maps and SM 0.3](http://www.bn2vs.com/blog/2009/08/13/final-changes-for-maps-and-sm-0-3/) +* [New features in Maps and SM 0.3](http://www.bn2vs.com/blog/2009/08/07/new-features-in-maps-and-sm-0-3/) +* [Structural changes for Maps and SM 0.3](http://www.bn2vs.com/blog/2009/08/05/structural-changes-for-maps-and-sm-0-3/) ====New features==== From 9e7bf1f241f1eaa7b63ff20bdbe63781895bfd23 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 23:35:19 +0100 Subject: [PATCH 079/163] Update rel notes Change-Id: I5d6da091202e47b7e9f85a1e00735e165ea8f393 --- docs/RELEASE-NOTES.md | 194 ++++++++++++++++++++---------------------- 1 file changed, 94 insertions(+), 100 deletions(-) diff --git a/docs/RELEASE-NOTES.md b/docs/RELEASE-NOTES.md index ec7953b9b..f861f4223 100644 --- a/docs/RELEASE-NOTES.md +++ b/docs/RELEASE-NOTES.md @@ -18,7 +18,7 @@ bugs have been found and fixed. No big new features have been added. * Added leaflet service * Added Geocoder.us geoservice support -; Breaking internal changes +#### Breaking internal changes * Moved classes into Maps namespace * Removed all Criteria classes @@ -96,24 +96,18 @@ bugs have been found and fixed. No big new features have been added. ## Maps 1.0.1 (2011-08-17) - * Added language parameter to the mapsdoc hook. - * Use of Validator 0.4.10s setMessage method instead of setDescription for better i18n. - * Fixed zoom and types parameters for Google Maps v3. - * Minor improvement to script loading. - * Added support for Google Earth in Google Maps v3. - * Added tilt parameter for Google Earth in Google Maps v3. ## Maps 1.0 (2011-07-19) This version branched from Maps 0.7.x at version 0.7.3. -==== New features ==== +#### New features #### * Added full Google Maps v3 support and set it as the default mapping service. @@ -123,7 +117,7 @@ This version branched from Maps 0.7.x at version 0.7.3. * Added resizeable parameter to all mapping services except OSM. -==== Removed features ==== +#### Removed features #### * Removed compatibility with pre MediaWiki 1.17. @@ -131,7 +125,7 @@ This version branched from Maps 0.7.x at version 0.7.3. * Removed the previously deprecated "display map", "display point" and "display points" parser hooks. Use their underscored equivalents, ie "display_map". -==== Internal improvements ==== +#### Internal improvements #### * Usage of the Resource Loader for all scripts and stylesheets. @@ -145,7 +139,7 @@ This version branched from Maps 0.7.x at version 0.7.3. * Completed coordinate and distance parser/formatter unit tests and made them compliant with the MediaWiki unit testing support. -==== Bug fixes ==== +#### Bug fixes #### * Fixed geocoding service overriding based on mapping service (merged in from Maps 0.7.5). @@ -155,11 +149,11 @@ This version branched from Maps 0.7.x at version 0.7.3. * Fixed coordinate normalization issue (bug 29421). -==== Other tweaks ==== +#### Other tweaks #### * Improved default width of maps (merged in from Maps 0.7.5). -=== Maps 0.7.3 === +## Maps 0.7.3 ## (2010-11-30) * Some internal improvements and translation updates. @@ -167,18 +161,18 @@ This version branched from Maps 0.7.x at version 0.7.3. * Fixed issue occurring when Maps is the only extension adding custom namespaces. -=== Maps 0.7.2 === +## Maps 0.7.2 ## (2010-10-28) -==== New features ==== +#### New features #### * Added experimental support for KML layer definitions. -==== Internal improvements ==== +#### Internal improvements #### * Extended the layer handling to support different types of layers, each of which can be supported by one or more mapping services. -==== Bug fixes ==== +#### Bug fixes #### * Fixed incompatibility with MW 1.15.x. @@ -188,27 +182,27 @@ This version branched from Maps 0.7.x at version 0.7.3. * Fixed incorrect error on non-existing pages in the Layer namespace. -=== Maps 0.7.1 === +## Maps 0.7.1 ## (2010-10-20) -==== New features ==== +#### New features #### * Image layers for OpenLayers maps, defined via pages in the Layer namespace. -==== Bug fixes ==== +#### Bug fixes #### * Support for images without namespace prefix in the display points parser hook. * Fixed layer oder for OpenLayers maps. -==== Internal improvements ==== +#### Internal improvements #### * Rewrote OpenLayers layer handling. -=== Maps 0.7 === +## Maps 0.7 ## (2010-10-15) -==== New features ==== +#### New features #### * Tag support for these parser hooks (which previously only had parser function support): ** Coordinates @@ -219,7 +213,7 @@ This version branched from Maps 0.7.x at version 0.7.3. * Thumbs and photos parameters for the OSM service. -==== Bug fixes ==== +#### Bug fixes #### * Fixed compatibility with the MW 1.17 resource loader. @@ -229,11 +223,11 @@ This version branched from Maps 0.7.x at version 0.7.3. * Increased the maximum decimals for DMS coordinates from 2 to 20. -==== Removed features ==== +#### Removed features #### * #geocodelong and #geocodelat parser functions - you can obtain their functionality using #geocode. -==== Internal improvements ==== +#### Internal improvements #### * Rewrote the geocoding functionality. It's now an integral part of the extension that can not be just pulled out, while the reverse is true for individual geocoders. Geocoder interaction now uses the same model as mapping @@ -247,22 +241,22 @@ service interaction. * Use of OpenLayers 2.10 instead of 2.9. -=== Maps 0.6.6 === +## Maps 0.6.6 ## (2010-08-26) -==== New features ==== +#### New features #### * Support for geocoding over proxies. * Added $egMapsInternatDirectionLabels settings, allowing users to disable internationalization of direction labels. -==== Refactoring ==== +#### Refactoring #### * Added MapsMappingServices, which serves as factory for MapsPappingService objects and does away with all the globals previously needed for this. * Removed the http/curl request code from the geocoder classes - now using Http:get() instead. -==== Bug fixes ==== +#### Bug fixes #### * Fixed issue that caused pop-up contents to render incorrectly when it contained wiki markup. @@ -270,10 +264,10 @@ service interaction. * Fixed spacing issues with several parser functions. -=== Maps 0.6.5 === +## Maps 0.6.5 ## (2010-07-27) -==== Refactoring ==== +#### Refactoring #### * Added unit tests for the coordinates parser. @@ -289,16 +283,16 @@ service interaction. * Improved coordinate recognition regexes. -==== Bug fixes ==== +#### Bug fixes #### * Fixed several small coordinate parsing and formatting issues. * Fixed a few small distance parsing issues. -=== Maps 0.6.4 === +## Maps 0.6.4 ## (2010-07-08) -==== New features ==== +#### New features #### * Added new OSM service based on iframe inclusion of toolserver page that renders OpenStreetMap tiles with Wikipedia overlays. @@ -308,11 +302,11 @@ service interaction. * Added 'searchbar' control for Google Maps v2. -==== Refactoring ==== +#### Refactoring #### * Moved more functionality over from feature classes to service classes to prevent crazy code-flow and code duplication. -==== Bug fixes ==== +#### Bug fixes #### * Fixed bug in the OpenLayers service causing it to display badly in Chrome. @@ -320,23 +314,23 @@ service interaction. * Fixed several small bugs in the coordinate parser. -=== Maps 0.6.3 === +## Maps 0.6.3 ## (2010-06-20) -==== Refactoring ==== +#### Refactoring #### * Mayor refactoring of the mapping service handling, to make the code flow less messy and be able to do mapping service related things in a more consistent fashion. * Upgrade to OpenLayers 2.9.1. -==== Bug fixes ==== +#### Bug fixes #### * Fixed severe bug in the coordinate parsing that removed the degree symbol from passes values, resulting in rendering most of them invalid. Presumably present since 0.6.2. -=== Maps 0.6.2 === +## Maps 0.6.2 ## (2010-06-07) -==== New features ==== +#### New features #### * Added #distance parser function parse distances using any of the supported units and outputting them in any of these. @@ -346,14 +340,14 @@ service interaction. * Default parameter handling improvements (via Validator 0.3.2). -==== Bug fixes ==== +#### Bug fixes #### * Re-added parameter name and value insensitivity (via Validator 0.3.2). -=== Maps 0.6.1 === +## Maps 0.6.1 ## (2010-06-04) -==== Bug fixes ==== +#### Bug fixes #### * Fixed bug that caused geocoding requests to fail when using display_points @@ -363,10 +357,10 @@ service interaction. * Fixed issue that made custom markers on Google Maps not show up on initial page load and centred them wrongly. -=== Maps 0.6 === +## Maps 0.6 ## (2010-05-31) -==== New features ==== +#### New features #### * Added support for width and height in px, ex, em and %, instead of only px, allowing for maps that adjust their size to the screen width and other content. @@ -378,7 +372,7 @@ geocoding. Now takes in all supported coordinate notations, and is able to outpu * Added #geodistance function (based on the one in MathFunctions) with smart geocoding support. * Added #finddestination function with smart geocoding support. -==== Refactoring ==== +#### Refactoring #### * Rewrote the handling of the display_map and display_point(s) parser functions, esp the way the service parameter is getting determined and acted upon. @@ -394,7 +388,7 @@ better integration by the GeoCoords data type in Semantic Maps. All this code is * Rewrote the parameter definitions to work with Validator 0.3. * Rewrote the resource inclusion html to make the code cleaner and more secure. -==== Bug fixes ==== +#### Bug fixes #### * Changed parsing of parameters so that '=' signs in values don't cause themselves and proceeding characters to be omitted. @@ -403,101 +397,101 @@ differences between MW and the API. * Added automatic icon image sizing for Google Maps and Yahoo! Maps markers. * Fixed conflict with prototype library that caused compatibility problems with the Halo extension. -=== Maps 0.5.5. === +## Maps 0.5.5. ## (2010-03-20) -==== Refactoring ==== +#### Refactoring #### * Stylized the code to conform to MediaWiki's spacing conventions. -==== Bug fixes ==== +#### Bug fixes #### * Fixed issue with scrollbar in pop-ups on Google Maps maps. * Fixed Google Maps key issue with OpenLayers that arose from the new OpenLayers layer definition system. * Fixed JS issue with Google Maps default overlays. -=== Maps 0.5.4 === +## Maps 0.5.4 ## (2010-03-01) -==== New features ==== +#### New features #### * Added the ability to define the layers (and their dependencies) that can be added by users to an OpenLayers map. * Added the ability to define "layer groups" for OpenLayers layers. -==== Refactoring ==== +#### Refactoring #### * Moved the OpenLayers layer definition validation and selection from JS to PHP. -==== Bug fixes ==== +#### Bug fixes #### * Fixed bug causing the default zoom for each mapping service to be off. * Fixed potential xss vectors. * Fixed minor JS error that was present for all maps except OSM. -=== Maps 0.5.3 === +## Maps 0.5.3 ## (2010-02-01) -==== New features ==== +#### New features #### * Added Google Maps v3 support for display_map. -==== Refactoring ==== +#### Refactoring #### * Added service defaulting for features using a hook themselves. -==== Bug fixes ==== +#### Bug fixes #### * Fixed JavaScript bug causing all OSM maps to fail. -=== Maps 0.5.2 === +## Maps 0.5.2 ## (2010-01-20) -==== New features ==== +#### New features #### * Added icon parameter to display_point(s), allowing you to set the icon for all markers that do not have a specific icon assigned. -==== Refactoring ==== +#### Refactoring #### * Usage of Validator 0.2 features for the static map specific parameters. -==== Bug fixes ==== +#### Bug fixes #### * Fixed escaping issue causing wikitext in the title and label parameters not to be displayed correctly. * Fixed file path for location specific icons. -=== Maps 0.5.1 === +## Maps 0.5.1 ## (2009-12-25) -==== New features ==== +#### New features #### * Integrated further with Validator by holding into account the error level for coordinate validation in the display_ parser functions. * Added activatable= parameter to the static map support. -==== Refactoring ==== +#### Refactoring #### * Cleaned up the static map code for OSM display_map. * Modified the parameter definitions to work with Validator 0.2 * Removed redundant (because of Validator 0.2) utility function calls from the mapping classes. * Removed redundant (because of Validator 0.2) utility functions from the mapping service files. -==== Bug fixes ==== +#### Bug fixes #### * Fixed issue with the hook system that caused code to get executed when it shouldn't. -=== Maps 0.5 === +## Maps 0.5 ## (2009-12-17) -==== New features ==== +#### New features #### * Added strict parameter validation. * Added smart 'autopanzoom' like control for Google Maps and Yahoo! Maps. * Added internationalization to the OSM service, and an extra parameter to define per-map languages. * Static map support, similar and based upon SlippyMap. -==== Refactoring ==== +#### Refactoring #### * Rewrite the parameter handling to be more centralized and modular. ** Make it possible to override the info of parameters for mapping services, including @@ -515,18 +509,18 @@ allowed services. This ensures they don't get initialized, and makes any check t service is one of the allowed ones further on unneeded. * Added checks for extension dependencies that need to be present for Maps to be initialized. -==== Bug fixes ==== +#### Bug fixes #### * Fixed bug causing markers not to show up when a specific description was provided. -==== Documenting ==== +#### Documenting #### * Created screencast demonstrating display_map usage. * Creates screencast demonstrating display_point usage. * Updated the developer documentation about hooking into and extending Maps to be useful for the current version. -===Maps 0.4.2=== +##Maps 0.4.2## (2009-11-15) Changes in 0.4.2 discussed on the authors blog: @@ -534,7 +528,7 @@ Changes in 0.4.2 discussed on the authors blog: * [Maps and Semantic Maps 0.4.2 released](http://www.bn2vs.com/blog/2009/11/16/maps-and-semantic-maps-0-4-2/) * [New in Maps 0.4.2](http://www.bn2vs.com/blog/2009/11/12/new-in-maps-0-4-2/) -==== New features ==== +#### New features #### * Added overlays to Google Maps. This includes both an 'overlay' control, and a new parameter to choose the available and default loaded overlays. @@ -544,13 +538,13 @@ your map (so no geocoding) with the coordinates= parameter, or let Maps know eve an address with the addresses= parameter, causing everything to be geocoded. Also modified the error messages for wrong addresses and coordinates to fit this new behavior. -==== Refactoring ==== +#### Refactoring #### * Added the version of Maps to the JS files call, to prevent issues when functions or calls are changed in new versions. * Changed the JavaScript map parameters for Google Maps from individual parameters to a group. -==== Bug fixes ==== +#### Bug fixes #### * Fixed inclusion path to the OSM JS file. This bug prevented any OSM maps from showing up. * Fixed display_map and the centre parameter of display_point(s). Both are unusable by a bug @@ -559,24 +553,24 @@ introduced in 0.4.1. for Maps. * Fixed bug causing a form of DD notation not to get recognized. -===Maps 0.4.1=== +##Maps 0.4.1## (2009-11-10) -==== Bug fixes ==== +#### Bug fixes #### * Fixed problems with the ° sign, caused by wrong file encodings, resulting into problems with the DMS notation. * Fixed flaw in DMS to float translation, resulting into a map being displayed when the values where not separated by a comma. -=== Maps 0.4 === +## Maps 0.4 ## (2009-11-03) Changes in 0.4 discussed on the authors blog: * [Finally! Maps and Semantic Maps 0.4!](http://www.bn2vs.com/blog/2009/11/03/finally-maps-and-semantic-maps-0-4/) -==== New features ==== +#### New features #### * Added display_map parser function, to display maps without any markers. * Added parsing of marker-specific title and label values. @@ -588,7 +582,7 @@ non-coordinates to see if geocoding is required, similar to the modified behavio panzoom, panzoombar, or no control should be displayed, depending on the maps height. * Added support for DM and DD coordinate notations. -==== Refactoring ==== +#### Refactoring #### * Created a hook system for the parser functions, allowing the adding or removing of additional parser function support. @@ -600,7 +594,7 @@ functionality to see if the provided value are coordinates or addresses. display display_addresses have been retained for backward compatibility, but will be removed from the docs. Backward compatibility will be removed at some point, so the use of these functions is discouraged. -==== Bug fixes ==== +#### Bug fixes #### * Fixed issue with the default parameter for the display_address(es) parser functions. * Fixed major bug in the initialization method causing hook code to get executed at a probably @@ -608,19 +602,19 @@ wrong moment. This bug can be the cause of some weird problems that surfaced sin * Fixed issue with size of pop-ups in Google Maps. They did not stretch far enough vertically for large contents. -===Maps 0.3.4=== +##Maps 0.3.4## (2009-09-12) Changes in 0.3.4 discussed on the authors blog: * [Maps and Semantic Maps 0.3.4 released](http://www.bn2vs.com/blog/2009/09/12/maps-and-semantic-maps-0-3-4-released/) -====New features==== +####New features#### * Created hook system for features, which now also allows you to specify which features should be enabled and which not. -====Refactoring==== +####Refactoring#### * Added old style geocoding request again for people who do not have cURL enabled, plus a more consistent fall-back mechanism. @@ -631,51 +625,51 @@ more consistent fall-back mechanism. * Moved Semantic Maps JavaScript code from the Maps JS files to new SM JS files. * Fixed tiny performance issues all over the code. -====Bug fixes==== +####Bug fixes#### * Fixed issue with empty parameters (par=value||par2=value2) that caused the default parameter (coordinate(s)/address(es)) to be overridden if it occurred after the default one was set. * Fixed wrong error message when you provide a coordinate(s)/address(es) parameter without any value (ie |coordinates=|) -===Maps 0.3.3=== +##Maps 0.3.3## (2009-08-25) Changes in 0.3.3 discussed on the authors blog: * [Maps and Semantic Maps 0.3.3](http://www.bn2vs.com/blog/2009/08/25/maps-and-semantic-maps-0-3-3/) -====New features==== +####New features#### *Added [http://www.geonames.org GeoNames] geocoding support. This is an open source geocoding service, that does not require a licence. It has been made the default geocoding service. * Added wiki-text rendering to the values of the title and label parameters, allowing users to pass along links, images, and more. -====Refactoring==== +####Refactoring#### * Refactored some common functionality of the geocoder classes up to MapsBaseGeocoder. * Minor issue - the OpenLayers default zoom should be closer, when displaying one point - see the last map in [http://discoursedb.org/wiki/One-point_map the same page]. -====Bug fixes==== +####Bug fixes#### * Fixed small bug in MapsMapper::inParamAliases that caused the determination of the geoservice to fail in some cases, and set it to the default. -===Maps 0.3.2=== +##Maps 0.3.2## (2009-08-18) Release for consistency. Only changes to Semantic Maps where made in 0.3.2. -===Maps 0.3.1=== +##Maps 0.3.1## (2009-08-18) -====New features==== +####New features#### * Users can now define a default service for each feature - parser functions, query printers and form inputs. -====Refactoring==== +####Refactoring#### * Added check to see if the classes array is present in a mapping service info array. * Added check to see if a mapping service has handling for parser functions. In 0.3, @@ -683,12 +677,12 @@ Maps assumed it had, preventing the adding of mapping services that only have a * The getValidService function now holds into account that not every service has support for both parser functions, query printers and form inputs. -====Bug fixes==== +####Bug fixes#### * Added path to extension directory to non local class item in a service's info array, since adding the path is impossible in the declaration. -===Maps 0.3=== +##Maps 0.3## (2009-08-14) Changes in 0.3 discussed on the authors blog: @@ -697,7 +691,7 @@ Changes in 0.3 discussed on the authors blog: * [New features in Maps and SM 0.3](http://www.bn2vs.com/blog/2009/08/07/new-features-in-maps-and-sm-0-3/) * [Structural changes for Maps and SM 0.3](http://www.bn2vs.com/blog/2009/08/05/structural-changes-for-maps-and-sm-0-3/) -====New features==== +####New features#### * Multi location parser functions. Two completely new parser functions have been added that allow the displaying of multiple points on a map. @@ -722,7 +716,7 @@ in the display_points and display_addresses parser functions. * A whole list of OpenLayers base layers have been added. These include the satellite, street and hybrid views for Yahoo! Maps and Bing Maps, but also finally the OpenStreetMap layers. -====Refactoring==== +####Refactoring#### * Created hook system for the mapping services. All hard-coded references to mapping services in the core code have been removed. A service is now added by one multi dimensional @@ -738,7 +732,7 @@ extension using the Maps (and Semantic Maps) ‘API’. * Moved common, parser function specific, functions and variables from MapsMapper to a new MapsParserFunctions class. * Moved common code within the mapping services out of the parser function class to a new utility classes. -====Bug fixes==== +####Bug fixes#### * Fixed issue preventing the extension description from showing up in 0.2.1 & 0.2.2. * Fixed bug that caused Bing maps (for open layers) to not work. From b7de7c7d31062064ef9269f6f92c655ff5ea7a47 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 23:36:31 +0100 Subject: [PATCH 080/163] Update rel notes Change-Id: I9e1adc34c5b8e6d87de2d955eb9a31a675d506df --- docs/RELEASE-NOTES.md | 61 +++++-------------------------------------- 1 file changed, 7 insertions(+), 54 deletions(-) diff --git a/docs/RELEASE-NOTES.md b/docs/RELEASE-NOTES.md index f861f4223..0efb129cc 100644 --- a/docs/RELEASE-NOTES.md +++ b/docs/RELEASE-NOTES.md @@ -110,43 +110,32 @@ This version branched from Maps 0.7.x at version 0.7.3. #### New features #### * Added full Google Maps v3 support and set it as the default mapping service. - * Added new geocoder making use of the new GeoNames API. - * Added support for the auto-documentation features for parser hooks introduced in Validator 0.4.3. - * Added resizeable parameter to all mapping services except OSM. #### Removed features #### * Removed compatibility with pre MediaWiki 1.17. - * Removed overlays parameter for Google Maps v2. - -* Removed the previously deprecated "display map", "display point" and "display points" parser hooks. Use their underscored equivalents, ie "display_map". +* Removed the previously deprecated "display map", "display point" and "display points" parser hooks. +Use their underscored equivalents, ie "display_map". #### Internal improvements #### * Usage of the Resource Loader for all scripts and stylesheets. - * Rewrote all the map JavaScript to jQuery plugins. - * Rewrote the way parameters are translated to JavaScript. Now one big PHP object is json_encoded. - * Improved KML formatter. - * Use of Google Maps geocoding service v3 instead of v2. - -* Completed coordinate and distance parser/formatter unit tests and made them compliant with the MediaWiki unit testing support. +* Completed coordinate and distance parser/formatter unit tests and made them compliant with the +MediaWiki unit testing support. #### Bug fixes #### * Fixed geocoding service overriding based on mapping service (merged in from Maps 0.7.5). - * Fixed fatal error occurring when running maintenance/refreshLinks.php. - * Fixed DMS coordinate parsing issue (bug 29419). - * Fixed coordinate normalization issue (bug 29421). #### Other tweaks #### @@ -157,10 +146,8 @@ This version branched from Maps 0.7.x at version 0.7.3. (2010-11-30) * Some internal improvements and translation updates. - * Fixed issue occurring when Maps is the only extension adding custom namespaces. - ## Maps 0.7.2 ## (2010-10-28) @@ -175,11 +162,8 @@ This version branched from Maps 0.7.x at version 0.7.3. #### Bug fixes #### * Fixed incompatibility with MW 1.15.x. - * Fixed incorrect parsing of certain DM and DMS coordinates. - * Fixed small layout issue with pop-ups in Google Maps. - * Fixed incorrect error on non-existing pages in the Layer namespace. ## Maps 0.7.1 ## @@ -192,7 +176,6 @@ This version branched from Maps 0.7.x at version 0.7.3. #### Bug fixes #### * Support for images without namespace prefix in the display points parser hook. - * Fixed layer oder for OpenLayers maps. #### Internal improvements #### @@ -210,17 +193,13 @@ This version branched from Maps 0.7.x at version 0.7.3. ** Finddestination ** Geocode ** Geodistance - * Thumbs and photos parameters for the OSM service. #### Bug fixes #### * Fixed compatibility with the MW 1.17 resource loader. - * Fixed i18n issue with the overlays control for Google Maps v2 maps. - * Fixed default zoom level for Yahoo! Maps maps. - * Increased the maximum decimals for DMS coordinates from 2 to 20. #### Removed features #### @@ -232,13 +211,9 @@ This version branched from Maps 0.7.x at version 0.7.3. * Rewrote the geocoding functionality. It's now an integral part of the extension that can not be just pulled out, while the reverse is true for individual geocoders. Geocoder interaction now uses the same model as mapping service interaction. - * Use of Validator 0.4, allowing for more robust and consistent error reporting. - * Rewrote the parser hooks to use the ParserHook class provided by Validator. - * Restructured the directory structure of the extension to better match it's architecture. - * Use of OpenLayers 2.10 instead of 2.9. ## Maps 0.6.6 ## @@ -247,21 +222,18 @@ service interaction. #### New features #### * Support for geocoding over proxies. - * Added $egMapsInternatDirectionLabels settings, allowing users to disable internationalization of direction labels. #### Refactoring #### -* Added MapsMappingServices, which serves as factory for MapsPappingService objects and does away with all the globals previously needed for this. - +* Added MapsMappingServices, which serves as factory for MapsPappingService objects and does away +with all the globals previously needed for this. * Removed the http/curl request code from the geocoder classes - now using Http:get() instead. #### Bug fixes #### * Fixed issue that caused pop-up contents to render incorrectly when it contained wiki markup. - * Fixed coordinate parsing bug (direction labels did not get recognized) that was introduced in 0.6.4. - * Fixed spacing issues with several parser functions. ## Maps 0.6.5 ## @@ -270,23 +242,16 @@ service interaction. #### Refactoring #### * Added unit tests for the coordinates parser. - * Created iMappingFeature interface, from which iMapParserFunctions inherits. - * Moved map id creation to the mapping service class for all features. - -* Moved marker JavaScript creation for display_points to the mapping service class for all features. - +* Moved marker JavaScript creation for display_points to the mapping service class for all features. * Moved default zoom level access method to the mapping service class for all features. - * Improved the way marker data is turned into JavaScript variables. - * Improved coordinate recognition regexes. #### Bug fixes #### * Fixed several small coordinate parsing and formatting issues. - * Fixed a few small distance parsing issues. ## Maps 0.6.4 ## @@ -295,11 +260,8 @@ service interaction. #### New features #### * Added new OSM service based on iframe inclusion of toolserver page that renders OpenStreetMap tiles with Wikipedia overlays. - * Added internationalization to the OpenLayers service. - * Added support for including KML files for Google Maps v2. - * Added 'searchbar' control for Google Maps v2. #### Refactoring #### @@ -309,9 +271,7 @@ service interaction. #### Bug fixes #### * Fixed bug in the OpenLayers service causing it to display badly in Chrome. - * Fixed issue with with and height validation for % values, also causing backward compatibility problems with pre 0.6 setting definitions. - * Fixed several small bugs in the coordinate parser. ## Maps 0.6.3 ## @@ -320,7 +280,6 @@ service interaction. #### Refactoring #### * Mayor refactoring of the mapping service handling, to make the code flow less messy and be able to do mapping service related things in a more consistent fashion. - * Upgrade to OpenLayers 2.9.1. #### Bug fixes #### @@ -333,11 +292,8 @@ service interaction. #### New features #### * Added #distance parser function parse distances using any of the supported units and outputting them in any of these. - * Made supported distance units configurable and added setting for the default distance unit. - * Added 'decimals' and 'unit' parameters to #geosiatnce. - * Default parameter handling improvements (via Validator 0.3.2). #### Bug fixes #### @@ -350,11 +306,8 @@ service interaction. #### Bug fixes #### * Fixed bug that caused geocoding requests to fail when using display_points - * Fixed bug that had broken the geoservice parameter for display_points and display_map. - * Fixed bug that made OSM layers in the OpenLayers service fail. - * Fixed issue that made custom markers on Google Maps not show up on initial page load and centred them wrongly. ## Maps 0.6 ## From 6e141ada420279f2babf017d9898a181677c43c6 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 23:43:54 +0100 Subject: [PATCH 081/163] Update INSTALL.md --- docs/INSTALL.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index bd9c190f5..6deddaa6b 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -11,6 +11,7 @@ These are the installation and configuration instructions for the [Maps extensio Release date PHP MediaWiki + Git branch Maps 3.x @@ -18,13 +19,15 @@ These are the installation and configuration instructions for the [Maps extensio Future 5.3.2+ 1.18+ + [master](https://github.com/JeroenDeDauw/Maps/tree/master) - Maps 2.x + Maps 2.0.x Stable release 2012 5.3.2+ 1.18+ + [2.0.x](https://github.com/JeroenDeDauw/Maps/tree/2.0.x) Maps 1.0.5 @@ -32,6 +35,7 @@ These are the installation and configuration instructions for the [Maps extensio 2011-11-30 5.2+ 1.17+ + [1.0.5](https://github.com/JeroenDeDauw/Maps/tree/1.0.5) From a6dcf440f66a0556a23fe07b74e77e9b827bd69b Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 23:45:23 +0100 Subject: [PATCH 082/163] Update INSTALL.md --- docs/INSTALL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 6deddaa6b..5546877b3 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -19,7 +19,7 @@ These are the installation and configuration instructions for the [Maps extensio Future 5.3.2+ 1.18+ - [master](https://github.com/JeroenDeDauw/Maps/tree/master) + master Maps 2.0.x @@ -27,7 +27,7 @@ These are the installation and configuration instructions for the [Maps extensio 2012 5.3.2+ 1.18+ - [2.0.x](https://github.com/JeroenDeDauw/Maps/tree/2.0.x) + master Maps 1.0.5 @@ -35,7 +35,7 @@ These are the installation and configuration instructions for the [Maps extensio 2011-11-30 5.2+ 1.17+ - [1.0.5](https://github.com/JeroenDeDauw/Maps/tree/1.0.5) + master From dc9999da515a70b37e92b025f9005840e8aa6cc7 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 23:45:37 +0100 Subject: [PATCH 083/163] Update INSTALL.md --- docs/INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 5546877b3..9779fc9f9 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -27,7 +27,7 @@ These are the installation and configuration instructions for the [Maps extensio 2012 5.3.2+ 1.18+ - master + 2.0.x Maps 1.0.5 @@ -35,7 +35,7 @@ These are the installation and configuration instructions for the [Maps extensio 2011-11-30 5.2+ 1.17+ - master + 1.0.5 From d81ec7b5e9d7d3a59f56773a2bc48cab81cea580 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 23:46:27 +0100 Subject: [PATCH 084/163] Update INSTALL.md --- docs/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 9779fc9f9..6d0f5f646 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -2,7 +2,7 @@ These are the installation and configuration instructions for the [Maps extension](../README.md). -## Compatibility +## Versions From 47cbe75e90ea421909f7beb239098af7a33e36c8 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 23:49:28 +0100 Subject: [PATCH 085/163] Clean in entry point Change-Id: Ic0d76487496747bef863123d9686f94669e1e05e --- Maps.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/Maps.php b/Maps.php index d97a7679f..cf6c76f8f 100644 --- a/Maps.php +++ b/Maps.php @@ -2,31 +2,19 @@ /** * Initialization file for the Maps extension. - * - * On MediaWiki.org: http://www.mediawiki.org/wiki/Extension:Maps - * Official documentation: http://mapping.referata.com/wiki/Maps - * Examples/demo's: http://mapping.referata.com/wiki/Maps_examples + * https://github.com/JeroenDeDauw/Maps * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ -/** - * This documentation group collects source code files belonging to Maps. - * - * Please do not use this group name for other code. If you have an extension to - * Maps, please use your own group definition. - * - * @defgroup Maps Maps - */ - if ( !defined( 'MEDIAWIKI' ) ) { die( 'Not an entry point.' ); } if ( defined( 'Maps_VERSION' ) ) { // Do not initialize more then once. - return; + return 1; } define( 'Maps_VERSION' , '3.0 alpha' ); From 78cf261d8ae6a38395aced615e825b567a15a338 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 23:50:27 +0100 Subject: [PATCH 086/163] Ingore tests dir in git export Change-Id: I7246999367ff33e021371186c597ecb172abbe34 --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..bdd4ea29c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +/tests export-ignore \ No newline at end of file From 0c1b3649f416a13b84c9878b4e07de60d4907423 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 12 Nov 2013 23:52:44 +0100 Subject: [PATCH 087/163] Add to readme Change-Id: I666d8d0b4b574775f796ce885a4872b161113e9c --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a2e239455..b1958250f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ information. Features: * Powerful #display_map parser hook for embedding highly customizable dynamic maps into wiki pages. -* Support for multiple mapping services: Google Maps, OpenLayers, OpenStreetMap and Leaflet. +* Support for multiple mapping services: Google Maps, [OpenLayers](http://www.openlayers.org/), +[OpenStreetMap](www.openstreetmap.org/) and [Leaflet](http://leafletjs.com/). * Coordinate formatting and format conversion via the #coordinates parser function. * Geocoding via several supported services with the #geocode parser function. * Geospatial operations @@ -14,7 +15,8 @@ Features: ** Finding a destination given a starting point, bearing and distance with #finddestination * Distance formatting and format conversion via the #distance parser function. * Visual map editor (Special:MapEditor) to edit #display_map wikitext. -* Structured data support provided by the [Semantic Maps extension](https://www.mediawiki.org/wiki/Extension:Semantic_Maps). +* Structured data support provided by the [Semantic Maps extension] +(https://www.mediawiki.org/wiki/Extension:Semantic_Maps). View the [release notes](docs/RELEASE-NOTES.md) for recent changes to Maps. From 794007d2749ea366aa65dea06fed8057d8c3222c Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Tue, 12 Nov 2013 23:55:20 +0100 Subject: [PATCH 088/163] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b1958250f..8cc15c223 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ Features: * Coordinate formatting and format conversion via the #coordinates parser function. * Geocoding via several supported services with the #geocode parser function. * Geospatial operations -** Calculating the distance between two points with #geodistance -** Finding a destination given a starting point, bearing and distance with #finddestination + * Calculating the distance between two points with #geodistance + * Finding a destination given a starting point, bearing and distance with #finddestination * Distance formatting and format conversion via the #distance parser function. * Visual map editor (Special:MapEditor) to edit #display_map wikitext. * Structured data support provided by the [Semantic Maps extension] @@ -84,4 +84,4 @@ This extension includes the OpenStreetMap.js file which can be found * [Maps on MediaWiki.org](https://www.mediawiki.org/wiki/Extension:Maps) * [Maps on Packagist](https://packagist.org/packages/mediawiki/maps) * [TravisCI build status](https://travis-ci.org/JeroenDeDauw/Maps) -* [Semantic Maps on MediaWiki.org](https://www.mediawiki.org/wiki/Extension:Semantic_Maps) \ No newline at end of file +* [Semantic Maps on MediaWiki.org](https://www.mediawiki.org/wiki/Extension:Semantic_Maps) From 75a61279a4dc073c7e1528eff16ce94eed0e8e82 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Wed, 13 Nov 2013 00:06:06 +0100 Subject: [PATCH 089/163] Reduce complexity of Geocoders::geocode Change-Id: I430f16b78ef3bb9283a2274c8d2353f94cae14b7 --- includes/Geocoders.php | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/includes/Geocoders.php b/includes/Geocoders.php index a133bfc60..d670a9c56 100644 --- a/includes/Geocoders.php +++ b/includes/Geocoders.php @@ -189,6 +189,8 @@ public static function attemptToGeocodeToString( $coordsOrAddress, $service = '' * Geocodes an address with the provided geocoding service and returns the result * as an array, or false when the geocoding failed. * + * FIXME: complexity + * * @since 0.7 * * @param string $address @@ -223,27 +225,41 @@ public static function geocode( $address, $geoService = '', $mappingService = fa return $cacheResult; } } - + + $coordinates = self::getGeocoded( $geocoder, $address ); + + if ( $coordinates === false ) { + return false; + } + + self::cacheWrite( $address, $coordinates ); + + return $coordinates; + } + + private static function getGeocoded( Geocoder $geocoder, $address ) { + $coordinates = self::getGeocodedAsArray( $geocoder, $address ); + + if ( $coordinates !== false ) { + $coordinates = new LatLongValue( + $coordinates['lat'], + $coordinates['lon'] + ); + } + + return $coordinates; + } + + private static function getGeocodedAsArray( Geocoder $geocoder, $address ) { // Do the actual geocoding via the geocoder. $coordinates = $geocoder->geocode( $address ); - + // If there address could not be geocoded, and contains comma's, try again without the comma's. // This is cause several geocoding services such as geonames do not handle comma's well. if ( !$coordinates && strpos( $address, ',' ) !== false ) { $coordinates = $geocoder->geocode( str_replace( ',', '', $address ) ); } - if ( $coordinates === false ) { - return false; - } - - $coordinates = new LatLongValue( - $coordinates['lat'], - $coordinates['lon'] - ); - - self::cacheWrite( $address, $coordinates ); - return $coordinates; } From 8a7da2970a5b28f7b97cf0675176dc9ea5a88acf Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Wed, 13 Nov 2013 00:06:53 +0100 Subject: [PATCH 090/163] Add ScrutinizerCI badge Change-Id: I6ff4082b3f0a349f10745f7ff5ae4cd2578c8555 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b1958250f..881e66741 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ View the [release notes](docs/RELEASE-NOTES.md) for recent changes to Maps. [![Build Status](https://secure.travis-ci.org/JeroenDeDauw/Maps.png?branch=master)](http://travis-ci.org/JeroenDeDauw/Maps) [![Coverage Status](https://coveralls.io/repos/JeroenDeDauw/Maps/badge.png?branch=master)](https://coveralls.io/r/JeroenDeDauw/Maps?branch=master) +[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/JeroenDeDauw/Maps/badges/quality-score.png?s=3881a27e63cb64e7511d766bfec2e2db5d39bec3)](https://scrutinizer-ci.com/g/JeroenDeDauw/Maps/) [![Dependency Status](https://www.versioneye.com/php/mediawiki:maps/dev-master/badge.png)](https://www.versioneye.com/php/mediawiki:maps/dev-master) On [Packagist](https://packagist.org/packages/mediawiki/maps): From 8037fa2d0485c7f25ee1a00e0e4f34f974a05ba9 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Wed, 13 Nov 2013 00:10:09 +0100 Subject: [PATCH 091/163] Link to rel notes Change-Id: Icb8bb6a4ed99c8c6baac04d1694ce8926878bdc0 --- docs/INSTALL.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 6d0f5f646..d38e4b25d 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -14,7 +14,7 @@ These are the installation and configuration instructions for the [Maps extensio - + @@ -22,7 +22,7 @@ These are the installation and configuration instructions for the [Maps extensio - + @@ -30,7 +30,7 @@ These are the installation and configuration instructions for the [Maps extensio - + @@ -39,6 +39,8 @@ These are the installation and configuration instructions for the [Maps extensio
Git branch
Maps 3.xMaps 3.x Development version Future 5.3.2+master
Maps 2.0.xMaps 2.0.x Stable release 2012 5.3.2+2.0.x
Maps 1.0.5Maps 1.0.5 Legacy release 2011-11-30 5.2+
+ + ## Download and installation ### With Composer From 4b9c87383bfb03faa6cf347a057269c841617e66 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Wed, 13 Nov 2013 00:10:59 +0100 Subject: [PATCH 092/163] Update INSTALL.md --- docs/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index d38e4b25d..2b314e4f8 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -54,7 +54,7 @@ The package name is "mediawiki/maps", so your composer.json file should look as { "require": { // ... - "mediawiki/maps": ">=1.0" + "mediawiki/maps": ">=3.0" }, "minimum-stability" : "dev" } From 3983d76061b5e31a987302b2dc2b4f16b2588b31 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Wed, 13 Nov 2013 17:43:10 +0100 Subject: [PATCH 093/163] Specify package is a MW extension in composer.json Change-Id: Ibb4b6b2fbcb56298b301aefefe82b3b29dc1caff --- composer.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/composer.json b/composer.json index 20d4d6f7c..81bb23a6a 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,6 @@ { "name": "mediawiki/maps", + "type": "mediawiki-extension", "description": "Adds various mapping features to MediaWiki", "keywords": [ "MediaWiki", @@ -30,6 +31,7 @@ }, "require": { "php": ">=5.3.2", + "composer/installers": ">=1.0.1", "param-processor/param-processor": "dev-master", "data-values/data-values": "dev-master" }, From 1be752f7e4b69696e597224de8abbcb5e22ff8cb Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Wed, 13 Nov 2013 17:52:37 +0100 Subject: [PATCH 094/163] Update composer.json --- composer.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 81bb23a6a..cf1585fee 100644 --- a/composer.json +++ b/composer.json @@ -35,5 +35,10 @@ "param-processor/param-processor": "dev-master", "data-values/data-values": "dev-master" }, - "minimum-stability" : "dev" + "minimum-stability" : "dev", + "autoload": { + "files" : [ + "Maps.php" + ] + } } From 4a6054a3d6e8df39bc0e1cf1712ad902522d4b9c Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Wed, 13 Nov 2013 21:13:55 +0100 Subject: [PATCH 095/163] Update INSTALL.md --- docs/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 2b314e4f8..be967715f 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -14,7 +14,7 @@ These are the installation and configuration instructions for the [Maps extensio Git branch - Maps 3.x + Maps 3.x.x Development version Future 5.3.2+ From e83de9820a01ea092f87fda62fad18f0f500b026 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Wed, 13 Nov 2013 21:15:20 +0100 Subject: [PATCH 096/163] Update INSTALL.md --- docs/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index be967715f..be48c0fec 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -14,7 +14,7 @@ These are the installation and configuration instructions for the [Maps extensio Git branch - Maps 3.x.x + Maps 3.0.x Development version Future 5.3.2+ From dfe6d647c9503297da6b857b29e5de50941c2767 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Wed, 13 Nov 2013 20:22:23 +0000 Subject: [PATCH 097/163] Localisation updates from http://translatewiki.net. Change-Id: I2b9d910ad39790df13282b98a6990e4c114d11cc --- Maps.i18n.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index 8df19874b..025025aef 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -261,7 +261,9 @@ 'maps-desc' => '{{desc|name=Maps|url=http://www.mediawiki.org/wiki/Extension:Maps}}', 'right-geocode' => '{{doc-right|geocode}}', 'maps_map' => '{{Identical|Map}}', - 'maps-tracking-category' => 'The name of a category for all pages which use the display_map parser extension function or tag. The category is automatically added unless the feature is disabled.', + 'maps-tracking-category' => 'The name of a category for all pages which use the display_map parser extension function or tag. + +The category is automatically added unless the feature is disabled.', 'maps-copycoords-prompt' => 'text displayed in javascript prompt to indicate first press ctrl+c to copy text, and press enter to close prompt', 'maps-others' => '{{Identical|Other}}', 'maps-kml-parsing-failed' => 'text displayed in the event of parsing failure of kml file(s).', @@ -2173,6 +2175,7 @@ 'maps-desc' => "Permet d’afficher des cartes dynamiques dans les pages du wiki, des adresses géocodées et d'autres opérations géographiques. ([https://www.semantic-mediawiki.org/wiki/Maps more info...])", 'right-geocode' => 'Géocode', 'maps_map' => 'Carte', + 'maps-tracking-category' => 'Pages avec une carte provenant de l’extension Maps', 'maps-loading-map' => 'Chargement de la carte...', 'maps-load-failed' => 'Impossible de charger la carte !', 'maps-markers' => 'Marqueurs', @@ -2461,6 +2464,7 @@ 'maps-desc' => 'Permite incorporar mapas dinámicos, enderezos xeocodificados e outras operacións xeográficas ([https://www.semantic-mediawiki.org/wiki/Maps máis información...])', 'right-geocode' => 'Xeocodificar', 'maps_map' => 'Mapa', + 'maps-tracking-category' => 'Páxinas cun mapa renderizado coa extensión Maps', 'maps-loading-map' => 'Cargando o mapa...', 'maps-load-failed' => 'Non se puido cargar o mapa!', 'maps-markers' => 'Marcadores', @@ -3607,6 +3611,7 @@ 'maps-desc' => 'ウィキページへの動的な地図の埋め込み、住所の座標データへの変換、その他の地図関連の操作ができるようにする ([https://www.semantic-mediawiki.org/wiki/Maps 詳細情報...])', 'right-geocode' => 'ジオコーディング', 'maps_map' => '地図', + 'maps-tracking-category' => 'Maps拡張機能がレンダリングした地図があるページ', 'maps-loading-map' => '地図を読み込み中...', 'maps-load-failed' => '地図を読み込めませんでした。', 'maps-markers' => 'マーカー', @@ -4221,6 +4226,7 @@ 'maps-desc' => 'Дава можност за вметнување на динамички карти во викистраници, геокодирање на адреси и други географски операции. ([https://www.semantic-mediawiki.org/wiki/Maps?uselang=mk повеќе информации...])', 'right-geocode' => 'Геокод', 'maps_map' => 'Карта', + 'maps-tracking-category' => 'Страници со карта исцртана со додатокот „Карти“', 'maps-loading-map' => 'Ја вчитувам картата...', 'maps-load-failed' => 'Не можев да ја вчитам картата!', 'maps-markers' => 'Обележувачи', From 75b2c9e0b9efa23df3a180c31275d791726ac733 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sat, 16 Nov 2013 01:04:57 +0100 Subject: [PATCH 098/163] Remove gitattributes file --- .gitattributes | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index bdd4ea29c..000000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -/tests export-ignore \ No newline at end of file From 2834d21f91914900b74d7c3efee11114d54ee302 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sat, 16 Nov 2013 01:16:15 +0100 Subject: [PATCH 099/163] Update magic loading --- Maps.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maps.php b/Maps.php index cf6c76f8f..6d5de5a2c 100644 --- a/Maps.php +++ b/Maps.php @@ -36,12 +36,12 @@ // Include the DataValuesInterfaces library if that hasn't been done yet. if ( !defined( 'DATAVALUES_INTERFACES_VERSION' ) ) { - @include_once( __DIR__ . '/../DataValues/DataValuesInterfaces/DataValuesInterfaces.php' ); + @include_once( __DIR__ . '/../DataValuesInterfaces/DataValuesInterfaces.php' ); } // Include the DataValuesCommon library if that hasn't been done yet. if ( !defined( 'DATAVALUES_COMMON_VERSION' ) ) { - @include_once( __DIR__ . '/../DataValues/DataValuesCommon/DataValuesCommon.php' ); + @include_once( __DIR__ . '/../DataValuesCommon/DataValuesCommon.php' ); } // Only initialize the extension when all dependencies are present. From 1cde14760c522a776fe5bf26c63903ca0f5d2c4f Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sat, 16 Nov 2013 01:16:42 +0100 Subject: [PATCH 100/163] Update dependencies --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index cf1585fee..6e4dd19cb 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "php": ">=5.3.2", "composer/installers": ">=1.0.1", "param-processor/param-processor": "dev-master", - "data-values/data-values": "dev-master" + "data-values/common": "dev-master" }, "minimum-stability" : "dev", "autoload": { From 44dda6bfd59cfed30fe3561d054f4d620233259d Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sat, 16 Nov 2013 01:17:18 +0100 Subject: [PATCH 101/163] Rem obsolete info from package definition --- composer.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/composer.json b/composer.json index 6e4dd19cb..a2fe0f5df 100644 --- a/composer.json +++ b/composer.json @@ -25,8 +25,6 @@ "email": "semediawiki-user@lists.sourceforge.net", "issues": "https://bugzilla.wikimedia.org/", "irc": "irc://irc.freenode.net/mediawiki", - "forum": "https://www.mediawiki.org/wiki/Extension_talk:Maps", - "wiki": "https://www.mediawiki.org/wiki/Extension:Maps", "source": "https://github.com/JeroenDeDauw/Maps" }, "require": { From 4836ceca31f40ba42bab10298f09ba0b628e6fb9 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Sat, 16 Nov 2013 03:30:02 +0100 Subject: [PATCH 102/163] Update Maps_Settings.php --- Maps_Settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maps_Settings.php b/Maps_Settings.php index 046965ed1..7050428ca 100644 --- a/Maps_Settings.php +++ b/Maps_Settings.php @@ -1,7 +1,7 @@ Date: Sat, 16 Nov 2013 20:24:31 +0100 Subject: [PATCH 103/163] Update composer file --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index a2fe0f5df..1b76a079d 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "OSM", "OpenStreetMap" ], - "homepage": "https://www.mediawiki.org/wiki/Extension:Maps", + "homepage": "https://github.com/JeroenDeDauw/Maps", "license": "GPL-2.0+", "authors": [ { @@ -31,7 +31,7 @@ "php": ">=5.3.2", "composer/installers": ">=1.0.1", "param-processor/param-processor": "dev-master", - "data-values/common": "dev-master" + "data-values/geo": "*" }, "minimum-stability" : "dev", "autoload": { From d1c928da0461ef65ed5d3e0b0d0b749592e6cd47 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sat, 16 Nov 2013 20:25:30 +0100 Subject: [PATCH 104/163] Update INSTALL --- docs/INSTALL.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index be48c0fec..8eae11850 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -67,11 +67,7 @@ This need for this will be removed when Maps 3.0 is released. Alternatively you can obtain the Maps code and the code of all its dependencies yourself, and load them all. -The latest version of Maps requires: - -* ParamProcessor 1.0 or later -* DataValuesInterfaces 0.1 or later -* DataValuesCommon 0.1 or later +You can find a list of the dependencies in the "requires" section of the [composer.json file](../composer.json). You can get the Maps code itself: From 1f3894d219561c1a7675dcb2bd4f09e57e350621 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sun, 17 Nov 2013 20:25:42 +0000 Subject: [PATCH 105/163] Localisation updates from http://translatewiki.net. Change-Id: I760aed20addf1f5fd71909b3543b113dd8be33a7 --- Maps.i18n.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index 025025aef..aec902769 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -1255,6 +1255,7 @@ 'maps-abb-east' => 'Ø', 'maps-abb-south' => 'S', 'maps-abb-west' => 'V', + 'mapeditor-form-field-text' => 'Tekst', ); /** German (Deutsch) From afb829b8ea968148a979ffb790a2382968000970 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Mon, 18 Nov 2013 20:38:37 +0000 Subject: [PATCH 106/163] Localisation updates from http://translatewiki.net. Change-Id: If36bb2ad5ea615872ca110ee48e4ca1591974f7d --- Maps.i18n.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index aec902769..3f90fffcb 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -264,7 +264,7 @@ 'maps-tracking-category' => 'The name of a category for all pages which use the display_map parser extension function or tag. The category is automatically added unless the feature is disabled.', - 'maps-copycoords-prompt' => 'text displayed in javascript prompt to indicate first press ctrl+c to copy text, and press enter to close prompt', + 'maps-copycoords-prompt' => 'text displayed in JavaScript prompt to indicate first press ctrl+c to copy text, and press enter to close prompt', 'maps-others' => '{{Identical|Other}}', 'maps-kml-parsing-failed' => 'text displayed in the event of parsing failure of kml file(s).', 'maps-ns-layer' => '{{Identical|Layer}}', @@ -543,6 +543,7 @@ 'maps-desc' => 'Activa inxertar mapes dinámicos nes páxines wiki, xeocodificación de direiciones y otres operaciones xeográfiques. ([https://www.semantic-mediawiki.org/wiki/Maps más información...])', 'right-geocode' => 'Xeocódigu', 'maps_map' => 'Mapa', + 'maps-tracking-category' => 'Páxines con un mapa renderizáu pola estensión Maps', 'maps-loading-map' => "Cargando'l mapa...", 'maps-load-failed' => '¡Nun se pudo cargar el mapa!', 'maps-markers' => 'Marcadores', @@ -626,7 +627,7 @@ 'maps-displaymap-par-static' => "Si'l mapa tien de ser estáticu", 'maps-displaymap-par-wmsoverlay' => 'Usar una superposición WMS', 'maps-fullscreen-button' => 'Conmutar pantalla completa', - 'maps-fullscreen-button-tooltip' => 'Ver el mapa como pantalla completa/incrustáu.', # Fuzzy + 'maps-fullscreen-button-tooltip' => 'Ver el mapa como pantalla completa o incrustáu.', 'maps-googlemaps3-par-enable-fullscreen' => 'Activar el botón de pantalla completa', 'validation-error-invalid-location' => 'El parámetru $1 tien de ser un llugar válidu.', 'validation-error-invalid-locations' => 'El parámetru $1 tien de ser un o más llugares válidos.', @@ -1455,6 +1456,7 @@ /** Zazaki (Zazaki) * @author Erdemaslancan + * @author Gorizon * @author Mirzali */ $messages['diq'] = array( @@ -1474,7 +1476,7 @@ 'specialpages-group-maps' => 'Xeritey', 'mapeditor-none-text' => 'Çıniyo', 'mapeditor-done-button' => 'Qeyd ke', - 'mapeditor-remove-button' => 'Wedarne', + 'mapeditor-remove-button' => 'Hewad', 'mapeditor-import-button2' => 'Azare de', 'mapeditor-code-title' => 'Wiki kode', 'mapeditor-form-title' => 'Detaya timar ke', From c76e79023fc89ec3a15547179c5201493367acf3 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Tue, 19 Nov 2013 20:15:28 +0000 Subject: [PATCH 107/163] Localisation updates from http://translatewiki.net. Change-Id: I9c40fffbf8ca92dca7ed28c16ce3312ef98ac21b --- Maps.i18n.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index 3f90fffcb..47aea8144 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -5914,6 +5914,7 @@ 'maps-desc' => 'Позволяет встраивать динамические карты в вики-страницы, геокодировать адреса, выполнять другие географические действия. ([https://www.semantic-mediawiki.org/wiki/Maps подробнее...])', 'right-geocode' => 'геокодирование', 'maps_map' => 'Карта', + 'maps-tracking-category' => 'Страницы с картой, сгенерированной расширением Maps', 'maps-loading-map' => 'Идёт загрузка карты…', 'maps-load-failed' => 'Невозможно загрузить карту!', 'maps-markers' => 'Отметки', @@ -5940,6 +5941,7 @@ 'maps-finddestination-description' => 'Найти место назначения от заданной начальной точки (может быть в любом формате из поддерживаемых), начальное направление и расстояние.', 'maps-geocode-description' => 'Включает геокодирование адресов. Иными словами, преобразует понятные человеку названия мест в наборы координат. Поддерживается несколько сервисов геокодирования, которые не следует путать с картографическими сервисами.', 'maps-geodistance-description' => 'Рассчитать географическое расстояние между двумя точками, из любого и в любой поддерживаемый формат.', + 'maps-mapsdoc-par-language' => 'Язык, на котором отображается документация. Если перевод не доступен, вместо него будет использоваться английский язык.', 'maps-coordinates-par-location' => 'Координаты, которые требуется отформатировать.', 'maps-coordinates-par-format' => 'Целевой формат координат.', 'maps-coordinates-par-directional' => 'Указывает, должны ли координаты выводиться непосредственно или нет.', @@ -5973,6 +5975,7 @@ 'maps-geodistance-par-mappingservice' => 'Служба геокодирования, используемая для кодирования любого адреса.', 'maps-displaymap-par-mappingservice' => 'Позволяет выбрать сервис карт, который будет использоваться.', 'maps-displaymap-par-coordinates' => 'Одно или несколько мест для отображения на карте. Они будут обозначаться маркером.', + 'maps-displaymap-par-visitedicon' => 'Имя изображения, которое будет используется для значков-маркеров после того, как на них нажмут', 'maps-displaymap-par-icon' => 'Позволяет установить значок, используемый для всех маркеров.', 'maps-displaymap-par-circles' => 'Кружки для отображения', 'maps-displaymap-par-lines' => 'Линии для отображения', @@ -6013,6 +6016,7 @@ 'maps_centred_on' => 'Центр карты — $1, $2.', 'maps-par-mappingservice' => 'Позволяет выбрать сервис карт, который будет использоваться.', 'maps-par-resizable' => 'Даёт возможность изменять размер карты, потащив её за правый нижний угол.', + 'maps-par-centre' => 'Расположение на карте, по которому она должна быть отцентрована', 'maps-googlemaps3-incompatbrowser' => 'Ваш браузер несовместим с Google Maps v3.', 'maps-googlemaps3-par-type' => 'Тип карты для начального отображения.', 'maps-googlemaps3-par-types' => 'Типы карты, которые будут доступны через элемент управления типом карты.', @@ -6022,6 +6026,7 @@ 'maps-googlemaps3-par-autoinfowindows' => 'Автоматически открывает все информационные окна после загрузки страницы.', 'maps-googlemaps3-par-kml' => 'KML файлы для загрузки на карту.', 'maps-googlemaps3-par-gkml' => 'KML файлы, хранящиеся в Google для загрузки на карту.', + 'maps-googlemaps3-par-fusiontables' => 'Идентификаторы Сводных таблиц Google, которые должны быть загружены на карту.', 'maps-googlemaps3-par-poi' => 'Показать достопримечательности.', 'maps-openlayers-par-controls' => 'Элементы управления для размещения на карте.', 'maps-osm-par-thumbs' => 'Показать превью', From e388cc38ded8ea594dd8fc19351de0bd91852838 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Wed, 20 Nov 2013 20:43:06 +0000 Subject: [PATCH 108/163] Localisation updates from http://translatewiki.net. Change-Id: I38a01d47f0e94ca269d76214849d794f4675ecdf --- Maps.i18n.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index 47aea8144..34cbf23f0 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -5981,9 +5981,12 @@ 'maps-displaymap-par-lines' => 'Линии для отображения', 'maps-displaymap-par-maxzoom' => 'Максимальный уровень масштабирования', 'maps-displaymap-par-minzoom' => 'Минимальный уровень масштабирования', + 'maps-displaymap-par-polygons' => 'Полигоны для отображения', + 'maps-displaymap-par-rectangles' => 'Прямоугольники для отображения', 'maps-displaymap-par-static' => 'Если карта должна быть статичной', 'maps-displaymap-par-wmsoverlay' => 'Использовать слой WMS', 'maps-fullscreen-button' => 'Переключить полноэкранный режим', + 'maps-fullscreen-button-tooltip' => 'Посмотреть карту в полноэкранном или встроенном режиме.', 'maps-googlemaps3-par-enable-fullscreen' => 'Включить кнопку полноэкранного режима', 'validation-error-invalid-location' => 'Параметр $1 должен быть корректным местоположением.', 'validation-error-invalid-locations' => 'Параметр $1 должен содержать одно или несколько корректных местоположений.', @@ -5995,6 +5998,8 @@ 'validation-error-invalid-images' => 'Параметр $1 должен содержать одно или несколько корректных изображений.', 'validation-error-invalid-goverlay' => 'Параметр $1 должен быть корректным наложением.', 'validation-error-invalid-goverlays' => 'Параметр $1 должен содержать одно или несколько корректных наложений.', + 'validation-error-invalid-line-param' => 'Указан неверный параметр «lines».', + 'validation-error-invalid-polyline-param' => 'Указан недопустимый параметр «polylines».', 'maps-abb-north' => 'С', 'maps-abb-east' => 'В', 'maps-abb-south' => 'Ю', @@ -6027,6 +6032,8 @@ 'maps-googlemaps3-par-kml' => 'KML файлы для загрузки на карту.', 'maps-googlemaps3-par-gkml' => 'KML файлы, хранящиеся в Google для загрузки на карту.', 'maps-googlemaps3-par-fusiontables' => 'Идентификаторы Сводных таблиц Google, которые должны быть загружены на карту.', + 'maps-googlemaps3-par-tilt' => 'Наклон карты при использовании Google Maps.', + 'maps-googlemaps3-par-kmlrezoom' => 'Перемасштабировать карту после загрузки слоёв KML.', 'maps-googlemaps3-par-poi' => 'Показать достопримечательности.', 'maps-openlayers-par-controls' => 'Элементы управления для размещения на карте.', 'maps-osm-par-thumbs' => 'Показать превью', From b7019b655b436d9f376e27a2ab4994ec77ab6023 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Thu, 21 Nov 2013 23:32:10 +0100 Subject: [PATCH 109/163] Update package dependencies --- composer.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 1b76a079d..fd59912fa 100644 --- a/composer.json +++ b/composer.json @@ -30,10 +30,9 @@ "require": { "php": ">=5.3.2", "composer/installers": ">=1.0.1", - "param-processor/param-processor": "dev-master", - "data-values/geo": "*" + "mediawiki/validator": "dev-master", + "data-values/geo": "~0.1" }, - "minimum-stability" : "dev", "autoload": { "files" : [ "Maps.php" From c462476e08e893cddbe427954df037f273b486d7 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Thu, 21 Nov 2013 23:40:03 +0100 Subject: [PATCH 110/163] Update required Validator version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index fd59912fa..0439a8098 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "require": { "php": ">=5.3.2", "composer/installers": ">=1.0.1", - "mediawiki/validator": "dev-master", + "mediawiki/validator": "~1.0.0", "data-values/geo": "~0.1" }, "autoload": { From 6a2c5672f178bd1c53ddf048286ff5e90084be4c Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Fri, 22 Nov 2013 00:16:52 +0100 Subject: [PATCH 111/163] Update min Validator version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0439a8098..6773a7317 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "require": { "php": ">=5.3.2", "composer/installers": ">=1.0.1", - "mediawiki/validator": "~1.0.0", + "mediawiki/validator": ">=1.0.0.1", "data-values/geo": "~0.1" }, "autoload": { From 4b3a20a2fa3c510b74f6b37cfbd8292fd55ca50b Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sat, 23 Nov 2013 10:47:32 +0000 Subject: [PATCH 112/163] Localisation updates from https://translatewiki.net. Change-Id: Ifaabdf7fe9d3e07c6a48304e24601d7f406f4973 --- Maps.i18n.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index 34cbf23f0..bba990a1d 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -3925,7 +3925,7 @@ 'validation-error-invalid-goverlays' => '$1 변수는 하나 이상의 올바른 오버레이여야 합니다.', 'validation-error-invalid-line-param' => '"lines" 변수를 잘못 지정했습니다.', 'validation-error-invalid-polyline-param' => '"polylines" 변수를 잘못 지정했습니다.', - 'validation-error-invalid-searchmarkers-param' => '찾기표시 값이 잘못되었으며 "all"이나 "title" 중 하나여야 합니다', + 'validation-error-invalid-searchmarkers-param' => '검색표시 값이 잘못되었으며 "all"이나 "title" 중 하나여야 합니다', 'maps-abb-north' => '북', 'maps-abb-east' => '동', 'maps-abb-south' => '남', From ff2e48bb47c60f15d4819e7e6fd39cfd83ac055b Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sun, 24 Nov 2013 20:34:51 +0000 Subject: [PATCH 113/163] Localisation updates from https://translatewiki.net. Change-Id: I88934657533fc111eb0f3b69cda1e2d7d52569ab --- Maps.i18n.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index bba990a1d..87cc71610 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -1704,6 +1704,7 @@ * @author Crazymadlover * @author Dferg * @author Diego Grez + * @author Fitoschido * @author Imre * @author Locos epraix * @author MarcoAurelio @@ -1717,10 +1718,11 @@ 'maps-desc' => 'Habilita la inserción de mapas dinámicos en páginas wikis, la geocodificación de direcciones y otras operaciones geográficas. ([https://www.semantic-mediawiki.org/wiki/Maps Más información...])', 'right-geocode' => 'Geocodificar', 'maps_map' => 'Mapa', - 'maps-loading-map' => 'Cargando mapa...', - 'maps-load-failed' => '¡No se pudo cargar el mapa!', + 'maps-tracking-category' => 'Páginas con un mapa de la extensión Maps', + 'maps-loading-map' => 'Cargando el mapa…', + 'maps-load-failed' => 'No se pudo cargar el mapa.', 'maps-markers' => 'Marcadores', - 'maps-copycoords-prompt' => 'CTRL + C, ESCRIBA', + 'maps-copycoords-prompt' => 'Ctrl+C, Intro', 'maps-searchmarkers-text' => 'Marcadores de filtro', 'maps-others' => 'otros', 'maps-ns-layer' => 'Capa', @@ -1799,6 +1801,9 @@ 'maps-displaymap-par-rectangles' => 'Rectángulos a mostrar', 'maps-displaymap-par-static' => 'Si el mapa debe ser estático', 'maps-displaymap-par-wmsoverlay' => 'Utilizar una superposición WMS', + 'maps-fullscreen-button' => 'Activar o desactivar pantalla completa', + 'maps-fullscreen-button-tooltip' => 'Ver el mapa en toda la pantalla o incrustado.', + 'maps-googlemaps3-par-enable-fullscreen' => 'Activar el botón «Pantalla completa»', 'validation-error-invalid-location' => 'El parámetro $1 deber ser una ubicación válida.', 'validation-error-invalid-locations' => 'Parámetro $1 debe ser una o más ubicaciones válidas.', 'validation-error-invalid-width' => 'El parámetro $1 debe ser un ancho válido.', From bca6817dd0f09c73c4e1fd2440adc100e48fb620 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Fri, 29 Nov 2013 01:35:53 +0100 Subject: [PATCH 114/163] Up gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f078e9121..40a1c4e74 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ -.* *~ *.kate-swp !.* +.idea/ composer.phar composer.lock \ No newline at end of file From a3280a746c34e257d7a708afdcb1759ee6dc785d Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sat, 30 Nov 2013 01:33:28 +0100 Subject: [PATCH 115/163] Various loading tweaks and bump to 1.0 beta Change-Id: I8cebe9c297c21cbd4bf0fcce5242decf9e227978 --- .gitignore | 5 +- Maps.php | 63 +------------------ composer.json | 9 ++- .../Maps}/Elements/BaseElement.php | 0 {includes => src/Maps}/Elements/Circle.php | 0 .../Maps}/Elements/ImageOverlay.php | 0 {includes => src/Maps}/Elements/Line.php | 0 {includes => src/Maps}/Elements/Location.php | 0 {includes => src/Maps}/Elements/Polygon.php | 0 {includes => src/Maps}/Elements/Rectangle.php | 0 .../Maps}/Elements/WmsOverlay.php | 0 tests/bootstrap.php | 6 +- 12 files changed, 16 insertions(+), 67 deletions(-) rename {includes => src/Maps}/Elements/BaseElement.php (100%) rename {includes => src/Maps}/Elements/Circle.php (100%) rename {includes => src/Maps}/Elements/ImageOverlay.php (100%) rename {includes => src/Maps}/Elements/Line.php (100%) rename {includes => src/Maps}/Elements/Location.php (100%) rename {includes => src/Maps}/Elements/Polygon.php (100%) rename {includes => src/Maps}/Elements/Rectangle.php (100%) rename {includes => src/Maps}/Elements/WmsOverlay.php (100%) diff --git a/.gitignore b/.gitignore index f078e9121..18089b7cf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,11 @@ -.* *~ *.kate-swp !.* +.idea/ + +vendor/ +extensions/ composer.phar composer.lock \ No newline at end of file diff --git a/Maps.php b/Maps.php index 6d5de5a2c..7ad725bcd 100644 --- a/Maps.php +++ b/Maps.php @@ -17,79 +17,22 @@ return 1; } -define( 'Maps_VERSION' , '3.0 alpha' ); +define( 'Maps_VERSION' , '3.0 beta' ); // Include the composer autoloader if it is present. if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) { include_once( __DIR__ . '/vendor/autoload.php' ); } -// Attempt to include the ParamProcessor lib if that has not been loaded yet. -if ( !defined( 'ParamProcessor_VERSION' ) && file_exists( __DIR__ . '/../Validator/Validator.php' ) ) { - include_once( __DIR__ . '/../Validator/Validator.php' ); -} - -// Attempt to include the DataValues lib if that has not been loaded yet. -if ( !defined( 'DATAVALUES_VERSION' ) && is_readable( __DIR__ . '/../DataValues/DataValues.php' ) ) { - include_once( __DIR__ . '/../DataValues/DataValues.php' ); -} - -// Include the DataValuesInterfaces library if that hasn't been done yet. -if ( !defined( 'DATAVALUES_INTERFACES_VERSION' ) ) { - @include_once( __DIR__ . '/../DataValuesInterfaces/DataValuesInterfaces.php' ); -} - -// Include the DataValuesCommon library if that hasn't been done yet. -if ( !defined( 'DATAVALUES_COMMON_VERSION' ) ) { - @include_once( __DIR__ . '/../DataValuesCommon/DataValuesCommon.php' ); -} - -// Only initialize the extension when all dependencies are present. -if ( !defined( 'ParamProcessor_VERSION' ) ) { - throw new Exception( 'You need to have ParamProcessor (Validator) 1.0 or later installed in order to use Maps' ); -} - -// Only initialize the extension when all dependencies are present. -if ( !defined( 'DATAVALUES_VERSION' ) ) { - throw new Exception( 'You need to have DataValues loaded in order to use Maps' ); -} - -// Only initialize the extension when all dependencies are present. -if ( !defined( 'DATAVALUES_INTERFACES_VERSION' ) ) { - throw new Exception( 'You need to have DataValuesInterfaces loaded in order to use Maps' ); -} - // Only initialize the extension when all dependencies are present. -if ( !defined( 'DATAVALUES_COMMON_VERSION' ) ) { - throw new Exception( 'You need to have DataValuesCommon loaded in order to use Maps' ); +if ( !defined( 'Validator_VERSION' ) ) { + throw new Exception( 'You need to have Validator installed in order to use Maps' ); } if ( version_compare( $GLOBALS['wgVersion'], '1.18c' , '<' ) ) { throw new Exception( 'This version of Maps requires MediaWiki 1.18 or above; use Maps 1.0.x for MediaWiki 1.17 and Maps 0.7.x for older versions.' ); } -spl_autoload_register( function ( $className ) { - $className = ltrim( $className, '\\' ); - $fileName = ''; - $namespace = ''; - - if ( $lastNsPos = strripos( $className, '\\') ) { - $namespace = substr( $className, 0, $lastNsPos ); - $className = substr( $className, $lastNsPos + 1 ); - $fileName = str_replace( '\\', '/', $namespace ) . '/'; - } - - $fileName .= str_replace( '_', '/', $className ) . '.php'; - - $namespaceSegments = explode( '\\', $namespace ); - - if ( $namespaceSegments[0] === 'Maps' ) { - if ( count( $namespaceSegments ) > 1 && $namespaceSegments[1] === 'Elements' ) { - require_once __DIR__ . '/includes/' . substr( $fileName, 5 ); - } - } -} ); - call_user_func( function() { global $wgExtensionCredits, $wgExtensionAssetsPath, $wgScriptPath, $wgAutoloadClasses; global $wgResourceModules, $wgGroupPermissions, $egMapsNamespaceIndex, $wgStyleVersion; diff --git a/composer.json b/composer.json index fd59912fa..f9f258ab0 100644 --- a/composer.json +++ b/composer.json @@ -30,12 +30,15 @@ "require": { "php": ">=5.3.2", "composer/installers": ">=1.0.1", - "mediawiki/validator": "dev-master", - "data-values/geo": "~0.1" + "mediawiki/validator": "~1.0", + "data-values/geo": ">=0.1.1,<1.0" }, "autoload": { "files" : [ "Maps.php" - ] + ], + "psr-0": { + "Maps\\Elements\\": "src/" + } } } diff --git a/includes/Elements/BaseElement.php b/src/Maps/Elements/BaseElement.php similarity index 100% rename from includes/Elements/BaseElement.php rename to src/Maps/Elements/BaseElement.php diff --git a/includes/Elements/Circle.php b/src/Maps/Elements/Circle.php similarity index 100% rename from includes/Elements/Circle.php rename to src/Maps/Elements/Circle.php diff --git a/includes/Elements/ImageOverlay.php b/src/Maps/Elements/ImageOverlay.php similarity index 100% rename from includes/Elements/ImageOverlay.php rename to src/Maps/Elements/ImageOverlay.php diff --git a/includes/Elements/Line.php b/src/Maps/Elements/Line.php similarity index 100% rename from includes/Elements/Line.php rename to src/Maps/Elements/Line.php diff --git a/includes/Elements/Location.php b/src/Maps/Elements/Location.php similarity index 100% rename from includes/Elements/Location.php rename to src/Maps/Elements/Location.php diff --git a/includes/Elements/Polygon.php b/src/Maps/Elements/Polygon.php similarity index 100% rename from includes/Elements/Polygon.php rename to src/Maps/Elements/Polygon.php diff --git a/includes/Elements/Rectangle.php b/src/Maps/Elements/Rectangle.php similarity index 100% rename from includes/Elements/Rectangle.php rename to src/Maps/Elements/Rectangle.php diff --git a/includes/Elements/WmsOverlay.php b/src/Maps/Elements/WmsOverlay.php similarity index 100% rename from includes/Elements/WmsOverlay.php rename to src/Maps/Elements/WmsOverlay.php diff --git a/tests/bootstrap.php b/tests/bootstrap.php index ed221c4b0..d6a15742b 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -9,8 +9,8 @@ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ -require_once( __DIR__ . '/evilMediaWikiBootstrap.php' ); +echo exec( 'composer update' ) . "\n"; -require_once( __DIR__ . '/../Maps.php' ); +require_once( __DIR__ . '/evilMediaWikiBootstrap.php' ); -//require_once( __DIR__ . '/testLoader.php' ); +// Note: You do need to include Maps.php from your LocalSettings.php file. \ No newline at end of file From 5825f47041accd335ba368c142af630736fe5e5a Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Sat, 30 Nov 2013 01:41:55 +0100 Subject: [PATCH 116/163] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4aa1a33c6..e767b89c9 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ On [Packagist](https://packagist.org/packages/mediawiki/maps): * [Maps on Ohloh](https://www.ohloh.net/p/maps/) * [Blog posts about Maps](www.bn2vs.com/blog/tag/maps) +* [Open bugs and feature requests](https://bugzilla.wikimedia.org/buglist.cgi?list_id=254461&resolution=---&query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=PATCH_TO_REVIEW&bug_status=REOPENED&component=Maps) ## Contributing From 01bd2ef84a7266e18f73435eadae829f216b86eb Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sat, 30 Nov 2013 01:57:49 +0100 Subject: [PATCH 117/163] Reimplement directional notation Change-Id: I940d495180e03f44225e1d6e5ea87e7878d5cb69 --- includes/Geocoders.php | 7 ++-- includes/parserhooks/Maps_Coordinates.php | 7 ++-- includes/parserhooks/Maps_Finddestination.php | 7 ++-- includes/parserhooks/Maps_Geocode.php | 7 ++-- tests/phpunit/parserhooks/CoordinatesTest.php | 41 +++++++++++-------- 5 files changed, 39 insertions(+), 30 deletions(-) diff --git a/includes/Geocoders.php b/includes/Geocoders.php index d670a9c56..4f6126245 100644 --- a/includes/Geocoders.php +++ b/includes/Geocoders.php @@ -4,6 +4,7 @@ use DataValues\LatLongValue; use MWException; +use ValueFormatters\GeoCoordinateFormatter; use ValueParsers\ParseException; /** @@ -177,11 +178,11 @@ public static function attemptToGeocodeToString( $coordsOrAddress, $service = '' } $options = new \ValueFormatters\FormatterOptions( array( - \ValueFormatters\GeoCoordinateFormatter::OPT_FORMAT => $targetFormat, - // TODO \ValueFormatters\GeoCoordinateFormatter::OPT_DIRECTIONAL => $directional + GeoCoordinateFormatter::OPT_FORMAT => $targetFormat, + GeoCoordinateFormatter::OPT_DIRECTIONAL => $directional ) ); - $formatter = new \ValueFormatters\GeoCoordinateFormatter( $options ); + $formatter = new GeoCoordinateFormatter( $options ); return $formatter->format( $geoCoordinate ); } diff --git a/includes/parserhooks/Maps_Coordinates.php b/includes/parserhooks/Maps_Coordinates.php index f37acf590..1b52733aa 100644 --- a/includes/parserhooks/Maps_Coordinates.php +++ b/includes/parserhooks/Maps_Coordinates.php @@ -1,4 +1,5 @@ $parameters['format'], - // TODO \ValueFormatters\GeoCoordinateFormatter::OPT_DIRECTIONAL => $parameters['directional'] + GeoCoordinateFormatter::OPT_FORMAT => $parameters['format'], + GeoCoordinateFormatter::OPT_DIRECTIONAL => $parameters['directional'] ) ); - $coordinateFormatter = new \ValueFormatters\GeoCoordinateFormatter( $options ); + $coordinateFormatter = new GeoCoordinateFormatter( $options ); $output = $coordinateFormatter->format( $parameters['location'] ); diff --git a/includes/parserhooks/Maps_Finddestination.php b/includes/parserhooks/Maps_Finddestination.php index ed4ab6a9c..66c5797bc 100644 --- a/includes/parserhooks/Maps_Finddestination.php +++ b/includes/parserhooks/Maps_Finddestination.php @@ -1,4 +1,5 @@ $parameters['format'], - // TODO \ValueFormatters\GeoCoordinateFormatter::OPT_DIRECTIONAL => $parameters['directional'] + GeoCoordinateFormatter::OPT_FORMAT => $parameters['format'], + GeoCoordinateFormatter::OPT_DIRECTIONAL => $parameters['directional'] ) ); - $formatter = new \ValueFormatters\GeoCoordinateFormatter( $options ); + $formatter = new GeoCoordinateFormatter( $options ); $geoCoords = new \DataValues\LatLongValue( $destination['lat'], $destination['lon'] ); $output = $formatter->format( $geoCoords ); diff --git a/includes/parserhooks/Maps_Geocode.php b/includes/parserhooks/Maps_Geocode.php index bf0b67ed4..05704a8f4 100644 --- a/includes/parserhooks/Maps_Geocode.php +++ b/includes/parserhooks/Maps_Geocode.php @@ -1,4 +1,5 @@ getCoordinates(); $options = new \ValueFormatters\FormatterOptions( array( - \ValueFormatters\GeoCoordinateFormatter::OPT_FORMAT => $parameters['format'], - // TODO \ValueFormatters\GeoCoordinateFormatter::OPT_DIRECTIONAL => $parameters['directional'] + GeoCoordinateFormatter::OPT_FORMAT => $parameters['format'], + GeoCoordinateFormatter::OPT_DIRECTIONAL => $parameters['directional'] ) ); - $formatter = new \ValueFormatters\GeoCoordinateFormatter( $options ); + $formatter = new GeoCoordinateFormatter( $options ); return $formatter->format( $coordinates ); } diff --git a/tests/phpunit/parserhooks/CoordinatesTest.php b/tests/phpunit/parserhooks/CoordinatesTest.php index 0fadc1f07..3036ce5b9 100644 --- a/tests/phpunit/parserhooks/CoordinatesTest.php +++ b/tests/phpunit/parserhooks/CoordinatesTest.php @@ -36,14 +36,18 @@ public function parametersProvider() { $paramLists[] = array( array( - 'location' => '4,2' + 'location' => '4,2', + 'format' => 'dms', + 'directional' => 'no', ), '4° 0\' 0", 2° 0\' 0"' ); $paramLists[] = array( array( - 'location' => '55 S, 37.6176330 W' + 'location' => '55 S, 37.6176330 W', + 'format' => 'dms', + 'directional' => 'no', ), '-55° 0\' 0", -37° 37\' 3.4788"' ); @@ -52,26 +56,27 @@ public function parametersProvider() { array( 'location' => '4,2', 'format' => 'float', + 'directional' => 'no', ), '4, 2' ); -// $paramLists[] = array( -// array( -// 'location' => '-4,-2', -// 'format' => 'float', -// 'directional' => 'yes', -// ), -// '4 W, 2 S' -// ); -// -// $paramLists[] = array( -// array( -// 'location' => '55 S, 37.6176330 W', -// 'directional' => 'yes', -// ), -// '55° 0\' 0" W, 37° 37\' 3.4788" S' -// ); + $paramLists[] = array( + array( + 'location' => '-4,-2', + 'format' => 'float', + 'directional' => 'yes', + ), + '4 S, 2 W' + ); + + $paramLists[] = array( + array( + 'location' => '55 S, 37.6176330 W', + 'directional' => 'yes', + ), + '55° 0\' 0" S, 37° 37\' 3.4788" W' + ); return $paramLists; } From e00c9872323055625ce1633d5628a37ee88c9b7f Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sat, 30 Nov 2013 05:13:02 +0100 Subject: [PATCH 118/163] Remove manual autloloading code Change-Id: Ib1f85bc7f74ab970d322be08392fa976dcd811d4 --- Maps.classes.php | 62 --------------- Maps.php | 4 +- Maps_Settings.php | 126 +++++++++++++------------------ composer.json | 10 ++- phpunit.xml.dist | 1 + tests/bootstrap.php | 6 +- tests/evilMediaWikiBootstrap.php | 4 - 7 files changed, 65 insertions(+), 148 deletions(-) delete mode 100644 Maps.classes.php diff --git a/Maps.classes.php b/Maps.classes.php deleted file mode 100644 index 1ddb3254b..000000000 --- a/Maps.classes.php +++ /dev/null @@ -1,62 +0,0 @@ - $egMapsDefaultService, + $GLOBALS['egMapsDefaultServices'] = array( + 'display_map' => $GLOBALS['egMapsDefaultService'], ); // Geocoding -global $egMapsAvailableGeoServices, $egMapsDefaultGeoService, $egMapsUserGeoOverrides; -global $egMapsAllowCoordsGeocoding, $egMapsEnableGeoCache, $egMapsGeoNamesUser; - // Array of String. Array containing all the geocoding services that will be // made available to the user. Currently Maps provides the following services: // geonames, google // It is recommended that when using GeoNames you get a GeoNames webservice account - // at http://www.geonames.org/login and set the username to $egMapsGeoNamesUser below. + // at http://www.geonames.org/login and set the username to $GLOBALS['egMapsGeoNamesUser'] below. // Not doing this will result into a legacy service being used, which might be // disabled at some future point. - $egMapsAvailableGeoServices = array( + $GLOBALS['egMapsAvailableGeoServices'] = array( 'geonames', 'google', 'geocoderus', @@ -65,32 +58,30 @@ // String. The default geocoding service, which will be used when no service is // is provided by the user. This service needs to be enabled, if not, the first // one from the available services will be taken. - $egMapsDefaultGeoService = 'geonames'; + $GLOBALS['egMapsDefaultGeoService'] = 'geonames'; // Boolean. Indicates if geocoders can override the default geoservice based on // the used mapping service. - $egMapsUserGeoOverrides = true; + $GLOBALS['egMapsUserGeoOverrides'] = true; // Boolean. Sets if coordinates should be allowed in geocoding calls. - $egMapsAllowCoordsGeocoding = true; + $GLOBALS['egMapsAllowCoordsGeocoding'] = true; // Boolean. Sets if geocoded addresses should be stored in a cache. - $egMapsEnableGeoCache = true; + $GLOBALS['egMapsEnableGeoCache'] = true; // String. GeoNames API user/application name. // Obtain an account here: http://www.geonames.org/login // Do not forget to activate your account for API usage! - $egMapsGeoNamesUser = ''; + $GLOBALS['egMapsGeoNamesUser'] = ''; // Coordinate configuration -global $egMapsAvailableCoordNotations, $egMapsCoordinateNotation, $egMapsCoordinateDirectional; -global $egMapsInternatDirectionLabels; // The coordinate notations that should be available. - $egMapsAvailableCoordNotations = array( + $GLOBALS['egMapsAvailableCoordNotations'] = array( Maps_COORDS_FLOAT, Maps_COORDS_DMS, Maps_COORDS_DM, @@ -99,24 +90,23 @@ // Enum. The default output format of coordinates. // Possible values: Maps_COORDS_FLOAT, Maps_COORDS_DMS, Maps_COORDS_DM, Maps_COORDS_DD - $egMapsCoordinateNotation = Maps_COORDS_DMS; + $GLOBALS['egMapsCoordinateNotation'] = Maps_COORDS_DMS; // Boolean. Indicates if coordinates should be outputted in directional notation by default. // Recommended to be true for Maps_COORDS_DMS and false for Maps_COORDS_FLOAT. - $egMapsCoordinateDirectional = true; + $GLOBALS['egMapsCoordinateDirectional'] = true; // Boolean. Sets if direction labels should be translated to their equivalent in the wiki language or not. - $egMapsInternatDirectionLabels = true; + $GLOBALS['egMapsInternatDirectionLabels'] = true; // Distance configuration -global $egMapsDistanceUnits, $egMapsDistanceUnit, $egMapsDistanceDecimals; // Array. A list of units (keys) and how many meters they represent (value). // No spaces! If the unit consists out of multiple words, just write them together. - $egMapsDistanceUnits = array( + $GLOBALS['egMapsDistanceUnits'] = array( 'm' => 1, 'meter' => 1, 'meters' => 1, @@ -132,58 +122,53 @@ ); // String. The default unit for distances. - $egMapsDistanceUnit = 'm'; + $GLOBALS['egMapsDistanceUnit'] = 'm'; // Integer. The default amount of fractal digits in a distance. - $egMapsDistanceDecimals = 2; + $GLOBALS['egMapsDistanceDecimals'] = 2; // General map configuration -global $egMapsMapWidth, $egMapsMapHeight, $egMapsSizeRestrictions, $egMapsDefaultMapCentre; -global $egMapsDefaultTitle, $egMapsDefaultLabel, $egMapsResizableByDefault, $egMapsRezoomForKML; - // Integer or string. The default width and height of a map. These values will // only be used when the user does not provide them. - $egMapsMapWidth = 'auto'; - $egMapsMapHeight = 350; + $GLOBALS['egMapsMapWidth'] = 'auto'; + $GLOBALS['egMapsMapHeight'] = 350; // Array. The minimum and maximum width and height for all maps. First min and // max for absolute values, then min and max for percentage values. When the // height or width exceed their limits, they will be changed to the closest // allowed value. - $egMapsSizeRestrictions = array( + $GLOBALS['egMapsSizeRestrictions'] = array( 'width' => array( 50, 1020, 1, 100 ), 'height' => array( 50, 1000, 1, 100 ), ); // String. The default centre for maps. Can be either a set of coordinates or an address. - $egMapsDefaultMapCentre = '0, 0'; + $GLOBALS['egMapsDefaultMapCentre'] = '0, 0'; // Strings. The default content for all pop-ups. This value will only be used // when the user does not provide one. - $egMapsDefaultTitle = ''; - $egMapsDefaultLabel = ''; + $GLOBALS['egMapsDefaultTitle'] = ''; + $GLOBALS['egMapsDefaultLabel'] = ''; - $egMapsResizableByDefault = false; + $GLOBALS['egMapsResizableByDefault'] = false; - $egMapsRezoomForKML = false; + $GLOBALS['egMapsRezoomForKML'] = false; // Other general configuration -global $egMapsDebugJS, $egMapsNamespaceIndex, $egMapsAllowExternalImages; - // When true, debugging messages will be logged using mw.log(). Do not use on production wikis. - $egMapsDebugJS = false; + $GLOBALS['egMapsDebugJS'] = false; // Namespace index start of the mapping namespaces. - $egMapsNamespaceIndex = 420; + $GLOBALS['egMapsNamespaceIndex'] = 420; // Boolean. Controls if you can specify images using a full path in layers. - $egMapsAllowExternalImages = true; + $GLOBALS['egMapsAllowExternalImages'] = true; @@ -191,17 +176,13 @@ // Google Maps v3 -global $egMapsGMaps3Zoom, $egMapsGMaps3Types, $egMapsGMaps3Type, $egMapsGMaps3Controls; -global $egMapsGMaps3DefTypeStyle, $egMapsGMaps3DefZoomStyle, $egMapsGMaps3AutoInfoWindows; -global $egMapsGMaps3Layers, $egMapsGMaps3DefaultTilt, $egGoogleJsApiKey, $egMapsShowPOI; - // Integer. The default zoom of a map. This value will only be used when the // user does not provide one. - $egMapsGMaps3Zoom = 14; + $GLOBALS['egMapsGMaps3Zoom'] = 14; // Array of String. The Google Maps v3 default map types. This value will only // be used when the user does not provide one. - $egMapsGMaps3Types = array( + $GLOBALS['egMapsGMaps3Types'] = array( 'roadmap', 'satellite', 'hybrid', @@ -210,10 +191,10 @@ // String. The default map type. This value will only be used when the user // does not provide one. - $egMapsGMaps3Type = 'roadmap'; + $GLOBALS['egMapsGMaps3Type'] = 'roadmap'; // Array. List of controls to display onto maps by default. - $egMapsGMaps3Controls = array( + $GLOBALS['egMapsGMaps3Controls'] = array( 'pan', 'zoom', 'type', @@ -223,47 +204,44 @@ // String. The default style for the type control. // horizontal, vertical or default - $egMapsGMaps3DefTypeStyle = 'default'; + $GLOBALS['egMapsGMaps3DefTypeStyle'] = 'default'; // String. The default style for the zoom control. // small, large or default - $egMapsGMaps3DefZoomStyle = 'default'; + $GLOBALS['egMapsGMaps3DefZoomStyle'] = 'default'; // Boolean. Open the info windows on load by default? - $egMapsGMaps3AutoInfoWindows = false; + $GLOBALS['egMapsGMaps3AutoInfoWindows'] = false; // Array. Layers to load by default. // traffic and bicycling - $egMapsGMaps3Layers = array(); + $GLOBALS['egMapsGMaps3Layers'] = array(); // Integer. Default tilt when using Google Maps. - $egMapsGMaps3DefaultTilt = 0; + $GLOBALS['egMapsGMaps3DefaultTilt'] = 0; // Google JavaScript Loader API key. // Can be obtained at: https://code.google.com/apis/loader/signup.html // This key is needed when using Google Earth or when using extended // limits for displaying maps or geocoding calls. - $egGoogleJsApiKey = ''; + $GLOBALS['egGoogleJsApiKey'] = ''; // Show points of interest or not. - $egMapsShowPOI = true; + $GLOBALS['egMapsShowPOI'] = true; // OpenLayers -global $egMapsOpenLayersZoom, $egMapsOLControls, $egMapsOLLayers, $egMapsOLAvailableLayers; -global $egMapsOLLayerGroups, $egMapsOLLayerDependencies; - // Integer. The default zoom of a map. This value will only be used when the // user does not provide one. - $egMapsOpenLayersZoom = 13; + $GLOBALS['egMapsOpenLayersZoom'] = 13; // Array of String. The default controls for Open Layers. This value will only // be used when the user does not provide one. // Available values: layerswitcher, mouseposition, autopanzoom, panzoom, // panzoombar, scaleline, navigation, keyboarddefaults, overviewmap, permalink - $egMapsOLControls = array( + $GLOBALS['egMapsOLControls'] = array( 'layerswitcher', 'mouseposition', 'autopanzoom', @@ -273,14 +251,14 @@ // Array of String. The default layers for Open Layers. This value will only be // used when the user does not provide one. - $egMapsOLLayers = array( + $GLOBALS['egMapsOLLayers'] = array( 'osm-mapnik', 'osm-cyclemap', 'osmarender' ); // The difinitions for the layers that should be available for the user. - $egMapsOLAvailableLayers = array( + $GLOBALS['egMapsOLAvailableLayers'] = array( //'google' => array( 'OpenLayers.Layer.Google("Google Streets")' ), 'bing-normal' => array( 'OpenLayers.Layer.VirtualEarth( "Bing Streets", {type: VEMapStyle.Shaded, "sphericalMercator":true} )', 'bing' ), @@ -300,8 +278,8 @@ ); // Layer group definitions. Group names must be different from layer names, and - // must only contain layers that are present in $egMapsOLAvailableLayers. - $egMapsOLLayerGroups = array( + // must only contain layers that are present in $GLOBALS['egMapsOLAvailableLayers']. + $GLOBALS['egMapsOLLayerGroups'] = array( 'yahoo' => array( 'yahoo-normal', 'yahoo-satellite', 'yahoo-hybrid' ), 'bing' => array( 'bing-normal', 'bing-satellite', 'bing-hybrid' ), 'osm' => array( 'osmarender', 'osm-mapnik', 'osm-cyclemap' ), @@ -310,7 +288,7 @@ global $wgJsMimeType; // Layer dependencies - $egMapsOLLayerDependencies = array( + $GLOBALS['egMapsOLLayerDependencies'] = array( 'yahoo' => "", 'bing' => "", 'ol-wms' => "", @@ -318,12 +296,10 @@ // Leaflet -global $egMapsLeafletZoom; // Integer. The default zoom of a map. This value will only be used when the // user does not provide one. - $egMapsLeafletZoom = 14; + $GLOBALS['egMapsLeafletZoom'] = 14; -global $egMapsGlobalJSVars; -$egMapsGlobalJSVars = array(); +$GLOBALS['egMapsGlobalJSVars'] = array(); diff --git a/composer.json b/composer.json index 74f3375d2..e041be6b1 100644 --- a/composer.json +++ b/composer.json @@ -37,8 +37,12 @@ "files" : [ "Maps.php" ], - "psr-0": { - "Maps\\Elements\\": "src/" - } + "classmap": [ + "src/", + "includes/", + "Maps.hooks.php", + "tests/phpunit/elements/", + "tests/phpunit/parserhooks/ParserHookTest.php" + ] } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5b7bf8de0..05c605dc5 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -20,6 +20,7 @@ includes + src diff --git a/tests/bootstrap.php b/tests/bootstrap.php index d6a15742b..47aab08ac 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -13,4 +13,8 @@ require_once( __DIR__ . '/evilMediaWikiBootstrap.php' ); -// Note: You do need to include Maps.php from your LocalSettings.php file. \ No newline at end of file +require_once( __DIR__ . '/../vendor/autoload.php' ); + +foreach ( $GLOBALS['wgExtensionFunctions'] as $extensionFunction ) { + call_user_func( $extensionFunction ); +} \ No newline at end of file diff --git a/tests/evilMediaWikiBootstrap.php b/tests/evilMediaWikiBootstrap.php index add7f9a0a..776a6c144 100644 --- a/tests/evilMediaWikiBootstrap.php +++ b/tests/evilMediaWikiBootstrap.php @@ -70,7 +70,3 @@ function loadSettings() { $wgCommandLineMode = true; return $settingsFile; } - -foreach ( $GLOBALS['wgExtensionFunctions'] as $extensionFunction ) { - call_user_func( $extensionFunction ); -} \ No newline at end of file From 532e1dd86a5ce51efc55eb4ef80f7e774c9c006c Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sat, 30 Nov 2013 05:21:13 +0100 Subject: [PATCH 119/163] Add doc Change-Id: I156f43d9eac9fddc70b8b08d218d7407cfcb7f6e --- docs/INSTALL.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 8eae11850..b5862952e 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -39,7 +39,8 @@ These are the installation and configuration instructions for the [Maps extensio - +When installing Maps 2.x, see the installation instructions that come bundled with it. Also +make use of Validator 0.5.x. More revent versions of Validator will not work. ## Download and installation From 90ab0012c85bff3febd79b626e4ba66befe2cc9c Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Mon, 2 Dec 2013 05:20:36 +0100 Subject: [PATCH 120/163] Run tests against multiple DBs and MW versions Change-Id: Ibf2d7819b5230c66fa6f50102c5afd748a12e28b --- .travis.yml | 41 +++++++++++++-------- build/travis/after_success.sh | 10 +++++ .travis.sh => build/travis/before_script.sh | 22 +++++++---- build/travis/script.sh | 12 ++++++ 4 files changed, 62 insertions(+), 23 deletions(-) create mode 100644 build/travis/after_success.sh rename .travis.sh => build/travis/before_script.sh (59%) create mode 100644 build/travis/script.sh diff --git a/.travis.yml b/.travis.yml index 7bfc4e4ad..3f84e908f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,32 @@ language: php -php: - - 5.3 - - 5.4 - - 5.5 +env: + - THENEEDFORTHIS=FAIL -before_script: - - bash .travis.sh +matrix: + include: + - env: DBTYPE=mysql; MW=master + php: 5.3 + - env: DBTYPE=mysql; MW=1.19.0 + php: 5.4 + - env: DBTYPE=mysql; MW=1.21.0 + php: 5.5 + - env: DBTYPE=sqlite; MW=master + php: 5.4 + - env: DBTYPE=sqlite; MW=1.19.0 + php: 5.5 + exclude: + - env: THENEEDFORTHIS=FAIL -script: - - cd ../phase3/extensions/Maps - - phpunit --coverage-clover ../../extensions/Maps/build/logs/clover.xml +before_script: bash ./build/travis/before_script.sh -after_script: - - php vendor/bin/coveralls -v +script: bash ./build/travis/script.sh + +after_success: bash ./build/travis/after_success.sh notifications: - email: - recipients: - - jeroendedauw@gmail.com - on_success: change - on_failure: always \ No newline at end of file + irc: + channels: + - "chat.freenode.net#semantic-mediawiki" + on_success: never + on_failure: always diff --git a/build/travis/after_success.sh b/build/travis/after_success.sh new file mode 100644 index 000000000..658a44f11 --- /dev/null +++ b/build/travis/after_success.sh @@ -0,0 +1,10 @@ +#! /bin/bash + +set -x + +if [ "$MW-$DBTYPE" == "master-mysql" ] +then + cd ../../extensions/Maps + composer require satooshi/php-coveralls:dev-master + php vendor/bin/coveralls -v +fi \ No newline at end of file diff --git a/.travis.sh b/build/travis/before_script.sh similarity index 59% rename from .travis.sh rename to build/travis/before_script.sh index be8deae4a..f6b7b7ef8 100644 --- a/.travis.sh +++ b/build/travis/before_script.sh @@ -6,22 +6,32 @@ originalDirectory=$(pwd) cd .. -git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git phase3 --depth 1 +if [ "$MW" == "master" ] +then + git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git phase3 --depth 1 +else + wget https://github.com/wikimedia/mediawiki-core/archive/$MW.tar.gz + tar -zxf $MW.tar.gz + mv mediawiki-core-$MW phase3 +fi cd phase3 +git checkout $MW + mysql -e 'create database its_a_mw;' -php maintenance/install.php --dbtype mysql --dbuser root --dbname its_a_mw --dbpath $(pwd) --pass nyan TravisWiki admin +php maintenance/install.php --dbtype $DBTYPE --dbuser root --dbname its_a_mw --dbpath $(pwd) --pass nyan TravisWiki admin cd extensions + cp -r $originalDirectory Maps cd Maps -composer require satooshi/php-coveralls:dev-master +composer install + cd ../.. -pwd -ls -lap +echo 'require_once( __DIR__ . "/extensions/Maps/Maps.php" );' >> LocalSettings.php echo 'error_reporting(E_ALL| E_STRICT);' >> LocalSettings.php echo 'ini_set("display_errors", 1);' >> LocalSettings.php @@ -29,6 +39,4 @@ echo '$wgShowExceptionDetails = true;' >> LocalSettings.php echo '$wgDevelopmentWarnings = true;' >> LocalSettings.php echo "putenv( 'MW_INSTALL_PATH=$(pwd)' );" >> LocalSettings.php -echo 'require_once( __DIR__ . "/extensions/Maps/Maps.php" );' >> LocalSettings.php - php maintenance/update.php --quick diff --git a/build/travis/script.sh b/build/travis/script.sh new file mode 100644 index 000000000..8021072ee --- /dev/null +++ b/build/travis/script.sh @@ -0,0 +1,12 @@ +#! /bin/bash + +set -x + +cd ../phase3/extensions/Maps + +if [ "$MW-$DBTYPE" == "master-mysql" ] +then + phpunit --coverage-clover ../../extensions/Maps/build/logs/clover.xml +else + phpunit +fi \ No newline at end of file From 0319ffbdd667e14e2a18af99687e3b98016c00c7 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Mon, 2 Dec 2013 05:22:46 +0100 Subject: [PATCH 121/163] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e767b89c9..535ab5ab8 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ On [Packagist](https://packagist.org/packages/mediawiki/maps): [![Download count](https://poser.pugx.org/mediawiki/maps/d/total.png)](https://packagist.org/packages/mediawiki/maps) * [Maps on Ohloh](https://www.ohloh.net/p/maps/) -* [Blog posts about Maps](www.bn2vs.com/blog/tag/maps) +* [Blog posts about Maps](http://www.bn2vs.com/blog/tag/maps) * [Open bugs and feature requests](https://bugzilla.wikimedia.org/buglist.cgi?list_id=254461&resolution=---&query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=PATCH_TO_REVIEW&bug_status=REOPENED&component=Maps) ## Contributing From 0e25042d9bb29be9cbc4ecb209331123a0241d85 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Mon, 2 Dec 2013 05:28:23 +0100 Subject: [PATCH 122/163] Update INSTALL Change-Id: Ief2d509f0a7ab8ec84a0e99dc75897ab761a8e2e --- docs/INSTALL.md | 54 +++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index b5862952e..71f42723a 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -40,47 +40,49 @@ These are the installation and configuration instructions for the [Maps extensio When installing Maps 2.x, see the installation instructions that come bundled with it. Also -make use of Validator 0.5.x. More revent versions of Validator will not work. +make use of Validator 0.5.x. More recent versions of Validator will not work. ## Download and installation -### With Composer +The recommended way to download and install Maps is with [Composer](http://getcomposer.org) using +[MediaWiki 1.22 built-in support for Composer](https://www.mediawiki.org/wiki/Composer). MediaWiki +versions prior to 1.22 can use Composer via the +[Extension Installer](https://github.com/JeroenDeDauw/ExtensionInstaller/blob/master/README.md) +extension. -The recommended way to install Maps is with [Composer](http://getcomposer.org). -See the [extension installation with Composer](https://www.mediawiki.org/wiki/Composer) instructions. +#### Step 1 -The package name is "mediawiki/maps", so your composer.json file should look as follows: +If you have MediaWiki 1.22 or later, go to the root directory of your MediaWiki installation, +and go to step 2. You do not need to install any extensions to support composer. -```javascript -{ - "require": { - // ... - "mediawiki/maps": ">=3.0" - }, - "minimum-stability" : "dev" -} -``` +For MediaWiki 1.21.x and earlier you need to install the +[Extension Installer](https://github.com/JeroenDeDauw/ExtensionInstaller/blob/master/README.md) extension. + +Once you are done installing the Extension Installer, go to its directory so composer.phar +is installed in the right place. + + cd extensions/ExtensionInstaller + +#### Step 2 -The "minimum-stability" section needs to be added as well for now. -This need for this will be removed when Maps 3.0 is released. +If you have previously installed Composer skip to step 3. -### Manual installation +To install Composer: -Alternatively you can obtain the Maps code and the code of all its dependencies yourself, and load them all. + wget http://getcomposer.org/composer.phar -You can find a list of the dependencies in the "requires" section of the [composer.json file](../composer.json). +#### Step 3 -You can get the Maps code itself: +Now using Composer, install Maps -* Via git: git clone https://github.com/JeroenDeDauw/Maps.git -* As Tarball: https://github.com/JeroenDeDauw/Maps/releases + php composer.phar require mediawiki/maps * -The only remaining step is to include SubPageList in your LocalSettings.php file: +#### Verify installation success -```php -require_once( "$IP/extensions/Maps/Maps.php" ); +As final step, you can verify Maps got installed by looking at the Special:Version page on your wiki and verifying the +Maps extension is listed. ``` ## Configuration -See the [Maps settings file](../Maps_Settings.php) for the available configuartion options. +See the [Maps settings file](../Maps_Settings.php) for the available configuration options. From cb02247ce5c62160f1f12094c6b2d787219d65c4 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Mon, 2 Dec 2013 05:31:53 +0100 Subject: [PATCH 123/163] Remove not needed binding to MediaWiki from some test cases Change-Id: I7d8ef08362a127b3d19093f3f77de63da7443f3d --- tests/phpunit/ElementTest.php | 5 ----- tests/phpunit/elements/BaseElementTest.php | 7 +------ tests/phpunit/elements/CircleTest.php | 5 ----- tests/phpunit/elements/ImageOverlayTest.php | 5 ----- tests/phpunit/elements/LineTest.php | 5 ----- tests/phpunit/elements/LocationTest.php | 7 +------ tests/phpunit/elements/PolygonTest.php | 5 ----- tests/phpunit/elements/RectangleTest.php | 5 ----- 8 files changed, 2 insertions(+), 42 deletions(-) diff --git a/tests/phpunit/ElementTest.php b/tests/phpunit/ElementTest.php index b25d3ef7b..3e894fb8e 100644 --- a/tests/phpunit/ElementTest.php +++ b/tests/phpunit/ElementTest.php @@ -12,11 +12,6 @@ * * @since 3.0 * - * @ingroup MapsTest - * - * @group Maps - * @group MapsElement - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/tests/phpunit/elements/BaseElementTest.php b/tests/phpunit/elements/BaseElementTest.php index 89da74d7e..a8f47ee36 100644 --- a/tests/phpunit/elements/BaseElementTest.php +++ b/tests/phpunit/elements/BaseElementTest.php @@ -9,15 +9,10 @@ * * @since 3.0 * - * @ingroup MapsTest - * - * @group Maps - * @group MapsElement - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ -abstract class BaseElementTest extends \MediaWikiTestCase { +abstract class BaseElementTest extends \PHPUnit_Framework_TestCase { /** * Returns the name of the concrete class tested by this test. diff --git a/tests/phpunit/elements/CircleTest.php b/tests/phpunit/elements/CircleTest.php index 7f50d2718..1ac8cce07 100644 --- a/tests/phpunit/elements/CircleTest.php +++ b/tests/phpunit/elements/CircleTest.php @@ -10,11 +10,6 @@ * * @since 3.0 * - * @ingroup MapsTest - * - * @group Maps - * @group MapsElement - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/tests/phpunit/elements/ImageOverlayTest.php b/tests/phpunit/elements/ImageOverlayTest.php index 8f38eeace..a59dcee97 100644 --- a/tests/phpunit/elements/ImageOverlayTest.php +++ b/tests/phpunit/elements/ImageOverlayTest.php @@ -9,11 +9,6 @@ * * @since 3.0 * - * @ingroup MapsTest - * - * @group Maps - * @group MapsElement - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/tests/phpunit/elements/LineTest.php b/tests/phpunit/elements/LineTest.php index c2f465428..59482029e 100644 --- a/tests/phpunit/elements/LineTest.php +++ b/tests/phpunit/elements/LineTest.php @@ -10,11 +10,6 @@ * * @since 3.0 * - * @ingroup MapsTest - * - * @group Maps - * @group MapsElement - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/tests/phpunit/elements/LocationTest.php b/tests/phpunit/elements/LocationTest.php index 70710875c..8bbf0ac75 100644 --- a/tests/phpunit/elements/LocationTest.php +++ b/tests/phpunit/elements/LocationTest.php @@ -10,11 +10,6 @@ * * @since 3.0 * - * @ingroup MapsTest - * - * @group Maps - * @group MapsElement - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ @@ -62,7 +57,7 @@ public function constructorProvider() { public function testGetLineCoordinates( Location $location, array $arguments ) { $coordinates = $location->getCoordinates(); - $this->assertType( 'DataValues\LatLongValue', $coordinates ); + $this->assertInstanceOf( 'DataValues\LatLongValue', $coordinates ); $this->assertTrue( $coordinates->equals( $arguments[0] ) ); } diff --git a/tests/phpunit/elements/PolygonTest.php b/tests/phpunit/elements/PolygonTest.php index b6ba05186..690e7ce61 100644 --- a/tests/phpunit/elements/PolygonTest.php +++ b/tests/phpunit/elements/PolygonTest.php @@ -9,11 +9,6 @@ * * @since 3.0 * - * @ingroup MapsTest - * - * @group Maps - * @group MapsElement - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/tests/phpunit/elements/RectangleTest.php b/tests/phpunit/elements/RectangleTest.php index 21954ab5b..420f4c1e2 100644 --- a/tests/phpunit/elements/RectangleTest.php +++ b/tests/phpunit/elements/RectangleTest.php @@ -10,11 +10,6 @@ * * @since 3.0 * - * @ingroup MapsTest - * - * @group Maps - * @group MapsElement - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ From 288db5e6ceb732d2285bc64387824a9e7c6a5c69 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Mon, 2 Dec 2013 05:34:47 +0100 Subject: [PATCH 124/163] Remove not needed binding to MediaWiki from some test cases Change-Id: I03619c60e9e67ffee882a0a4d0ecbab72fa57bc8 --- tests/phpunit/parserhooks/ParserHookTest.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/parserhooks/ParserHookTest.php b/tests/phpunit/parserhooks/ParserHookTest.php index f43ad96d9..f8a274182 100644 --- a/tests/phpunit/parserhooks/ParserHookTest.php +++ b/tests/phpunit/parserhooks/ParserHookTest.php @@ -12,7 +12,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ -abstract class ParserHookTest extends \MediaWikiTestCase { +abstract class ParserHookTest extends \PHPUnit_Framework_TestCase { /** * @since 2.0 @@ -119,4 +119,13 @@ protected function getDefaultValues() { return $defaults; } + protected function arrayWrap( array $elements ) { + return array_map( + function ( $element ) { + return array( $element ); + }, + $elements + ); + } + } \ No newline at end of file From bb1f15ad02a164c8688d94796f318f0a2864b732 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Mon, 2 Dec 2013 20:39:09 +0000 Subject: [PATCH 125/163] Localisation updates from https://translatewiki.net. Change-Id: I36f2de322b4234c61fac35dc262bcf2fa9e6ac27 --- Maps.i18n.magic.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Maps.i18n.magic.php b/Maps.i18n.magic.php index 526225d2f..9390b5f5a 100644 --- a/Maps.i18n.magic.php +++ b/Maps.i18n.magic.php @@ -42,11 +42,11 @@ /** Egyptian Spoken Arabic (مصرى) */ $magicWords['arz'] = array( - 'display_map' => array( 0, 'عرض_الخريطه', 'عرض_الخريطة', 'display_map' ), - 'geocode' => array( 0, 'كود_جغرافي', 'geocode' ), - 'geodistance' => array( 0, 'مسافه_جغرافيه', 'مسافة_جغرافية', 'geodistance' ), - 'finddestination' => array( 0, 'إيجاد_الوجهه', 'إيجاد_الوجهة', 'finddestination' ), - 'coordinates' => array( 0, 'إحداثيات', 'coordinates' ), + 'display_map' => array( 0, 'عرض_الخريطه', 'عرض_الخريطة' ), + 'geocode' => array( 0, 'كود_جغرافي' ), + 'geodistance' => array( 0, 'مسافه_جغرافيه', 'مسافة_جغرافية' ), + 'finddestination' => array( 0, 'إيجاد_الوجهه', 'إيجاد_الوجهة' ), + 'coordinates' => array( 0, 'إحداثيات' ), ); /** Assamese (অসমীয়া) */ From 064fae146faf0f16985c23e7269d477089ffe55a Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sat, 7 Dec 2013 01:43:23 +0000 Subject: [PATCH 126/163] Localisation updates from https://translatewiki.net. Change-Id: I34b89d4181906a0ea741c66cee629b0f9a8fcc07 --- Maps.i18n.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index 87cc71610..b14654341 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -1164,7 +1164,7 @@ 'mapeditor-imageoverlay-title' => 'Сурт', ); -/** Czech (česky) +/** Czech (čeština) * @author Mormegil * @author Vks */ @@ -1239,7 +1239,7 @@ 'mapeditor-form-field-visitedicon' => 'Navštívená ikona', ); -/** Church Slavic (словѣ́ньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ) +/** Church Slavic (словѣньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ) * @author ОйЛ */ $messages['cu'] = array( @@ -2082,7 +2082,7 @@ 'maps-displaymap-par-rectangles' => 'Näytettävät suorakulmiot', 'maps-displaymap-par-static' => 'Onko kartan on oltava staattinen', 'maps-fullscreen-button' => 'Koko näytön tila', - 'maps-fullscreen-button-tooltip' => 'Näytä kartta koko näytön tilassa tai upotettuna.', # Fuzzy + 'maps-fullscreen-button-tooltip' => 'Näytä kartta koko näytön tilassa tai upotettuna.', 'maps-googlemaps3-par-enable-fullscreen' => 'Koko näytön tila -painike', 'validation-error-invalid-location' => 'Parametrin $1 on oltava sallittu sijainti.', 'validation-error-invalid-locations' => 'Parametrin $1 on oltava yksi tai useampi sallittu sijainti.', @@ -4842,6 +4842,7 @@ 'maps-desc' => 'Biedt de mogelijkheid om locatiegegevens weer te geven op kaarten en adressen om te zetten naar coördinaten ([https://www.semantic-mediawiki.org/wiki/Maps meer...])', 'right-geocode' => 'Geocoderen', 'maps_map' => 'Kaart', + 'maps-tracking-category' => "Pagina's met een kaart die gerenderd is door de uitbreiding Maps", 'maps-loading-map' => 'Bezig met het laden van de kaart...', 'maps-load-failed' => 'De kaart kon niet geladen worden!', 'maps-markers' => 'Markeringen', From 9f84b771e536d2fa452ccb3f80786cef36232c89 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sat, 7 Dec 2013 22:43:27 +0100 Subject: [PATCH 127/163] Fix path issues --- Maps.php | 3 +-- includes/Maps_Mapper.php | 2 -- includes/services/GoogleMaps3/GoogleMaps3.php | 12 ++++++------ includes/services/Leaflet/Leaflet.php | 4 ++-- includes/services/Leaflet/Maps_Leaflet.php | 2 +- includes/services/OpenLayers/Maps_OpenLayers.php | 5 ++++- includes/services/OpenLayers/OpenLayers.php | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Maps.php b/Maps.php index 69e080c70..d14641180 100644 --- a/Maps.php +++ b/Maps.php @@ -36,7 +36,7 @@ call_user_func( function() { global $wgExtensionCredits, $wgExtensionAssetsPath, $wgScriptPath; global $wgResourceModules, $wgGroupPermissions, $egMapsNamespaceIndex, $wgStyleVersion; - global $egMapsScriptPath, $egMapsStyleVersion, $wgHooks, $wgExtensionMessagesFiles; + global $egMapsStyleVersion, $wgHooks, $wgExtensionMessagesFiles; $wgExtensionCredits['parserhook'][] = array( 'path' => __FILE__ , @@ -55,7 +55,6 @@ define( 'Maps_COORDS_DM' , 'dm' ); define( 'Maps_COORDS_DD' , 'dd' ); - $egMapsScriptPath = ( $wgExtensionAssetsPath === false ? $wgScriptPath . '/extensions' : $wgExtensionAssetsPath ) . '/Maps'; $egMapsDir = __DIR__ . '/'; $egMapsStyleVersion = $wgStyleVersion . '-' . Maps_VERSION; diff --git a/includes/Maps_Mapper.php b/includes/Maps_Mapper.php index c9700d2c7..dbf046f01 100644 --- a/includes/Maps_Mapper.php +++ b/includes/Maps_Mapper.php @@ -108,8 +108,6 @@ public static function getBaseMapJSON( $serviceName ) { if ( !$baseInit ) { $baseInit = true; - global $egMapsScriptPath; - $json .= 'var egMapsScriptPath =' . FormatJson::encode( $egMapsScriptPath ) . ';'; $json .= 'var mwmaps={};'; } diff --git a/includes/services/GoogleMaps3/GoogleMaps3.php b/includes/services/GoogleMaps3/GoogleMaps3.php index a9deef97f..1022d1d3b 100644 --- a/includes/services/GoogleMaps3/GoogleMaps3.php +++ b/includes/services/GoogleMaps3/GoogleMaps3.php @@ -18,12 +18,12 @@ } call_user_func( function() { - global $wgResourceModules, $egMapsScriptPath, $wgHooks; + global $wgResourceModules, $wgHooks; $wgResourceModules['ext.maps.googlemaps3'] = array( 'dependencies' => array( 'ext.maps.common' ), 'localBasePath' => __DIR__, - 'remoteBasePath' => $egMapsScriptPath . '/includes/services/GoogleMaps3', + 'remoteExtPath' => '/Maps/includes/services/GoogleMaps3', 'group' => 'ext.maps', 'scripts' => array( 'jquery.googlemap.js', @@ -40,7 +40,7 @@ $wgResourceModules['ext.maps.gm3.markercluster'] = array( 'localBasePath' => __DIR__ . '/gm3-util-library', - 'remoteBasePath' => $egMapsScriptPath . '/includes/services/GoogleMaps3/gm3-util-library', + 'remoteExtPath' => '/Maps/includes/services/GoogleMaps3/gm3-util-library', 'group' => 'ext.maps', 'scripts' => array( 'markerclusterer.js', @@ -49,7 +49,7 @@ $wgResourceModules['ext.maps.gm3.markerwithlabel'] = array( 'localBasePath' => __DIR__ . '/gm3-util-library', - 'remoteBasePath' => $egMapsScriptPath . '/includes/services/GoogleMaps3/gm3-util-library', + 'remoteExtPath' => '/Maps/includes/services/GoogleMaps3/gm3-util-library', 'group' => 'ext.maps', 'scripts' => array( 'markerwithlabel.js', @@ -61,7 +61,7 @@ $wgResourceModules['ext.maps.gm3.geoxml'] = array( 'localBasePath' => __DIR__ . '/geoxml3', - 'remoteBasePath' => $egMapsScriptPath . '/includes/services/GoogleMaps3/geoxml3', + 'remoteExtPath' => '/Maps/includes/services/GoogleMaps3/geoxml3', 'group' => 'ext.maps', 'scripts' => array( 'geoxml3.js', @@ -72,7 +72,7 @@ $wgResourceModules['ext.maps.gm3.earth'] = array( 'localBasePath' => __DIR__ . '/gm3-util-library', - 'remoteBasePath' => $egMapsScriptPath . '/includes/services/GoogleMaps3/gm3-util-library', + 'remoteExtPath' => '/Maps/includes/services/GoogleMaps3/gm3-util-library', 'group' => 'ext.maps', 'scripts' => array( 'googleearth-compiled.js', diff --git a/includes/services/Leaflet/Leaflet.php b/includes/services/Leaflet/Leaflet.php index c7ac202d4..4b3cc89f6 100644 --- a/includes/services/Leaflet/Leaflet.php +++ b/includes/services/Leaflet/Leaflet.php @@ -19,7 +19,7 @@ } call_user_func( function() { - global $wgHooks, $wgResourceModules, $egMapsScriptPath; + global $wgHooks, $wgResourceModules; // Specify the function that will initialize the parser function. $wgHooks['MappingServiceLoad'][] = 'efMapsInitLeaflet'; @@ -27,7 +27,7 @@ $wgResourceModules['ext.maps.leaflet'] = array( 'dependencies' => array( 'ext.maps.common' ), 'localBasePath' => __DIR__, - 'remoteBasePath' => $egMapsScriptPath . '/includes/services/Leaflet', + 'remoteExtPath' => '/Maps/includes/services/Leaflet', 'group' => 'ext.maps', 'scripts' => array( 'jquery.leaflet.js', diff --git a/includes/services/Leaflet/Maps_Leaflet.php b/includes/services/Leaflet/Maps_Leaflet.php index ce29f43dd..109a6c1b5 100644 --- a/includes/services/Leaflet/Maps_Leaflet.php +++ b/includes/services/Leaflet/Maps_Leaflet.php @@ -85,7 +85,7 @@ public function getResourceModules() { } protected function getDependencies() { - $leafletPath = $GLOBALS['egMapsScriptPath'] . '/includes/services/Leaflet/leaflet'; + $leafletPath = $GLOBALS['wgScriptPath'] . '/extensions/Maps/includes/services/Leaflet/leaflet'; return array( Html::linkedStyle( "$leafletPath/leaflet.css" ), '', diff --git a/includes/services/OpenLayers/Maps_OpenLayers.php b/includes/services/OpenLayers/Maps_OpenLayers.php index 49632e4b6..fd97b9f57 100644 --- a/includes/services/OpenLayers/Maps_OpenLayers.php +++ b/includes/services/OpenLayers/Maps_OpenLayers.php @@ -168,7 +168,10 @@ public function getResourceModules() { * @return array */ public function getConfigVariables() { - return array_merge( parent::getConfigVariables(), array( 'egMapsScriptPath' => $GLOBALS['egMapsScriptPath'] ) ); + return array_merge( + parent::getConfigVariables(), + array( 'egMapsScriptPath' => $GLOBALS['wgScriptPath'] . '/extensions/Maps/' ) + ); } } diff --git a/includes/services/OpenLayers/OpenLayers.php b/includes/services/OpenLayers/OpenLayers.php index bd9f58c19..e2e5f0191 100644 --- a/includes/services/OpenLayers/OpenLayers.php +++ b/includes/services/OpenLayers/OpenLayers.php @@ -18,12 +18,12 @@ } call_user_func( function() { - global $wgHooks, $wgResourceModules, $egMapsScriptPath, $wgAutoloadClasses; + global $wgHooks, $wgResourceModules, $wgAutoloadClasses; $wgResourceModules['ext.maps.openlayers'] = array( 'dependencies' => array( 'ext.maps.common' ), 'localBasePath' => __DIR__, - 'remoteBasePath' => $egMapsScriptPath . '/includes/services/OpenLayers', + 'remoteExtPath' => '/Maps/includes/services/OpenLayers', 'group' => 'ext.maps', 'scripts' => array( 'OpenLayers/OpenLayers.js', From affe3677cd550f9bfee11b8da0cd2a2715a6d287 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sun, 8 Dec 2013 20:25:53 +0000 Subject: [PATCH 128/163] Localisation updates from https://translatewiki.net. Change-Id: If4b63f40de48202b02982a6d8e180280b7a0ee76 --- Maps.i18n.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index b14654341..c5b44665b 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -4849,6 +4849,7 @@ 'maps-copycoords-prompt' => 'CTRL+C, ENTER', 'maps-searchmarkers-text' => 'Filtermarkeringen', 'maps-others' => 'anderen', + 'maps-kml-parsing-failed' => 'Eén of meer KML-bestanden konden niet verwerkt worden. Dit is meestal te wijten aan het niet kunnen ophalen van het bestand of ongeldige XML.', 'maps-ns-layer' => 'Laag', 'maps-ns-layer-talk' => 'Overleg_laag', 'maps-layer-property' => 'Eigenschap', @@ -4915,7 +4916,7 @@ 'maps-displaymap-par-title' => 'Maakt het mogelijk om tekst in te stellen die wordt weergegeven in de pop-ups van alle markeringen zonder gespecificeerde naam. Als dit samen met een label wordt gebruikt, wordt de titel vetgedrukt en onderstreept weergegeven.', 'maps-displaymap-par-label' => 'Maakt het mogelijk om tekst in te stellen die wordt weergegeven in de pop-ups van alle markeringen zonder gespecificeerd label.', - 'maps-displaymap-par-icon' => 'Maakt het mogelijk het icoon voor alle markers in te stellen.', + 'maps-displaymap-par-icon' => 'Maakt het mogelijk het pictogram voor alle markers in te stellen.', 'maps-displaymap-par-circles' => 'Weer te geven cirkels', 'maps-displaymap-par-copycoords' => 'Of een dialoog waarvan de coördinaten van een locatie weergegeven moeten worden bij het klikken op iets', 'maps-displaymap-par-lines' => 'Weer te geven regels', @@ -5007,7 +5008,7 @@ 'mapeditor-form-field-title' => 'Titel', 'mapeditor-form-field-text' => 'Tekst', 'mapeditor-form-field-link' => 'Koppeling', - 'mapeditor-form-field-icon' => 'Icoon', + 'mapeditor-form-field-icon' => 'Pictogram', 'mapeditor-form-field-group' => 'Groep', 'mapeditor-form-field-inlinelabel' => 'Inline label', 'mapeditor-form-field-strokecolor' => 'Lijnkleur', @@ -5021,7 +5022,7 @@ 'mapeditor-imageoverlay-button' => 'Afbeeldingslaag toevoegen', 'mapeditor-form-field-image' => 'Afbeelding', 'mapeditor-imageoverlay-title' => 'Gegevens over afbeeldingslaag', - 'mapeditor-form-field-visitedicon' => 'Icoon voor bezocht', + 'mapeditor-form-field-visitedicon' => 'Pictogram voor bezocht', ); /** Nederlands (informeel)‎ (Nederlands (informeel)‎) From 7c11d26bb36da5d749553193991dc67cbd3cdee6 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sun, 15 Dec 2013 20:56:08 +0000 Subject: [PATCH 129/163] Localisation updates from https://translatewiki.net. Change-Id: I2a7f5ff29ceba2b316b0f5bb66083009d37930ae --- Maps.i18n.magic.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Maps.i18n.magic.php b/Maps.i18n.magic.php index 9390b5f5a..563d98a7f 100644 --- a/Maps.i18n.magic.php +++ b/Maps.i18n.magic.php @@ -81,16 +81,16 @@ /** Zazaki (Zazaki) */ $magicWords['diq'] = array( - 'display_map' => array( 0, 'aseniya_xerita' ), + 'display_map' => array( 0, 'aseniya_ğerita' ), 'display_point' => array( 0, 'aseniya_dewti' ), 'display_points' => array( 0, 'aseniya_dawıtan' ), - 'display_line' => array( 0, 'aseniya_xeter' ), + 'display_line' => array( 0, 'aseniya_ğeter' ), 'geocode' => array( 0, 'herunkodi' ), 'geodistance' => array( 0, 'heruna_mesafi' ), 'finddestination' => array( 0, 'menzilvinayış' ), 'coordinates' => array( 0, 'koordinati' ), 'distance' => array( 0, 'mesafe' ), - 'mapsdoc' => array( 0, 'dokumanêxerita' ), + 'mapsdoc' => array( 0, 'dokumanéğerita' ), ); /** Esperanto (Esperanto) */ From c71e22410e611bc07b192041a289d4296b2da110 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Tue, 17 Dec 2013 19:22:55 +0000 Subject: [PATCH 130/163] Localisation updates from https://translatewiki.net. Change-Id: I6641cf66e76e4d0da2af526bb28a1c3556e8bec9 --- Maps.i18n.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index c5b44665b..4762d196e 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -4104,8 +4104,10 @@ 'maps-coordinates-par-location' => "D'Koordinaten déi Dir formatéiere wëllt.", 'maps-coordinates-par-format' => "D'Zilformat vun de Koordinaten.", 'maps-distance-par-decimals' => 'Déi maximal Zuel vu Kommastellen déi am Resultat benotzt gi soll.', + 'maps-distance-par-unit' => "D'Eenheet fir d'Distanz.", 'maps-finddestination-par-location' => 'Déi initial Plaz.', 'maps-finddestination-par-distance' => "D'Distanz vun der Rees.", + 'maps-finddestination-par-format' => "D'Format an deem d'Zil gewise soll ginn.", 'maps-geocode-par-location' => "D'Adress déi Dir geocodéiere wëllt.", 'maps-geocode-par-format' => "De Format fir d'Koordinaten.", 'maps-geodistance-par-location1' => 'Den éischte Punkt vun deem aus eng Distanz berechent gi soll.', @@ -4147,6 +4149,7 @@ 'maps_centred_on' => "D'Kaart ass zentréiert op $1, $2", 'maps-googlemaps3-incompatbrowser' => 'Äre Browser ass net mat Google Maps v3 kompatibel.', 'maps-googlemaps3-par-type' => 'Den Typ vu Kaart den am Ufank gewise gëtt.', + 'maps-googlemaps3-par-autoinfowindows' => "Automatesch all Fënstere mat Informatiounen opmaachen nodeem d'Säit geluede gouf.", 'maps-googlemaps3-par-kml' => "KML-Fichieren déi op d'Kaart musse geluede ginn.", 'maps-googlemaps3-par-poi' => 'Kuckeswäertes weisen', 'maps-osm-par-thumbs' => 'Miniaturbiller weisen', From 76093b3aecc4670aedc720c40295271d57521137 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Thu, 19 Dec 2013 18:57:44 +0100 Subject: [PATCH 131/163] Imrpove PHPUnit bootstrap --- tests/bootstrap.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 47aab08ac..df469b773 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -9,7 +9,14 @@ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ -echo exec( 'composer update' ) . "\n"; +if ( php_sapi_name() !== 'cli' ) { + die( 'Not an entry point' ); +} + +$pwd = exec( 'pwd' ); +chdir( __DIR__ . '/..' ); +passthru( 'composer update' ); +chdir( $pwd ); require_once( __DIR__ . '/evilMediaWikiBootstrap.php' ); From dc1773b3761f6a59da7272e697a4c18afaa9afac Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sat, 21 Dec 2013 20:40:22 +0000 Subject: [PATCH 132/163] Localisation updates from https://translatewiki.net. Change-Id: I53a5675c17e1922dfeb24891b412d58bf66e43fc --- Maps.i18n.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index 4762d196e..f6fc336cf 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -6234,7 +6234,7 @@ 'maps-load-failed' => 'Zemljevid ni bilo mogoče naložiti.', 'maps-kml-parsing-failed' => 'Razčlenjevanje ene ali več datotek KML ni uspelo. Navadno je vzrok neuspešen priklic ali slabo oblikovan XML.', 'maps-fullscreen-button' => 'Vklopi celozaslonski prikaz', - 'maps-fullscreen-button-tooltip' => 'Celozaslonski/vključeni prikaz zemljevida.', # Fuzzy + 'maps-fullscreen-button-tooltip' => 'Celozaslonski ali vključeni prikaz zemljevida.', 'maps-googlemaps3-par-enable-fullscreen' => 'Omogoči gumb za celozaslonski prikaz', 'maps-abb-north' => 'S', 'maps-abb-east' => 'V', From ca6ea4e2b8bd70ec2ea9254246a786d8179920e4 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sun, 22 Dec 2013 06:34:14 +0100 Subject: [PATCH 133/163] Remove dead globals --- Maps.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maps.php b/Maps.php index d14641180..c8c8e2e8e 100644 --- a/Maps.php +++ b/Maps.php @@ -34,7 +34,7 @@ } call_user_func( function() { - global $wgExtensionCredits, $wgExtensionAssetsPath, $wgScriptPath; + global $wgExtensionCredits; global $wgResourceModules, $wgGroupPermissions, $egMapsNamespaceIndex, $wgStyleVersion; global $egMapsStyleVersion, $wgHooks, $wgExtensionMessagesFiles; From f2b701269466b0380da35efd498102f05f78bcfb Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sun, 22 Dec 2013 20:31:22 +0000 Subject: [PATCH 134/163] Localisation updates from https://translatewiki.net. Change-Id: I0c93e9ec3742da28432765dc2a6f8977e875e9c7 --- Maps.i18n.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index f6fc336cf..a2e78fd5c 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -2932,12 +2932,14 @@ 'maps-desc' => 'Zmóžnja zasadźenje dynamiskich kartow do wikistronow, geokodowanje adresow a druhe geografiske podawki ([https://www.semantic-mediawiki.org/wiki/Maps dalše informacije...])', 'right-geocode' => 'Geokodowanje', 'maps_map' => 'Karta', + 'maps-tracking-category' => 'Strony z kartu rysowanej přez rozšěrjenje Maps', 'maps-loading-map' => 'Karta so začituje...', 'maps-load-failed' => 'Karta njeda so začitać!', 'maps-markers' => 'Marki', 'maps-copycoords-prompt' => 'STRG+C, ENTER', 'maps-searchmarkers-text' => 'Filtrowy marki', 'maps-others' => 'druhe', + 'maps-kml-parsing-failed' => 'Parsowanje jedneje KML-dataje abo wjacorych KML-datajow je so naprašowanskeho zmylka abo zmylneho XML njeporadźiło.', 'maps-ns-layer' => 'Runina', 'maps-ns-layer-talk' => 'Diskusija runiny', 'maps-layer-property' => 'Kajkosć', @@ -2950,8 +2952,14 @@ 'validation-error-invalid-layers' => 'Parameter $1 dyrbi jedna runina abo wjacore runiny być.', 'maps-layer-of-type' => 'Runina typa $1', 'maps-layer-type-supported-by' => 'Tutón typ runiny móže so {{PLURAL:$2|jenož z kartografiskej słužbu $1|z tutej kartografiskimaj słužbomaj: $1|z tutymi kartografiskimi słužbami: $1|z tutymi kartografiskimi słužbami: $1}}.wužiwać.', + 'maps-coordinates-description' => 'Parserowa hóčka za formatowanje koordinatow z a do podpěranych formatow.', 'maps-displaymap-description' => 'Geografiske karty bjez we wikiju definowanych markow na nich zwobraznić.', 'maps-displaypoint-description' => 'Geografiske karty z jednym we wikiju definowanej marku abo wjace markow na nich zwobraznić.', + 'maps-distance-description' => 'Konwertuj distancu z pomocu wěsteje podpěraneje jednotki do jeje ekwiwalenta z pomocu druheje jednotki.', + 'maps-finddestination-description' => 'Cil z pomocu podateho startoweho dypka (kotryž móže w někajkim z podpěranych formatow być), spočatneho nasměrjenja a zdalenosće pytać.', + 'maps-geocode-description' => 'Zmóžnja geokodowanje adresow, hinak prajene, přetworja wot čłowjeka čitajomne městna do sadźbow koordinatow. Je podpěra za wjacore geokodowanske słužby, kotrež njeměli so z kartowymi słužbami zaměnić.', + 'maps-geodistance-description' => 'Wulič geografisku zdalenosć mjez dwěmaj dypkomaj, z a do podpěranych formatow.', + 'maps-mapsdoc-description' => 'Tabelu z parametrami za podatu kartěrowansku słužbu hromadźe z jich standardnymi hódnotami a wopisanjemi zwobraznić.', 'maps-mapsdoc-par-service' => 'Kartografiska słužba, za kotrejež parametery dokumentacija ma so zwobraznić.', 'maps-mapsdoc-par-language' => 'Rěč, w kotrejž dokumentacija ma so zwobraznić. Jeli přełožk k dispoziciji njesteji, budźe so jendźelšćina wužiwać.', 'maps-coordinates-par-location' => 'Koordinaty, kotrež chceš formatować.', @@ -2978,7 +2986,7 @@ 'maps-geodistance-par-mappingservice' => 'Geokodowanska słužba, kotraž ma so za geokodowanje wšěch adresow wužiwać.', 'maps-displaymap-par-mappingservice' => 'Zmóžnja nastajenje kartografiskeje słužby, kotraž ma so za generowanje karty wužiwać,', 'maps-displaymap-par-coordinates' => 'Městno, na kotrež ma so karta spočatnje centrować.', - 'maps-displaymap-par-visitedicon' => 'Městno dataje ze symbolom za wopytane wotkazy', # Fuzzy + 'maps-displaymap-par-visitedicon' => 'Mjeno wobraza, kotrež ma so za markowe symbole wužiwać, po tym zo je so na nje kliknyło.', 'maps-displaymap-par-icon' => 'Zmóžnja postajenje symbola, kotryž ma so za wšě marki wužiwać.', 'maps-displaymap-par-circles' => 'Kruhi, kotrejž maja so zwobraznić', 'maps-displaymap-par-lines' => 'Linije, kotrež maja so zwobraznić', @@ -2988,6 +2996,8 @@ 'maps-displaymap-par-rectangles' => 'Praworóžki, kotrež maja so zwobraznić', 'maps-displaymap-par-static' => 'Jeli karta ma statiska być', 'maps-displaymap-par-wmsoverlay' => 'WMS-naworštowanje wužiwać', + 'maps-fullscreen-button' => 'Połnu wobrazowku přepinać', + 'maps-googlemaps3-par-enable-fullscreen' => 'Tłóčatko połneje wobrazowki zmóžnić', 'validation-error-invalid-location' => 'Parameter $1 dyrbi płaćiwe městno być.', 'validation-error-invalid-locations' => 'Parameter $1 dyrbi jedne městno abo wjacore městna być.', 'validation-error-invalid-width' => 'Parameter $1 dyrbi płaćiwa šěrokosć być.', @@ -3040,6 +3050,7 @@ 'mapeditor-import-button2' => 'Importować', 'mapeditor-export-button' => 'Do wikikoda eksportować', 'mapeditor-import-button' => 'Z wikikoda importować', + 'mapeditor-select-button' => 'Tutón wjeleróžk wubrać', 'mapeditor-mapparam-button' => 'Kartowe parametry wobdźěłać', 'mapeditor-clear-button' => 'Kartu wuprózdnić', 'mapeditor-code-title' => 'Wikikod', @@ -3052,6 +3063,7 @@ 'mapeditor-form-field-link' => 'Wotkaz', 'mapeditor-form-field-icon' => 'Symbol', 'mapeditor-form-field-group' => 'Skupina', + 'mapeditor-form-field-inlinelabel' => 'Zasadźene pomjenjowanje', 'mapeditor-form-field-strokecolor' => 'Barba smužkow', 'mapeditor-form-field-strokeopacity' => 'Opaknosć smužkow', 'mapeditor-form-field-strokeweight' => 'Smužkowa tołstosć', From e3388a2a7c6483cd16b50517dd750b5f5b8eda51 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Mon, 23 Dec 2013 20:48:38 +0000 Subject: [PATCH 135/163] Localisation updates from https://translatewiki.net. Change-Id: Iefffc7f8d1b8d10974134699fc4af604d197b520 --- Maps.i18n.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index a2e78fd5c..1f1fc9b2a 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -2997,6 +2997,7 @@ 'maps-displaymap-par-static' => 'Jeli karta ma statiska być', 'maps-displaymap-par-wmsoverlay' => 'WMS-naworštowanje wužiwać', 'maps-fullscreen-button' => 'Połnu wobrazowku přepinać', + 'maps-fullscreen-button-tooltip' => 'Kartu jako połnu wobrazowku abo zasadźenu pokazać', 'maps-googlemaps3-par-enable-fullscreen' => 'Tłóčatko połneje wobrazowki zmóžnić', 'validation-error-invalid-location' => 'Parameter $1 dyrbi płaćiwe městno być.', 'validation-error-invalid-locations' => 'Parameter $1 dyrbi jedne městno abo wjacore městna być.', @@ -3010,6 +3011,7 @@ 'validation-error-invalid-goverlays' => 'Parameter $1 dyrbi jedna woršta abo wjacore woršty być.', 'validation-error-invalid-line-param' => 'Njepłaćiwy parameter "lines" podaty.', 'validation-error-invalid-polyline-param' => 'Njepłaćiwy parameter "polylines" podaty.', + 'validation-error-invalid-searchmarkers-param' => 'Njepłaćiwa hódnota za pytanske marki, wona měła pak "all" abo "title" być.', 'maps-abb-north' => 'S', 'maps-abb-east' => 'W', 'maps-abb-south' => 'J', @@ -3026,6 +3028,7 @@ 'maps-geocoder-not-available' => 'Funkcija geokodowanja Kartow k dispoziciji njesteji, twoje městno njehodźi so geokodować.', 'maps_click_to_activate' => 'Klikń, zo by kartu aktiwizował', 'maps_centred_on' => 'Karta na $1, $2 centrowana.', + 'maps-par-mappingservice' => 'Zmóžnja nastajenje kartografiskeje słužby, kotraž ma so za wutworjenje karty wužiwać,', 'maps-par-geoservice' => 'Geokodowanska słužba, kotraž ma so za konwertowanje adresow do koordinatow wužiwać.', 'maps-par-centre' => 'Městno, hdźež karta ma so centrować', 'maps-googlemaps3-incompatbrowser' => 'Twój wobhladowak njeje kompatibelny z Google Maps v3.', From 48a099add89dee45240b9605291f71fc48cb6626 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Wed, 25 Dec 2013 20:01:33 +0000 Subject: [PATCH 136/163] Localisation updates from https://translatewiki.net. Change-Id: Id241735512558327c6a956f5a39d7d1d087a7ad8 --- Maps.i18n.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index 1f1fc9b2a..ef0b478de 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -265,6 +265,7 @@ The category is automatically added unless the feature is disabled.', 'maps-copycoords-prompt' => 'text displayed in JavaScript prompt to indicate first press ctrl+c to copy text, and press enter to close prompt', + 'maps-searchmarkers-text' => 'Used as default value for input box of the Search form. (Looks like placeholder.)', 'maps-others' => '{{Identical|Other}}', 'maps-kml-parsing-failed' => 'text displayed in the event of parsing failure of kml file(s).', 'maps-ns-layer' => '{{Identical|Layer}}', From 8a99bf74eeb45cb2d5a0b7ca251821d24e46c95a Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Thu, 26 Dec 2013 19:36:27 +0000 Subject: [PATCH 137/163] Localisation updates from https://translatewiki.net. Change-Id: I774102fbf832ff8becf1a8c24b1fd413d7fbf31f --- Maps.i18n.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index ef0b478de..3dbd2d287 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -5307,6 +5307,9 @@ 'maps-finddestination-par-bearing' => 'Kierunek początkowy.', 'maps-finddestination-par-distance' => 'Odległość podróży.', 'maps-geocode-par-location' => 'Adres, który chcesz geokodować.', + 'maps-geocode-par-format' => 'Format wynikowych współrzędnych.', + 'maps-displaymap-par-maxzoom' => 'Maksymalny poziom powiększenia', + 'maps-displaymap-par-minzoom' => 'Minimalny poziom powiększenia', 'validation-error-invalid-location' => 'Parametr $1 musi wskazywać prawidłową lokalizację.', 'validation-error-invalid-locations' => 'Parametr $1 musi wskazywać jedną lub więcej prawidłowych lokalizacji.', 'validation-error-invalid-width' => 'Parametr $1 musi określać prawidłową szerokość.', From f00ee8539bba9a49ee9d17762900c85c8a741afc Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sat, 28 Dec 2013 19:30:20 +0000 Subject: [PATCH 138/163] Localisation updates from https://translatewiki.net. Change-Id: I052ac1c45d1d62935cd92fc4f9b48ae2157ceac3 --- Maps.i18n.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Maps.i18n.php b/Maps.i18n.php index 3dbd2d287..cd9af5037 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -1158,6 +1158,7 @@ */ $messages['ce'] = array( 'maps-layer-value' => 'МаьӀна', + 'maps-abb-east' => 'Цу', 'mapeditor-link-title-switcher-link-text' => 'Хьажораг', 'mapeditor-form-field-title' => 'ЦӀе', 'mapeditor-form-field-link' => 'Хьажораг', From 971c2ff14f0c198ebfc4f35e648821f97d3cd7c8 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Sun, 29 Dec 2013 19:31:06 +0000 Subject: [PATCH 139/163] Localisation updates from https://translatewiki.net. Change-Id: I6674a428b4e87cfd0cacf71232d9e08b1d5c013a --- Maps.i18n.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index cd9af5037..0f61548e6 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -3857,7 +3857,7 @@ 'maps-load-failed' => '지도를 불러올 수 없습니다!', 'maps-markers' => '표시', 'maps-copycoords-prompt' => 'CTRL+C, ENTER', - 'maps-searchmarkers-text' => '표시 필터', + 'maps-searchmarkers-text' => '표시를 필터', 'maps-others' => '기타', 'maps-ns-layer' => '레이어', 'maps-ns-layer-talk' => '레이어 토론', @@ -4021,7 +4021,7 @@ 'mapeditor-form-field-strokeweight' => '선 굵기', 'mapeditor-form-field-fillcolor' => '채우기 색', 'mapeditor-form-field-fillopcaity' => '채우기 투명도', - 'mapeditor-form-field-showonhover' => '가리켰을 때에만 표시', + 'mapeditor-form-field-showonhover' => '가리켰을 때에만 보이기', 'mapeditor-mapparam-title' => '지도 변수 편집', 'mapeditor-mapparam-defoption' => '-변수 선택-', 'mapeditor-imageoverlay-button' => '그림 배치 추가', From 0a35ba9900c25a444c0e745d0aae076742f4a455 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Wed, 1 Jan 2014 19:57:50 +0000 Subject: [PATCH 140/163] Localisation updates from https://translatewiki.net. Change-Id: I12ef2e48f4b90b8aadf02821e26544caaa6aae45 --- Maps.i18n.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index 0f61548e6..3f1f98364 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -4371,7 +4371,7 @@ 'maps_map_cannot_be_displayed' => 'Картата не може да се прикаже.', 'maps-geocoder-not-available' => 'Функцијата за геокодирање на Карти е недостапна. Вашата местоположба не може да се геокодира.', 'maps_googlemaps3' => 'Google Карти вер. 2', - 'maps_click_to_activate' => 'Кликнете за активирање на картата', + 'maps_click_to_activate' => 'Стиснете за активирање на картата', 'maps_centred_on' => 'Средиште на картата во $1, $2.', 'maps-par-mappingservice' => 'Овозможува назначување на картографска служба што ќе се користи за создавање на картата.', 'maps-par-resizable' => 'Дава можност за менување на големината на картите со влечење на долниот десен агол.', From bf0fea982898ab7ec2d71438a85a9bdf913446a4 Mon Sep 17 00:00:00 2001 From: Translation updater bot Date: Fri, 3 Jan 2014 20:40:34 +0000 Subject: [PATCH 141/163] Localisation updates from https://translatewiki.net. Change-Id: I6bf4d823f0fad5b762fbe6e367788848275073bc --- Maps.i18n.php | 55 ++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/Maps.i18n.php b/Maps.i18n.php index 3f1f98364..504af3915 100644 --- a/Maps.i18n.php +++ b/Maps.i18n.php @@ -774,12 +774,12 @@ 'maps-layer-value' => 'Значэньне', 'maps-layer-errors' => 'Памылкі', 'maps-error-invalid-layerdef' => 'Гэтае вызначэньне слою — няслушнае.', - 'maps-error-invalid-layertype' => 'Няма слаёў тыпу «$1». Падтрымліваецца толькі {{PLURAL:$3|гэты тып|гэтыя тыпы}}: $2', - 'maps-error-no-layertype' => 'Вам неабходна вызначыць тып слою. {{PLURAL:$2|Падтрымліваецца толькі гэты тып|Падтрымліваюцца толькі гэтыя тыпы}}: $1', + 'maps-error-invalid-layertype' => 'Няма слаёў тыпу «$1». Падтрымліваецца толькі {{PLURAL:$3|1=гэты тып|гэтыя тыпы}}: $2', # Fuzzy + 'maps-error-no-layertype' => 'Вам неабходна вызначыць тып слою. {{PLURAL:$2|1=Падтрымліваецца толькі гэты тып|Падтрымліваюцца толькі гэтыя тыпы}}: $1', # Fuzzy 'validation-error-invalid-layer' => 'Парамэтар $1 мусіць быць слушным слоем.', 'validation-error-invalid-layers' => 'Парамэтар $1 мусіць быць адным ці болей слушнымі слаямі.', 'maps-layer-of-type' => 'Слой тыпу $1', - 'maps-layer-type-supported-by' => 'Гэты тып слою можа быць выкарыстаны толькі з {{PLURAL:$2|сэрвісам мапаў $1|сэрвісамі мапаў: $1}}.', + 'maps-layer-type-supported-by' => 'Гэты тып слою можа быць выкарыстаны толькі з {{PLURAL:$2|1=сэрвісам мапаў $1|сэрвісамі мапаў: $1}}.', # Fuzzy 'maps-coordinates-description' => 'Перахопнік парсэру для фарматаваньня каардынатаў, з і ў любыя фарматы, якія падтрымліваюцца.', 'maps-displaymap-description' => 'Паказвае геаграфічныя мапы без аніякіх вікі-пазнакаў на іх.', 'maps-displaypoint-description' => 'Паказвае геаграфічныя мапы з адной ці болей вікі-пазнакамі на іх.', @@ -855,13 +855,13 @@ 'maps-longitude' => 'Даўгата:', 'maps-invalid-coordinates' => 'Значэньне $1 зьяўляецца недапушчальным наборам каардынатаў.', 'maps_coordinates_missing' => 'Каардынаты для мапы не пазначаныя.', - 'maps_geocoding_failed' => '{{PLURAL:$2|Наступны адрас ня можа быць геакадаваны|Наступныя адрасы ня могуць быць геакадаваныя}}: $1. -Мапа ня можа быць паказана.', - 'maps_geocoding_failed_for' => '{{PLURAL:$2|Наступны адрас ня можа быць геакадаваны і быў выдалены|Наступныя адрасы ня могуць быць геакадаваны і былі выдаленыя}} з мапы: -$1', - 'maps_unrecognized_coords' => 'Наступныя {{PLURAL:$2|каардыната не была распазнаная|каардынаты не былі распазнаныя}}: $1.', - 'maps_unrecognized_coords_for' => '{{PLURAL:$2|Наступная каардыната не была апазнаная|Наступныя каардынаты не былі апазнаныя}} і {{PLURAL:$2|яна не паказаная|яны не паказаныя}}: -$1', + 'maps_geocoding_failed' => '{{PLURAL:$2|1=Наступны адрас ня можа быць геакадаваны|Наступныя адрасы ня могуць быць геакадаваныя}}: $1. +Мапа ня можа быць паказана.', # Fuzzy + 'maps_geocoding_failed_for' => '{{PLURAL:$2|1=Наступны адрас ня можа быць геакадаваны і быў выдалены|Наступныя адрасы ня могуць быць геакадаваны і былі выдаленыя}} з мапы: +$1', # Fuzzy + 'maps_unrecognized_coords' => 'Наступныя {{PLURAL:$2|1=каардыната не была распазнаная|каардынаты не былі распазнаныя}}: $1.', # Fuzzy + 'maps_unrecognized_coords_for' => '{{PLURAL:$2|1=Наступная каардыната не была апазнаная|Наступныя каардынаты не былі апазнаныя}} і {{PLURAL:$2|1=яна не паказаная|яны не паказаныя}}: +$1', # Fuzzy 'maps_map_cannot_be_displayed' => 'Мапа ня можа быць паказаная.', 'maps-geocoder-not-available' => 'Магчымасьць геаграфічнага кадаваньня для мапаў недаступная. Вашае месцазнаходжаньне ня можа быць геаграфічна закадаванае.', 'maps_click_to_activate' => 'Націсьніце для актывацыі мапы', @@ -1157,6 +1157,7 @@ * @author Умар */ $messages['ce'] = array( + 'maps-others' => 'кхин', 'maps-layer-value' => 'МаьӀна', 'maps-abb-east' => 'Цу', 'mapeditor-link-title-switcher-link-text' => 'Хьажораг', @@ -5958,12 +5959,12 @@ 'maps-layer-value' => 'Значение', 'maps-layer-errors' => 'Ошибки', 'maps-error-invalid-layerdef' => 'Это определение слоя неверно.', - 'maps-error-invalid-layertype' => 'Не существует слоя типа «$1». {{PLURAL:$3|Поддерживается только следующий тип|Поддерживаются только следующие типы}}: $2', - 'maps-error-no-layertype' => 'Вам нужно указать тип слоя. {{PLURAL:$2|Поддерживается только следующий тип|Поддерживаются следующие типы}}: $1', + 'maps-error-invalid-layertype' => 'Не существует слоя типа «$1». {{PLURAL:$3|1=Поддерживается только следующий тип|Поддерживаются только следующие типы}}: $2', # Fuzzy + 'maps-error-no-layertype' => 'Вам нужно указать тип слоя. {{PLURAL:$2|1=Поддерживается только следующий тип|Поддерживаются следующие типы}}: $1', # Fuzzy 'validation-error-invalid-layer' => 'Параметр $1 должен быть корректным слоем.', 'validation-error-invalid-layers' => 'Параметр $1 должен содержать один или несколько корректных слоёв.', 'maps-layer-of-type' => 'Слой типа $1', - 'maps-layer-type-supported-by' => 'Этот тип слоя может быть использован {{PLURAL:$2|только с картографической службой|только со следующими картографическими службами:}} $1', + 'maps-layer-type-supported-by' => 'Этот тип слоя может быть использован {{PLURAL:$2|1=только с картографической службой|только со следующими картографическими службами:}} $1', # Fuzzy 'maps-coordinates-description' => 'Перехватчик синтаксического анализатора для форматирования координат из любого и в любой поддерживаемый формат.', 'maps-displaymap-description' => 'Отображение географических карт без каких-либо вики-маркеров на них.', 'maps-displaypoint-description' => 'Отображение географических карт с одним или несколькими вики-маркерами на них.', @@ -6038,13 +6039,13 @@ 'maps-longitude' => 'Долгота:', 'maps-invalid-coordinates' => 'Значение $1 не признано допустимым набором координат.', 'maps_coordinates_missing' => 'Не указаны координаты для карты.', - 'maps_geocoding_failed' => '{{PLURAL:$2|Следующий адрес не может быть геокодирован|Следующие адреса не могут быть геокодированы}}: $1. -Карта не может быть отображена.', - 'maps_geocoding_failed_for' => '{{PLURAL:$2|Следующий адрес не может быть геокодирован и был удалён|Следующие адреса не могут быть геокодированы и были удалены}} с карты: -$1', - 'maps_unrecognized_coords' => 'Следующие {{PLURAL:$2|координаты|координаты}} не были опознаны: $1.', - 'maps_unrecognized_coords_for' => 'Следующие координаты не были опознаны, {{PLURAL:$2|они|они}} не показаны на карте: -$1', + 'maps_geocoding_failed' => '{{PLURAL:$2|1=Следующий адрес не может быть геокодирован|Следующие адреса не могут быть геокодированы}}: $1. +Карта не может быть отображена.', # Fuzzy + 'maps_geocoding_failed_for' => '{{PLURAL:$2|1=Следующий адрес не может быть геокодирован и был удалён|Следующие адреса не могут быть геокодированы и были удалены}} с карты: +$1', # Fuzzy + 'maps_unrecognized_coords' => 'Следующие {{PLURAL:$2|1=координаты|координаты}} не были опознаны: $1.', # Fuzzy + 'maps_unrecognized_coords_for' => 'Следующие координаты не были опознаны, {{PLURAL:$2|1=они|они}} не показаны на карте: +$1', # Fuzzy 'maps_map_cannot_be_displayed' => 'Карта не может быть показана.', 'maps-geocoder-not-available' => 'Функция геокодирования карт недоступна, ваше местоположение не может быть геокодировано.', 'maps_click_to_activate' => 'Нажмите для активации карты', @@ -6786,12 +6787,12 @@ 'maps-layer-value' => 'Значення', 'maps-layer-errors' => 'Помилки', 'maps-error-invalid-layerdef' => 'Це визначення шару невірне.', - 'maps-error-invalid-layertype' => 'Не існують шари типу «$1». {{PLURAL:$3|Підтримується лише наступний тип|Підтримуються лише наступні типи}}: $2', - 'maps-error-no-layertype' => 'Вам потрібно вказати тип шару. {{PLURAL:$2|Тільки такий тип|Такі типи}} підтримуються: $1', + 'maps-error-invalid-layertype' => 'Не існують шари типу «$1». {{PLURAL:$3|1=Підтримується лише наступний тип|Підтримуються лише наступні типи}}: $2', + 'maps-error-no-layertype' => 'Вам потрібно вказати тип шару. {{PLURAL:$2|1=Тільки такий тип|Такі типи}} підтримуються: $1', 'validation-error-invalid-layer' => 'Параметр $1 повинен бути коректним шаром.', 'validation-error-invalid-layers' => 'Параметри $1 повинні містити один чи більше коректних шарів.', 'maps-layer-of-type' => 'Шар типу $1', - 'maps-layer-type-supported-by' => 'Цей тип шару може бути використано {{PLURAL:$2|лише із картографічним сервісом|лише із наступними картографічними сервісами:}} $1', + 'maps-layer-type-supported-by' => 'Цей тип шару може бути використано {{PLURAL:$2|1=лише із картографічним сервісом|лише із наступними картографічними сервісами:}} $1', 'maps-coordinates-description' => 'Перехопиник парсеру для форматування координат із будь-якого у будьякий формат, що підтримується.', 'maps-displaymap-description' => 'Відображення географічних карт без жодних вікі-маркерів на них.', 'maps-displaypoint-description' => 'Показ географічних карт із одією або декількома вікі-позначками на них.', @@ -6880,12 +6881,12 @@ 'maps-longitude' => 'Довгота:', 'maps-invalid-coordinates' => 'Значення $1 не є дійсним набором координат.', 'maps_coordinates_missing' => 'Не вказані координати для мапи.', - 'maps_geocoding_failed' => '{{PLURAL:$2|Ця адреса не може бути геокодована|Ці адреси не можуть бути геокодовані}}: $1. + 'maps_geocoding_failed' => '{{PLURAL:$2|1=Ця адреса не може бути геокодована|Ці адреси не можуть бути геокодовані}}: $1. Мапа не може бути відображена.', - 'maps_geocoding_failed_for' => '{{PLURAL:$2|Наступна адреса не може бути геокодована та була видалена|Наступні адреси не можуть бути геокодовані та були видалені}} з мапи: + 'maps_geocoding_failed_for' => '{{PLURAL:$2|1=Наступна адреса не може бути геокодована та була видалена|Наступні адреси не можуть бути геокодовані та були видалені}} з мапи: $1', - 'maps_unrecognized_coords' => 'Ці {{PLURAL:$2|координати|координати}} не були розпізнані: $1.', - 'maps_unrecognized_coords_for' => 'Наступні координати не були розпізнані, {{PLURAL:$2|вони|вони}} не показані на мапі: + 'maps_unrecognized_coords' => 'Ці {{PLURAL:$2|1=координати|координати}} не були розпізнані: $1.', + 'maps_unrecognized_coords_for' => 'Наступні координати не були розпізнані, {{PLURAL:$2|1=вони|вони}} не показані на мапі: $1', 'maps_map_cannot_be_displayed' => 'Мапа не може бути відображена.', 'maps-geocoder-not-available' => 'Функція геокодування мап недоступна. Ваше місце розташування не може бути геокодоване.', From 7bb1ca37a673492d3da4a319ffd8e92463928989 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sat, 4 Jan 2014 06:02:41 +0100 Subject: [PATCH 142/163] Re-add polygon support --- includes/Maps_DisplayMapRenderer.php | 12 +++++----- includes/parserhooks/Maps_DisplayMap.php | 28 ++++++++++++------------ includes/parsers/LineParser.php | 6 ++++- includes/parsers/PolygonParser.php | 17 +++++--------- 4 files changed, 29 insertions(+), 34 deletions(-) diff --git a/includes/Maps_DisplayMapRenderer.php b/includes/Maps_DisplayMapRenderer.php index 2ce0ac5ea..f43f82731 100644 --- a/includes/Maps_DisplayMapRenderer.php +++ b/includes/Maps_DisplayMapRenderer.php @@ -1,4 +1,5 @@ getJSONObject(); - } - if ( is_object( $params['wmsoverlay'] ) ) { $params['wmsoverlay'] = $params['wmsoverlay']->getJSONObject(); } @@ -164,6 +158,10 @@ protected function handleShapeData( array &$params, Parser $parserClone ) { foreach ( $textContainers as &$textContainer ) { if ( is_array( $textContainer ) ) { foreach ( $textContainer as &$obj ) { + if ( $obj instanceof Element ) { + $obj = $obj->getArrayValue(); + } + $obj['title'] = $parserClone->parse( $obj['title'] , $parserClone->getTitle() , new ParserOptions() )->getText(); $obj['text'] = $parserClone->parse( $obj['text'] , $parserClone->getTitle() , new ParserOptions() )->getText(); diff --git a/includes/parserhooks/Maps_DisplayMap.php b/includes/parserhooks/Maps_DisplayMap.php index 475b3784a..f9d8fe4e9 100644 --- a/includes/parserhooks/Maps_DisplayMap.php +++ b/includes/parserhooks/Maps_DisplayMap.php @@ -96,25 +96,25 @@ public static function getCommonMapParams() { ); $params['polygons'] = array( - // TODO 'type' => 'mapspolygon', + 'type' => 'mapspolygon', 'default' => array(), 'delimiter' => ';', 'islist' => true, ); - $params['circles'] = array( - 'default' => array(), - // TODO 'manipulations' => new MapsParamCircle( '~' ), // TODO - 'delimiter' => ';', - 'islist' => true, - ); - - $params['rectangles'] = array( - 'default' => array(), - // TODO 'manipulations' => new MapsParamRectangle( '~' ), // TODO - 'delimiter' => ';', - 'islist' => true, - ); +// $params['circles'] = array( +// 'default' => array(), +// // TODO 'manipulations' => new MapsParamCircle( '~' ), // TODO +// 'delimiter' => ';', +// 'islist' => true, +// ); +// +// $params['rectangles'] = array( +// 'default' => array(), +// // TODO 'manipulations' => new MapsParamRectangle( '~' ), // TODO +// 'delimiter' => ';', +// 'islist' => true, +// ); $params['wmsoverlay'] = array( 'type' => 'wmsoverlay', diff --git a/includes/parsers/LineParser.php b/includes/parsers/LineParser.php index 0d5c2057e..2cdb21003 100644 --- a/includes/parsers/LineParser.php +++ b/includes/parsers/LineParser.php @@ -34,7 +34,7 @@ class LineParser extends StringValueParser { public function stringParse( $value ) { $parts = explode( $this->metaDataSeparator , $value ); - $line = new Line( $this->parseCoordinates( + $line = $this->constructShapeFromLatLongValues( $this->parseCoordinates( explode( ':' , array_shift( $parts ) ) ) ); @@ -43,6 +43,10 @@ public function stringParse( $value ) { return $line; } + protected function constructShapeFromLatLongValues( array $locations ) { + return new Line( $locations ); + } + /** * @since 3.0 * diff --git a/includes/parsers/PolygonParser.php b/includes/parsers/PolygonParser.php index a3c9cfa1b..45b48493e 100644 --- a/includes/parsers/PolygonParser.php +++ b/includes/parsers/PolygonParser.php @@ -13,19 +13,12 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ -class PolygonParser extends StringValueParser { +class PolygonParser extends LineParser { - /** - * @see StringValueParser::stringParse - * - * @since 3.0 - * - * @param string $value - * - * @return Polygon - */ - public function stringParse( $value ) { - // TODO + protected function constructShapeFromLatLongValues( array $locations ) { + return new Polygon( $locations ); } + // TODO: handle only visible on hover + } From ae776389d6cf5e7b082ad351d4e259c4d39a799f Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sun, 5 Jan 2014 00:28:06 +0100 Subject: [PATCH 143/163] Tweak rel notes --- docs/RELEASE-NOTES.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/RELEASE-NOTES.md b/docs/RELEASE-NOTES.md index 0efb129cc..1cc468a41 100644 --- a/docs/RELEASE-NOTES.md +++ b/docs/RELEASE-NOTES.md @@ -18,6 +18,11 @@ bugs have been found and fixed. No big new features have been added. * Added leaflet service * Added Geocoder.us geoservice support +#### Bug fixes + +* Fixed autoinfowindows functionality. +* Fixed various bugs in geocoordinate parsing and formatting. + #### Breaking internal changes * Moved classes into Maps namespace @@ -27,11 +32,6 @@ bugs have been found and fixed. No big new features have been added. * Geocoding interfaces changed * MapsLocation interface changed -#### Bug fixes - -* Fixed autoinfowindows functionality. -* Fixed various bugs in geocoordinate parsing and formatting. - ## Maps 2.0 (2012-10-05) #### Compatibility changes From 94cb4294576066567db1c45e13ce9a47e4c80dce Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sun, 5 Jan 2014 00:33:45 +0100 Subject: [PATCH 144/163] Improve build time --- build/travis/before_script.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/build/travis/before_script.sh b/build/travis/before_script.sh index f6b7b7ef8..34ed971f2 100644 --- a/build/travis/before_script.sh +++ b/build/travis/before_script.sh @@ -6,14 +6,9 @@ originalDirectory=$(pwd) cd .. -if [ "$MW" == "master" ] -then - git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git phase3 --depth 1 -else - wget https://github.com/wikimedia/mediawiki-core/archive/$MW.tar.gz - tar -zxf $MW.tar.gz - mv mediawiki-core-$MW phase3 -fi +wget https://github.com/wikimedia/mediawiki-core/archive/$MW.tar.gz +tar -zxf $MW.tar.gz +mv mediawiki-core-$MW phase3 cd phase3 From c45de12de9e0e306f411b9d777bca49a27e29266 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sun, 5 Jan 2014 00:36:47 +0100 Subject: [PATCH 145/163] Fix typo --- Maps.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maps.php b/Maps.php index c8c8e2e8e..c88788730 100644 --- a/Maps.php +++ b/Maps.php @@ -13,7 +13,7 @@ } if ( defined( 'Maps_VERSION' ) ) { - // Do not initialize more then once. + // Do not initialize more than once. return 1; } From cb074b0c6406360f99d0f2273e896c71c82afff0 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sun, 5 Jan 2014 00:39:14 +0100 Subject: [PATCH 146/163] Add to CircleTest --- composer.json | 2 +- tests/phpunit/elements/CircleTest.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index e041be6b1..3f8bfe953 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "require": { "php": ">=5.3.2", "composer/installers": ">=1.0.1", - "mediawiki/validator": "1.*,!=1.0", + "mediawiki/validator": "1.*,>1.0", "data-values/geo": "0.*,>=0.1.1" }, "autoload": { diff --git a/tests/phpunit/elements/CircleTest.php b/tests/phpunit/elements/CircleTest.php index 1ac8cce07..a16c69cd1 100644 --- a/tests/phpunit/elements/CircleTest.php +++ b/tests/phpunit/elements/CircleTest.php @@ -58,6 +58,15 @@ public function testGetCircleCentre( Circle $circle, array $arguments ) { $this->assertTrue( $circle->getCircleCentre()->equals( $arguments[0] ) ); } + /** + * @dataProvider instanceProvider + * @param Circle $circle + * @param array $arguments + */ + public function testGetCircleRadius( Circle $circle, array $arguments ) { + $this->assertEquals( $arguments[1], $circle->getCircleRadius() ); + } + } From 71cc1b06cc934ab77b3701891c7fa9a4f3c9eb7e Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sun, 5 Jan 2014 00:46:55 +0100 Subject: [PATCH 147/163] Remove silly test registration --- Maps.hooks.php | 45 --------------------------- Maps.php | 1 - tests/phpunit/elements/CircleTest.php | 4 +++ 3 files changed, 4 insertions(+), 46 deletions(-) diff --git a/Maps.hooks.php b/Maps.hooks.php index e1f6036e0..07d620dff 100644 --- a/Maps.hooks.php +++ b/Maps.hooks.php @@ -35,51 +35,6 @@ public static function addToAdminLinks( ALTree &$admin_links_tree ) { return true; } - /** - * Hook to add PHPUnit test cases. - * @see https://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList - * - * @since 0.7 - * - * @param array &$files - * - * @return boolean - */ - public static function registerUnitTests( array &$files ) { - // @codeCoverageIgnoreStart - $testFiles = array( - 'elements/Circle', - 'elements/ImageOverlay', - 'elements/Line', - 'elements/Location', - 'elements/Polygon', - 'elements/Rectangle', - - 'parserhooks/Coordinates', - 'parserhooks/DisplayMap', - 'parserhooks/Distance', - 'parserhooks/Finddestination', - 'parserhooks/Geocode', - 'parserhooks/Geodistance', - 'parserhooks/MapsDoc', - - 'parsers/DistanceParser', - 'parsers/LineParser', - 'parsers/LocationParser', - 'parsers/WmsOverlayParser', - - 'Element', - 'MapsDistanceParser', - ); - - foreach ( $testFiles as $file ) { - $files[] = __DIR__ . '/tests/phpunit/' . $file . 'Test.php'; - } - - return true; - // @codeCoverageIgnoreEnd - } - /** * Intercept pages in the Layer namespace to handle them correctly. * diff --git a/Maps.php b/Maps.php index c88788730..563c2d318 100644 --- a/Maps.php +++ b/Maps.php @@ -84,7 +84,6 @@ }; $wgHooks['AdminLinks'][] = 'MapsHooks::addToAdminLinks'; - $wgHooks['UnitTestsList'][] = 'MapsHooks::registerUnitTests'; $wgHooks['ArticleFromTitle'][] = 'MapsHooks::onArticleFromTitle'; $wgHooks['MakeGlobalVariablesScript'][] = 'MapsHooks::onMakeGlobalVariablesScript'; $wgHooks['CanonicalNamespaces'][] = 'MapsHooks::onCanonicalNamespaces'; diff --git a/tests/phpunit/elements/CircleTest.php b/tests/phpunit/elements/CircleTest.php index a16c69cd1..3b016fa97 100644 --- a/tests/phpunit/elements/CircleTest.php +++ b/tests/phpunit/elements/CircleTest.php @@ -43,8 +43,12 @@ public function constructorProvider() { $argLists[] = array( true, new LatLongValue( 4, 2 ), 42 ); $argLists[] = array( true, new LatLongValue( 42, 2.2 ), 9000.1 ); + $argLists[] = array( true, new LatLongValue( 4, 2 ), 1 ); + $argLists[] = array( true, new LatLongValue( 4, 2 ), 0.1 ); $argLists[] = array( false, '~=[,,_,,]:3', 9000.1 ); +// $argLists[] = array( false, new LatLongValue( 4, 2 ), 0 ); +// $argLists[] = array( false, new LatLongValue( 4, 2 ), -42 ); return $argLists; } From c168b39c446c599c8c84d4ac4dfe903badc5b7a0 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sun, 5 Jan 2014 01:21:08 +0100 Subject: [PATCH 148/163] Improve geoshape tests --- src/Maps/Elements/Circle.php | 9 ++- src/Maps/Elements/ImageOverlay.php | 7 +++ src/Maps/Elements/Rectangle.php | 7 +++ tests/phpunit/elements/BaseElementTest.php | 66 +++++++-------------- tests/phpunit/elements/CircleTest.php | 33 +++++------ tests/phpunit/elements/ImageOverlayTest.php | 27 ++++----- tests/phpunit/elements/LineTest.php | 31 ++++------ tests/phpunit/elements/LocationTest.php | 50 ++++------------ tests/phpunit/elements/RectangleTest.php | 30 ++++------ 9 files changed, 104 insertions(+), 156 deletions(-) diff --git a/src/Maps/Elements/Circle.php b/src/Maps/Elements/Circle.php index d70ffa0de..a011d9221 100644 --- a/src/Maps/Elements/Circle.php +++ b/src/Maps/Elements/Circle.php @@ -3,6 +3,7 @@ namespace Maps\Elements; use DataValues\LatLongValue; +use InvalidArgumentException; /** * @since 3.0 @@ -27,8 +28,14 @@ class Circle extends \MapsBaseFillableElement { /** * @param LatLongValue $circleCentre * @param integer|float $circleRadius + * + * @throws InvalidArgumentException */ - public function __construct( LatLongValue $circleCentre , $circleRadius ) { + public function __construct( LatLongValue $circleCentre, $circleRadius ) { + if ( !is_float( $circleRadius ) && !is_int( $circleRadius ) ) { + throw new InvalidArgumentException( '$circleRadius must be a float or int' ); + } + parent::__construct(); $this->setCircleCentre( $circleCentre ); diff --git a/src/Maps/Elements/ImageOverlay.php b/src/Maps/Elements/ImageOverlay.php index 8eaf15403..b3dce59da 100644 --- a/src/Maps/Elements/ImageOverlay.php +++ b/src/Maps/Elements/ImageOverlay.php @@ -3,6 +3,7 @@ namespace Maps\Elements; use DataValues\LatLongValue; +use InvalidArgumentException; /** * @since 3.0 @@ -29,8 +30,14 @@ class ImageOverlay extends Rectangle { * @param LatLongValue $boundsNorthEast * @param LatLongValue $boundsSouthWest * @param string $image + * + * @throws InvalidArgumentException */ public function __construct( LatLongValue $boundsNorthEast, LatLongValue $boundsSouthWest, $image ) { + if ( !is_string( $image ) ) { + throw new InvalidArgumentException( '$image must be a string' ); + } + parent::__construct( $boundsNorthEast, $boundsSouthWest ); $this->image = $image; } diff --git a/src/Maps/Elements/Rectangle.php b/src/Maps/Elements/Rectangle.php index 414add2f3..f695c83ac 100644 --- a/src/Maps/Elements/Rectangle.php +++ b/src/Maps/Elements/Rectangle.php @@ -3,6 +3,7 @@ namespace Maps\Elements; use DataValues\LatLongValue; +use InvalidArgumentException; /** * @since 3.0 @@ -31,8 +32,14 @@ class Rectangle extends \MapsBaseFillableElement { * * @param LatLongValue $rectangleNorthEast * @param LatLongValue $rectangleSouthWest + * + * @throws InvalidArgumentException */ public function __construct( LatLongValue $rectangleNorthEast, LatLongValue $rectangleSouthWest ) { + if ( $rectangleNorthEast->equals( $rectangleSouthWest ) ) { + throw new InvalidArgumentException( '$rectangleNorthEast cannot be equal to $rectangleSouthWest' ); + } + parent::__construct(); // TODO: validate bounds are correct, if not, flip diff --git a/tests/phpunit/elements/BaseElementTest.php b/tests/phpunit/elements/BaseElementTest.php index a8f47ee36..772b2d557 100644 --- a/tests/phpunit/elements/BaseElementTest.php +++ b/tests/phpunit/elements/BaseElementTest.php @@ -23,15 +23,11 @@ abstract class BaseElementTest extends \PHPUnit_Framework_TestCase { */ public abstract function getClass(); - /** - * First element can be a boolean indication if the successive values are valid, - * or a string indicating the type of exception that should be thrown (ie not valid either). - * - * @since 3.0 - * - * @return array - */ - public abstract function constructorProvider(); + public abstract function validConstructorProvider(); + + public function invalidConstructorProvider() { + return array(); + } /** * Creates and returns a new instance of the concrete class. @@ -55,48 +51,32 @@ public function newInstance() { public function instanceProvider() { $phpFails = array( $this, 'newInstance' ); - return array_filter( array_map( + return array_map( function( array $args ) use ( $phpFails ) { - $isValid = array_shift( $args ) === true; - - if ( $isValid ) { - return array( call_user_func_array( $phpFails, $args ), $args ); - } - else { - return false; - } + return array( call_user_func_array( $phpFails, $args ), $args ); }, - $this->constructorProvider() - ), 'is_array' ); + $this->validConstructorProvider() + ); } /** - * @dataProvider constructorProvider + * @dataProvider validConstructorProvider * * @since 3.0 */ - public function testConstructor() { - $args = func_get_args(); - - $valid = array_shift( $args ); - $pokemons = null; - - try { - $instance = call_user_func_array( array( $this, 'newInstance' ), $args ); - $this->assertInstanceOf( $this->getClass(), $instance ); - } - catch ( \Exception $pokemons ) { - if ( $valid === true ) { - throw $pokemons; - } + public function testGivenValidArguments_constructorDoesNotThrowException() { + $instance = call_user_func_array( array( $this, 'newInstance' ), func_get_args() ); + $this->assertInstanceOf( $this->getClass(), $instance ); + } - if ( is_string( $valid ) ) { - $this->assertEquals( $valid, get_class( $pokemons ) ); - } - else { - $this->assertFalse( $valid ); - } - } + /** + * @dataProvider invalidConstructorProvider + * + * @since 3.0 + */ + public function testGivenInvalidArguments_constructorThrowsException() { + $this->setExpectedException( 'InvalidArgumentException' ); + call_user_func_array( array( $this, 'newInstance' ), func_get_args() ); } /** @@ -107,4 +87,4 @@ public function testGetOptions( Element $element ) { $this->assertInstanceOf( '\Maps\ElementOptions', $element->getOptions() ); } -} \ No newline at end of file +} diff --git a/tests/phpunit/elements/CircleTest.php b/tests/phpunit/elements/CircleTest.php index 3b016fa97..ab1b43229 100644 --- a/tests/phpunit/elements/CircleTest.php +++ b/tests/phpunit/elements/CircleTest.php @@ -26,29 +26,24 @@ public function getClass() { return 'Maps\Elements\Circle'; } - /** - * @see BaseElementTest::constructorProvider - * - * @since 3.0 - * - * @return array - */ - public function constructorProvider() { + public function validConstructorProvider() { $argLists = array(); - $argLists[] = array( false ); - $argLists[] = array( false, '' ); - $argLists[] = array( false, '4,2' ); - $argLists[] = array( false, new LatLongValue( 4, 2 ) ); + $argLists[] = array( new LatLongValue( 4, 2 ), 42 ); + $argLists[] = array( new LatLongValue( 42, 2.2 ), 9000.1 ); + $argLists[] = array( new LatLongValue( 4, 2 ), 1 ); + $argLists[] = array( new LatLongValue( 4, 2 ), 0.1 ); + + return $argLists; + } + + public function invalidConstructorProvider() { + $argLists = array(); - $argLists[] = array( true, new LatLongValue( 4, 2 ), 42 ); - $argLists[] = array( true, new LatLongValue( 42, 2.2 ), 9000.1 ); - $argLists[] = array( true, new LatLongValue( 4, 2 ), 1 ); - $argLists[] = array( true, new LatLongValue( 4, 2 ), 0.1 ); + $argLists[] = array( new LatLongValue( 4, 2 ), 'foo' ); - $argLists[] = array( false, '~=[,,_,,]:3', 9000.1 ); -// $argLists[] = array( false, new LatLongValue( 4, 2 ), 0 ); -// $argLists[] = array( false, new LatLongValue( 4, 2 ), -42 ); +// $argLists[] = array( new LatLongValue( 4, 2 ), 0 ); +// $argLists[] = array( new LatLongValue( 4, 2 ), -42 ); return $argLists; } diff --git a/tests/phpunit/elements/ImageOverlayTest.php b/tests/phpunit/elements/ImageOverlayTest.php index a59dcee97..419991efe 100644 --- a/tests/phpunit/elements/ImageOverlayTest.php +++ b/tests/phpunit/elements/ImageOverlayTest.php @@ -25,24 +25,21 @@ public function getClass() { return 'Maps\Elements\ImageOverlay'; } - /** - * @see BaseElementTest::constructorProvider - * - * @since 3.0 - * - * @return array - */ - public function constructorProvider() { - $argLists = array(); + public function validConstructorProvider() { + $argLists = parent::validConstructorProvider(); - foreach ( parent::constructorProvider() as $argList ) { - $argList[0] = false; - $argLists[] = $argList; + foreach ( $argLists as &$argList ) { + $argList[] = 'Foo.png'; } - foreach ( parent::constructorProvider() as $argList ) { - $argList[] = 'Foo.png'; - $argLists[] = $argList; + return $argLists; + } + + public function invalidConstructorProvider() { + $argLists = parent::validConstructorProvider(); + + foreach ( $argLists as &$argList ) { + $argList[] = null; } return $argLists; diff --git a/tests/phpunit/elements/LineTest.php b/tests/phpunit/elements/LineTest.php index 59482029e..1bce64af3 100644 --- a/tests/phpunit/elements/LineTest.php +++ b/tests/phpunit/elements/LineTest.php @@ -26,26 +26,13 @@ public function getClass() { return 'Maps\Elements\Line'; } - /** - * @see BaseElementTest::constructorProvider - * - * @since 3.0 - * - * @return array - */ - public function constructorProvider() { + public function validConstructorProvider() { $argLists = array(); - $argLists[] = array( false ); - $argLists[] = array( false, '' ); - $argLists[] = array( false, '4,2' ); - $argLists[] = array( false, new LatLongValue( 4, 2 ) ); - - $argLists[] = array( true, array() ); - $argLists[] = array( true, array( new LatLongValue( 4, 2 ) ) ); + $argLists[] = array( array() ); + $argLists[] = array( array( new LatLongValue( 4, 2 ) ) ); $argLists[] = array( - true, array( new LatLongValue( 4, 2 ), new LatLongValue( 2, 4 ), @@ -53,9 +40,15 @@ public function constructorProvider() { ) ); - $argLists[] = array( false, array( '~=[,,_,,]:3' ) ); - $argLists[] = array( false, array( new LatLongValue( 4, 2 ), '~=[,,_,,]:3' ) ); - $argLists[] = array( false, array( '~=[,,_,,]:3', new LatLongValue( 4, 2 ) ) ); + return $argLists; + } + + public function invalidConstructorProvider() { + $argLists = array(); + + $argLists[] = array( array( '~=[,,_,,]:3' ) ); + $argLists[] = array( array( new LatLongValue( 4, 2 ), '~=[,,_,,]:3' ) ); + $argLists[] = array( array( '~=[,,_,,]:3', new LatLongValue( 4, 2 ) ) ); return $argLists; } diff --git a/tests/phpunit/elements/LocationTest.php b/tests/phpunit/elements/LocationTest.php index 8bbf0ac75..6fd0db25e 100644 --- a/tests/phpunit/elements/LocationTest.php +++ b/tests/phpunit/elements/LocationTest.php @@ -13,55 +13,25 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ -class LocationTest extends BaseElementTest { +class LocationTest extends \PHPUnit_Framework_TestCase { - /** - * @see BaseElementTest::getClass - * - * @since 3.0 - * - * @return string - */ - public function getClass() { - return 'Maps\Elements\Location'; - } - - /** - * @see BaseElementTest::constructorProvider - * - * @since 3.0 - * - * @return array - */ - public function constructorProvider() { + public function latLongValueProvider() { $argLists = array(); - $argLists[] = array( false ); - $argLists[] = array( false, '' ); - $argLists[] = array( false, '4,2' ); - $argLists[] = array( false, array() ); - $argLists[] = array( false, array( new LatLongValue( 4, 2 ) ) ); - - $argLists[] = array( true, new LatLongValue( 4, 2 ) ); - $argLists[] = array( true, new LatLongValue( 42, 42 ) ); - $argLists[] = array( true, new LatLongValue( -4.2, -42 ) ); + $argLists[] = array( new LatLongValue( 0, 0 ) ); + $argLists[] = array( new LatLongValue( 4, 2 ) ); + $argLists[] = array( new LatLongValue( 42, 42 ) ); + $argLists[] = array( new LatLongValue( -4.2, -42 ) ); return $argLists; } /** - * @dataProvider instanceProvider - * @param Location $location - * @param array $arguments + * @dataProvider latLongValueProvider */ - public function testGetLineCoordinates( Location $location, array $arguments ) { - $coordinates = $location->getCoordinates(); - - $this->assertInstanceOf( 'DataValues\LatLongValue', $coordinates ); - $this->assertTrue( $coordinates->equals( $arguments[0] ) ); + public function testGivenLatLongInConstructor_getCoordinatesReturnsIt( LatLongValue $latLong ) { + $location = new Location( $latLong ); + $this->assertTrue( $latLong->equals( $location->getCoordinates() ) ); } } - - - diff --git a/tests/phpunit/elements/RectangleTest.php b/tests/phpunit/elements/RectangleTest.php index 420f4c1e2..09d08e8dc 100644 --- a/tests/phpunit/elements/RectangleTest.php +++ b/tests/phpunit/elements/RectangleTest.php @@ -26,27 +26,19 @@ public function getClass() { return 'Maps\Elements\Rectangle'; } - /** - * @see BaseElementTest::constructorProvider - * - * @since 3.0 - * - * @return array - */ - public function constructorProvider() { + public function validConstructorProvider() { + $argLists = array(); + + $argLists[] = array( new LatLongValue( 4, 2 ), new LatLongValue( -4, -2 ) ); + $argLists[] = array( new LatLongValue( -42, -42 ), new LatLongValue( -4, -2 ) ); + + return $argLists; + } + + public function invalidConstructorProvider() { $argLists = array(); - $argLists[] = array( false ); - $argLists[] = array( false, '' ); - $argLists[] = array( false, '4,2' ); - $argLists[] = array( false, new LatLongValue( 4, 2 ) ); - $argLists[] = array( false, array() ); - $argLists[] = array( false, array( new LatLongValue( 4, 2 ) ) ); - $argLists[] = array( false, new LatLongValue( 4, 2 ), 'foobar' ); - $argLists[] = array( false, 'foobar', new LatLongValue( 4, 2 ) ); - - $argLists[] = array( true, new LatLongValue( 4, 2 ), new LatLongValue( 4, 2 ) ); - $argLists[] = array( true, new LatLongValue( 4, 2 ), new LatLongValue( -4, -2 ) ); + $argLists[] = array( new LatLongValue( 4, 2 ), new LatLongValue( 4, 2 ) ); return $argLists; } From 5ea19ef30d9edf2973beef46a17f47ee38e1acbb Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sun, 5 Jan 2014 01:22:14 +0100 Subject: [PATCH 149/163] Add assertion to Circle constructor --- src/Maps/Elements/Circle.php | 4 ++++ tests/phpunit/elements/CircleTest.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Maps/Elements/Circle.php b/src/Maps/Elements/Circle.php index a011d9221..a4a31b9f7 100644 --- a/src/Maps/Elements/Circle.php +++ b/src/Maps/Elements/Circle.php @@ -36,6 +36,10 @@ public function __construct( LatLongValue $circleCentre, $circleRadius ) { throw new InvalidArgumentException( '$circleRadius must be a float or int' ); } + if ( $circleRadius <= 0 ) { + throw new InvalidArgumentException( '$circleRadius must be greater than zero' ); + } + parent::__construct(); $this->setCircleCentre( $circleCentre ); diff --git a/tests/phpunit/elements/CircleTest.php b/tests/phpunit/elements/CircleTest.php index ab1b43229..32a2c6d0b 100644 --- a/tests/phpunit/elements/CircleTest.php +++ b/tests/phpunit/elements/CircleTest.php @@ -42,8 +42,8 @@ public function invalidConstructorProvider() { $argLists[] = array( new LatLongValue( 4, 2 ), 'foo' ); -// $argLists[] = array( new LatLongValue( 4, 2 ), 0 ); -// $argLists[] = array( new LatLongValue( 4, 2 ), -42 ); + $argLists[] = array( new LatLongValue( 4, 2 ), 0 ); + $argLists[] = array( new LatLongValue( 4, 2 ), -42 ); return $argLists; } From 7aaed7d5b5e87a531dde2c6c3d64c21122727d6a Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sun, 5 Jan 2014 01:30:43 +0100 Subject: [PATCH 150/163] Add CircleParser stub --- includes/parsers/CircleParser.php | 43 +++++++++++++++++++ tests/phpunit/parsers/CircleParserTest.php | 21 +++++++++ tests/phpunit/parsers/DistanceParserTest.php | 5 --- tests/phpunit/parsers/LineParserTest.php | 5 --- tests/phpunit/parsers/LocationParserTest.php | 5 --- .../phpunit/parsers/WmsOverlayParserTest.php | 5 --- 6 files changed, 64 insertions(+), 20 deletions(-) create mode 100644 includes/parsers/CircleParser.php create mode 100644 tests/phpunit/parsers/CircleParserTest.php diff --git a/includes/parsers/CircleParser.php b/includes/parsers/CircleParser.php new file mode 100644 index 000000000..3a9293cd6 --- /dev/null +++ b/includes/parsers/CircleParser.php @@ -0,0 +1,43 @@ + + */ +class CircleParser extends StringValueParser { + + // TODO: use options + protected $metaDataSeparator = '~'; + + protected $supportGeocoding = true; + + /** + * @see StringValueParser::stringParse + * + * @since 3.0 + * + * @param string $value + * + * @return Circle + */ + public function stringParse( $value ) { +// $parts = explode( $this->metaDataSeparator , $value ); +// +// $line = $this->constructShapeFromLatLongValues( $this->parseCoordinates( +// explode( ':' , array_shift( $parts ) ) +// ) ); +// +// $this->handleCommonParams( $parts, $line ); +// +// return $line; + } + +} diff --git a/tests/phpunit/parsers/CircleParserTest.php b/tests/phpunit/parsers/CircleParserTest.php new file mode 100644 index 000000000..5db7f9a0e --- /dev/null +++ b/tests/phpunit/parsers/CircleParserTest.php @@ -0,0 +1,21 @@ + + */ +class CircleParserTest extends \PHPUnit_Framework_TestCase { + + public function testCanConstruct() { + new CircleParser(); + $this->assertTrue( true ); + } + + + +} \ No newline at end of file diff --git a/tests/phpunit/parsers/DistanceParserTest.php b/tests/phpunit/parsers/DistanceParserTest.php index c6b11922c..8fcbdc581 100644 --- a/tests/phpunit/parsers/DistanceParserTest.php +++ b/tests/phpunit/parsers/DistanceParserTest.php @@ -4,11 +4,6 @@ /** * @covers Maps\DistanceParser - * - * @group ValueParsers - * @group Maps - * @group DistanceParserTest - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/tests/phpunit/parsers/LineParserTest.php b/tests/phpunit/parsers/LineParserTest.php index ffe3e171a..846d4daf6 100644 --- a/tests/phpunit/parsers/LineParserTest.php +++ b/tests/phpunit/parsers/LineParserTest.php @@ -7,11 +7,6 @@ /** * @covers Maps\LineParser - * - * @group ValueParsers - * @group Maps - * @group LineParserTest - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/tests/phpunit/parsers/LocationParserTest.php b/tests/phpunit/parsers/LocationParserTest.php index 40fd7da8a..569a05179 100644 --- a/tests/phpunit/parsers/LocationParserTest.php +++ b/tests/phpunit/parsers/LocationParserTest.php @@ -7,11 +7,6 @@ /** * @covers Maps\LocationParser - * - * @group ValueParsers - * @group Maps - * @group LocationParserTest - * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ diff --git a/tests/phpunit/parsers/WmsOverlayParserTest.php b/tests/phpunit/parsers/WmsOverlayParserTest.php index 3fdb45e3e..1b141af7b 100644 --- a/tests/phpunit/parsers/WmsOverlayParserTest.php +++ b/tests/phpunit/parsers/WmsOverlayParserTest.php @@ -6,11 +6,6 @@ /** * @covers Maps\WmsOverlayParser - * - * @group ValueParsers - * @group Maps - * @group WmsOverlayParserTest - * * @licence GNU GPL v2+ * @author Mathias Mølster Lidal */ From e8b71715f84666fd68d4580761c70dcf85b8ba51 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sun, 5 Jan 2014 01:53:28 +0100 Subject: [PATCH 151/163] Re-implemented Circle shape support --- Maps.php | 8 ++++ includes/parserhooks/Maps_DisplayMap.php | 12 +++--- includes/parsers/CircleParser.php | 46 ++++++++++++++++------ includes/parsers/LineParser.php | 14 ++++--- includes/parsers/LocationParser.php | 8 ++-- tests/phpunit/parsers/CircleParserTest.php | 25 +++++++++++- 6 files changed, 85 insertions(+), 28 deletions(-) diff --git a/Maps.php b/Maps.php index 563c2d318..351e3c54d 100644 --- a/Maps.php +++ b/Maps.php @@ -191,6 +191,14 @@ 'string-parser' => 'Maps\LineParser', ); + $wgParamDefinitions['mapscircle'] = array( + 'string-parser' => 'Maps\CircleParser', + ); + +// $wgParamDefinitions['mapsrectangle'] = array( +// 'string-parser' => 'Maps\RectangleParser', +// ); + $wgParamDefinitions['mapspolygon'] = array( 'string-parser' => 'Maps\PolygonParser', ); diff --git a/includes/parserhooks/Maps_DisplayMap.php b/includes/parserhooks/Maps_DisplayMap.php index f9d8fe4e9..6ff874789 100644 --- a/includes/parserhooks/Maps_DisplayMap.php +++ b/includes/parserhooks/Maps_DisplayMap.php @@ -102,12 +102,12 @@ public static function getCommonMapParams() { 'islist' => true, ); -// $params['circles'] = array( -// 'default' => array(), -// // TODO 'manipulations' => new MapsParamCircle( '~' ), // TODO -// 'delimiter' => ';', -// 'islist' => true, -// ); + $params['circles'] = array( + 'type' => 'mapscircle', + 'default' => array(), + 'delimiter' => ';', + 'islist' => true, + ); // // $params['rectangles'] = array( // 'default' => array(), diff --git a/includes/parsers/CircleParser.php b/includes/parsers/CircleParser.php index 3a9293cd6..2abf595d6 100644 --- a/includes/parsers/CircleParser.php +++ b/includes/parsers/CircleParser.php @@ -2,7 +2,10 @@ namespace Maps; +use DataValues\LatLongValue; use Maps\Elements\Circle; +use ValueParsers\GeoCoordinateParser; +use ValueParsers\ParseException; use ValueParsers\StringValueParser; /** @@ -14,11 +17,11 @@ */ class CircleParser extends StringValueParser { + protected $supportGeocoding = true; + // TODO: use options protected $metaDataSeparator = '~'; - protected $supportGeocoding = true; - /** * @see StringValueParser::stringParse * @@ -29,15 +32,36 @@ class CircleParser extends StringValueParser { * @return Circle */ public function stringParse( $value ) { -// $parts = explode( $this->metaDataSeparator , $value ); -// -// $line = $this->constructShapeFromLatLongValues( $this->parseCoordinates( -// explode( ':' , array_shift( $parts ) ) -// ) ); -// -// $this->handleCommonParams( $parts, $line ); -// -// return $line; + $metaData = explode( $this->metaDataSeparator , $value ); + $circleData = explode( ':' , array_shift( $metaData ) ); + + $circle = new Circle( $this->stringToLatLongValue( $circleData[0] ), (float)$circleData[1] ); + + if ( $metaData !== array() ) { + $circle->setTitle( array_shift( $metaData ) ); + } + + if ( $metaData !== array() ) { + $circle->setText( array_shift( $metaData ) ); + } + + return $circle; + } + + protected function stringToLatLongValue( $location ) { + if ( $this->supportGeocoding && Geocoders::canGeocode() ) { + $location = Geocoders::attemptToGeocode( $location ); + + if ( $location === false ) { + throw new ParseException( 'Failed to parse or geocode' ); + } + + assert( $location instanceof LatLongValue ); + return $location; + } + + $parser = new GeoCoordinateParser( new \ValueParsers\ParserOptions() ); + return $parser->parse( $location ); } } diff --git a/includes/parsers/LineParser.php b/includes/parsers/LineParser.php index 2cdb21003..e46362516 100644 --- a/includes/parsers/LineParser.php +++ b/includes/parsers/LineParser.php @@ -17,11 +17,11 @@ */ class LineParser extends StringValueParser { + protected $supportGeocoding = true; + // TODO: use options protected $metaDataSeparator = '~'; - protected $supportGeocoding = true; - /** * @see StringValueParser::stringParse * @@ -43,10 +43,6 @@ public function stringParse( $value ) { return $line; } - protected function constructShapeFromLatLongValues( array $locations ) { - return new Line( $locations ); - } - /** * @since 3.0 * @@ -79,6 +75,10 @@ protected function parseCoordinates( array $coordinateStrings ) { return $coordinates; } + protected function constructShapeFromLatLongValues( array $locations ) { + return new Line( $locations ); + } + /** * This method requires that parameters are positionally correct, * 1. Link (one parameter) or bubble data (two parameters) @@ -118,6 +118,8 @@ protected function handleCommonParams( array &$params, Line &$line ) { } } + + protected function setBubbleDataFromParameter( Line &$line , &$params , $title ) { if ( $title ) { $line->setTitle( $title ); diff --git a/includes/parsers/LocationParser.php b/includes/parsers/LocationParser.php index 0217d5bef..b5a10beef 100644 --- a/includes/parsers/LocationParser.php +++ b/includes/parsers/LocationParser.php @@ -37,7 +37,7 @@ public function stringParse( $value ) { $metaData = explode( $separator, $value ); - $coordinates = $this->getCoordinates( array_shift( $metaData ) ); + $coordinates = $this->stringToLatLongValue( array_shift( $metaData ) ); $location = new Location( $coordinates ); @@ -72,9 +72,9 @@ public function stringParse( $value ) { * @return LatLongValue * @throws ParseException */ - protected function getCoordinates( $location ) { - if ( $this->supportGeocoding && \Maps\Geocoders::canGeocode() ) { - $location = \Maps\Geocoders::attemptToGeocode( $location ); + protected function stringToLatLongValue( $location ) { + if ( $this->supportGeocoding && Geocoders::canGeocode() ) { + $location = Geocoders::attemptToGeocode( $location ); if ( $location === false ) { throw new ParseException( 'Failed to parse or geocode' ); diff --git a/tests/phpunit/parsers/CircleParserTest.php b/tests/phpunit/parsers/CircleParserTest.php index 5db7f9a0e..206ea3fd5 100644 --- a/tests/phpunit/parsers/CircleParserTest.php +++ b/tests/phpunit/parsers/CircleParserTest.php @@ -2,6 +2,7 @@ namespace Maps\Test; +use DataValues\LatLongValue; use Maps\CircleParser; /** @@ -16,6 +17,28 @@ public function testCanConstruct() { $this->assertTrue( true ); } + public function testGivenCoordinateAndRadius_parserReturnsCircle() { + $parser = new CircleParser(); + $circle = $parser->parse( '57.421,23.90625:32684.605182' ); -} \ No newline at end of file + $this->assertInstanceOf( 'Maps\Elements\Circle', $circle ); + + $expectedLatLong = new LatLongValue( 57.421, 23.90625 ); + $this->assertTrue( $expectedLatLong->equals( $circle->getCircleCentre() ) ); + + $this->assertEquals( 32684.605182, $circle->getCircleRadius() ); + } + + public function testGivenTitleAndText_circleHasProvidedMetaData() { + $parser = new CircleParser(); + + $circle = $parser->parse( '57.421,23.90625:32684.605182~title~text' ); + + $this->assertInstanceOf( 'Maps\Elements\Circle', $circle ); + + $this->assertEquals( 'title', $circle->getTitle() ); + $this->assertEquals( 'text', $circle->getText() ); + } + +} From 72f927a02e60b8faa75d95b3f31c974337ca4c76 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sun, 5 Jan 2014 02:07:36 +0100 Subject: [PATCH 152/163] Re-implemented Rectangle shape support --- Maps.php | 6 +- includes/parserhooks/Maps_DisplayMap.php | 14 ++-- includes/parsers/CircleParser.php | 12 +++ includes/parsers/RectangleParser.php | 82 +++++++++++++++++++ .../phpunit/parsers/RectlangleParserTest.php | 45 ++++++++++ 5 files changed, 149 insertions(+), 10 deletions(-) create mode 100644 includes/parsers/RectangleParser.php create mode 100644 tests/phpunit/parsers/RectlangleParserTest.php diff --git a/Maps.php b/Maps.php index 351e3c54d..857c92a19 100644 --- a/Maps.php +++ b/Maps.php @@ -195,9 +195,9 @@ 'string-parser' => 'Maps\CircleParser', ); -// $wgParamDefinitions['mapsrectangle'] = array( -// 'string-parser' => 'Maps\RectangleParser', -// ); + $wgParamDefinitions['mapsrectangle'] = array( + 'string-parser' => 'Maps\RectangleParser', + ); $wgParamDefinitions['mapspolygon'] = array( 'string-parser' => 'Maps\PolygonParser', diff --git a/includes/parserhooks/Maps_DisplayMap.php b/includes/parserhooks/Maps_DisplayMap.php index 6ff874789..e99c4cc8b 100644 --- a/includes/parserhooks/Maps_DisplayMap.php +++ b/includes/parserhooks/Maps_DisplayMap.php @@ -108,13 +108,13 @@ public static function getCommonMapParams() { 'delimiter' => ';', 'islist' => true, ); -// -// $params['rectangles'] = array( -// 'default' => array(), -// // TODO 'manipulations' => new MapsParamRectangle( '~' ), // TODO -// 'delimiter' => ';', -// 'islist' => true, -// ); + + $params['rectangles'] = array( + 'type' => 'mapsrectangle', + 'default' => array(), + 'delimiter' => ';', + 'islist' => true, + ); $params['wmsoverlay'] = array( 'type' => 'wmsoverlay', diff --git a/includes/parsers/CircleParser.php b/includes/parsers/CircleParser.php index 2abf595d6..6af0ac4bc 100644 --- a/includes/parsers/CircleParser.php +++ b/includes/parsers/CircleParser.php @@ -45,6 +45,18 @@ public function stringParse( $value ) { $circle->setText( array_shift( $metaData ) ); } + if ( $metaData !== array() ) { + $circle->setStrokeColor( array_shift( $metaData ) ); + } + + if ( $metaData !== array() ) { + $circle->setStrokeOpacity( array_shift( $metaData ) ); + } + + if ( $metaData !== array() ) { + $circle->setStrokeWeight( array_shift( $metaData ) ); + } + return $circle; } diff --git a/includes/parsers/RectangleParser.php b/includes/parsers/RectangleParser.php new file mode 100644 index 000000000..e7672ecb5 --- /dev/null +++ b/includes/parsers/RectangleParser.php @@ -0,0 +1,82 @@ + + */ +class RectangleParser extends StringValueParser { + + protected $supportGeocoding = true; + + // TODO: use options + protected $metaDataSeparator = '~'; + + /** + * @see StringValueParser::stringParse + * + * @since 3.0 + * + * @param string $value + * + * @return Rectangle + */ + public function stringParse( $value ) { + $metaData = explode( $this->metaDataSeparator , $value ); + $rectangleData = explode( ':' , array_shift( $metaData ) ); + + $rectangle = new Rectangle( + $this->stringToLatLongValue( $rectangleData[0] ), + $this->stringToLatLongValue( $rectangleData[1] ) + ); + + if ( $metaData !== array() ) { + $rectangle->setTitle( array_shift( $metaData ) ); + } + + if ( $metaData !== array() ) { + $rectangle->setText( array_shift( $metaData ) ); + } + + if ( $metaData !== array() ) { + $rectangle->setStrokeColor( array_shift( $metaData ) ); + } + + if ( $metaData !== array() ) { + $rectangle->setStrokeOpacity( array_shift( $metaData ) ); + } + + if ( $metaData !== array() ) { + $rectangle->setStrokeWeight( array_shift( $metaData ) ); + } + + return $rectangle; + } + + protected function stringToLatLongValue( $location ) { + if ( $this->supportGeocoding && Geocoders::canGeocode() ) { + $location = Geocoders::attemptToGeocode( $location ); + + if ( $location === false ) { + throw new ParseException( 'Failed to parse or geocode' ); + } + + assert( $location instanceof LatLongValue ); + return $location; + } + + $parser = new GeoCoordinateParser( new \ValueParsers\ParserOptions() ); + return $parser->parse( $location ); + } + +} diff --git a/tests/phpunit/parsers/RectlangleParserTest.php b/tests/phpunit/parsers/RectlangleParserTest.php new file mode 100644 index 000000000..6a2788e2f --- /dev/null +++ b/tests/phpunit/parsers/RectlangleParserTest.php @@ -0,0 +1,45 @@ + + */ +class RectangleParserTest extends \PHPUnit_Framework_TestCase { + + public function testCanConstruct() { + new RectangleParser(); + $this->assertTrue( true ); + } + + public function testGivenBoundingBox_parserReturnsRectangle() { + $parser = new RectangleParser(); + + $rectangle = $parser->parse( '51.8357775,33.83789:46,23.37890625' ); + + $this->assertInstanceOf( 'Maps\Elements\Rectangle', $rectangle ); + + $expectedNorthEast = new LatLongValue( 51.8357775, 33.83789 ); + $this->assertTrue( $expectedNorthEast->equals( $rectangle->getRectangleNorthEast() ) ); + + $expectedSouthWest = new LatLongValue( 46, 23.37890625 ); + $this->assertTrue( $expectedSouthWest->equals( $rectangle->getRectangleSouthWest() ) ); + } + + public function testGivenTitleAndText_rectangleHasProvidedMetaData() { + $parser = new RectangleParser(); + + $rectangle = $parser->parse( "51.8357775,33.83789:46,23.37890625~I'm a square~of doom" ); + + $this->assertInstanceOf( 'Maps\Elements\Rectangle', $rectangle ); + + $this->assertEquals( "I'm a square", $rectangle->getTitle() ); + $this->assertEquals( 'of doom', $rectangle->getText() ); + } + +} From 1a4fe453cee540ea8931c1ed5ed265dd8e52153e Mon Sep 17 00:00:00 2001 From: Kim Eik Date: Mon, 16 Dec 2013 12:58:51 +0100 Subject: [PATCH 153/163] Added automatic rezoom when searching for markers. Whenever a search query is entered the map will rezoom so that all visible markers is displayed in the viewport. Change-Id: I446f9c473fa6226a2fd3dd3e05c4f9289fb48c05 --- .../services/GoogleMaps3/jquery.googlemap.js | 40 +++++++++++++------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/includes/services/GoogleMaps3/jquery.googlemap.js b/includes/services/GoogleMaps3/jquery.googlemap.js index e02b3efdf..909ad4c16 100644 --- a/includes/services/GoogleMaps3/jquery.googlemap.js +++ b/includes/services/GoogleMaps3/jquery.googlemap.js @@ -434,6 +434,18 @@ this.polygon = []; }; + //Rezoom's the map to show all visible markers. + this.reZoom = function(){ + var bounds = new google.maps.LatLngBounds(); + for(var x = 0; x < this.markers.length; x++){ + var marker = this.markers[x]; + if (marker.getVisible() === true) { + bounds.extend(marker.getPosition()); + } + } + this.map.fitBounds(bounds); + } + this.setup = function () { var showEarth = $.inArray('earth', options.types) !== -1; @@ -681,6 +693,8 @@ ); } + + if (options.searchmarkers) { var searchBoxValue = mediaWiki.msg('maps-searchmarkers-text'); var searchBox = $(''); @@ -698,25 +712,27 @@ searchBox.on('keyup',function (e) { for (var i = 0; i < _this.markers.length; i++) { - var haystack = ''; - var marker = _this.markers[i]; - if (options.searchmarkers == 'title') { - haystack = marker.title; - } else if (options.searchmarkers == 'all') { - haystack = marker.title + marker.text; - } - - marker.setVisible(haystack.toLowerCase().indexOf(e.target.value.toLowerCase()) != -1); + var haystack = ''; + var marker = _this.markers[i]; + if (options.searchmarkers == 'title') { + haystack = marker.title; + } else if (options.searchmarkers == 'all') { + haystack = marker.title + marker.text; } - }).on('focusin', function () { + + var visible = haystack.toLowerCase().indexOf(e.target.value.toLowerCase()) != -1; + marker.setVisible(visible); + } + _this.reZoom(); + }).on('focusin',function () { if ($(this).val() === searchBoxValue) { $(this).val(''); } - }).on('focusout', function () { + }).on('focusout', function () { if ($(this).val() === '') { $(this).val(searchBoxValue); } - }); + }); } if(options.imageoverlays){ From 15c40c1d9165a01d859770475cf1b64adba1a3f8 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Sun, 5 Jan 2014 02:43:51 +0100 Subject: [PATCH 154/163] Update INSTALL.md --- docs/INSTALL.md | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 71f42723a..5ba6dceb0 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -9,36 +9,53 @@ These are the installation and configuration instructions for the [Maps extensio Status Release date - PHP - MediaWiki Git branch Maps 3.0.x Development version Future - 5.3.2+ - 1.18+ master Maps 2.0.x Stable release 2012 - 5.3.2+ - 1.18+ 2.0.x Maps 1.0.5 Legacy release 2011-11-30 - 5.2+ - 1.17+ 1.0.5 +### Platform compatibility + + + + + + + + + + + + + + + + + + + + + + +
PHPMediaWiki
Maps 3.0.x5.3.2 - 5.5.x1.18 - 1.23
Maps 2.0.x5.3.2 - 5.5.x1.18 - 1.23
Maps 1.0.55.2.0 - 5.3.x1.17 - 1.19
+ When installing Maps 2.x, see the installation instructions that come bundled with it. Also make use of Validator 0.5.x. More recent versions of Validator will not work. From 59083a6490755dcc4060cb31dcff440ba2dd467e Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Sun, 5 Jan 2014 02:46:58 +0100 Subject: [PATCH 155/163] Update INSTALL.md --- docs/INSTALL.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 5ba6dceb0..a58e2dc6c 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -38,27 +38,39 @@ These are the installation and configuration instructions for the [Maps extensio PHP MediaWiki + Composer + Validator - Maps 3.0.x + Maps 3.0.x 5.3.2 - 5.5.x 1.18 - 1.23 + Required + 1.0.x (handled by Composer) - Maps 2.0.x + Maps 2.0.x 5.3.2 - 5.5.x 1.18 - 1.23 + Not supported + 0.5.1 - Maps 1.0.5 + Maps 1.0.5 5.2.0 - 5.3.x 1.17 - 1.19 + Not supported + 0.4.13 or 0.4.14 When installing Maps 2.x, see the installation instructions that come bundled with it. Also make use of Validator 0.5.x. More recent versions of Validator will not work. +### Database support + +All current versions of Maps have full support for all databases that can be used with MediaWiki. + ## Download and installation The recommended way to download and install Maps is with [Composer](http://getcomposer.org) using From f84caecc164fe33801f7bbea0ab3595f445112fd Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Sun, 5 Jan 2014 02:47:38 +0100 Subject: [PATCH 156/163] Update INSTALL.md --- docs/INSTALL.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index a58e2dc6c..37ab96c33 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -110,7 +110,6 @@ Now using Composer, install Maps As final step, you can verify Maps got installed by looking at the Special:Version page on your wiki and verifying the Maps extension is listed. -``` ## Configuration From 882b00c7d487e29b2a6c337b3d3811fcfdd85947 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Sun, 5 Jan 2014 03:19:35 +0100 Subject: [PATCH 157/163] Update INSTALL.md --- docs/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 37ab96c33..52fd114f5 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -104,7 +104,7 @@ To install Composer: Now using Composer, install Maps - php composer.phar require mediawiki/maps * + php composer.phar require mediawiki/maps "*" #### Verify installation success From 4bfa3e974e2e1af9974b85f44497f6431215dd5a Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 7 Jan 2014 15:24:56 +0100 Subject: [PATCH 158/163] Re-implement polygon only visible on hover --- includes/parsers/LineParser.php | 2 -- includes/parsers/PolygonParser.php | 21 +++++++++++++++++++-- src/Maps/Elements/Polygon.php | 8 ++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/includes/parsers/LineParser.php b/includes/parsers/LineParser.php index e46362516..cdae58240 100644 --- a/includes/parsers/LineParser.php +++ b/includes/parsers/LineParser.php @@ -118,8 +118,6 @@ protected function handleCommonParams( array &$params, Line &$line ) { } } - - protected function setBubbleDataFromParameter( Line &$line , &$params , $title ) { if ( $title ) { $line->setTitle( $title ); diff --git a/includes/parsers/PolygonParser.php b/includes/parsers/PolygonParser.php index 45b48493e..b4dd4e191 100644 --- a/includes/parsers/PolygonParser.php +++ b/includes/parsers/PolygonParser.php @@ -2,8 +2,8 @@ namespace Maps; +use Maps\Elements\Line; use Maps\Elements\Polygon; -use ValueParsers\StringValueParser; /** * ValueParser that parses the string representation of a polygon. @@ -19,6 +19,23 @@ protected function constructShapeFromLatLongValues( array $locations ) { return new Polygon( $locations ); } - // TODO: handle only visible on hover + protected function handleCommonParams( array &$params, Line &$line ) { + parent::handleCommonParams( $params, $line ); + $this->handlePolygonParams( $params, $line ); + } + + protected function handlePolygonParams( array &$params, Polygon &$polygon ) { + if ( $fillColor = array_shift( $params ) ) { + // TODO + } + + if ( $fillOpacity = array_shift( $params ) ) { + // TODO + } + + if ( $showOnlyOnHover = array_shift( $params ) ) { + $polygon->setOnlyVisibleOnHover( strtolower( trim( $showOnlyOnHover ) ) === 'on' ); + } + } } diff --git a/src/Maps/Elements/Polygon.php b/src/Maps/Elements/Polygon.php index 7a6ecf87b..0f7b7b0f7 100644 --- a/src/Maps/Elements/Polygon.php +++ b/src/Maps/Elements/Polygon.php @@ -45,4 +45,12 @@ public function isOnlyVisibleOnHover() { return $this->onlyVisibleOnHover; } + public function getJSONObject( $defText = '' , $defTitle = '' ) { + $json = parent::getJSONObject( $defText, $defTitle ); + + $json['onlyVisibleOnHover'] = $this->isOnlyVisibleOnHover(); + + return $json; + } + } From 215baf12d2363cf86cb442a07d0a0cb6a5a66951 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 7 Jan 2014 16:01:05 +0100 Subject: [PATCH 159/163] Re-implement fill color and opacity for polygons --- includes/parsers/PolygonParser.php | 4 +-- src/Maps/Elements/Polygon.php | 34 ++++++++++++++++++-------- tests/phpunit/elements/PolygonTest.php | 30 +++++++++++++++++++++++ 3 files changed, 56 insertions(+), 12 deletions(-) diff --git a/includes/parsers/PolygonParser.php b/includes/parsers/PolygonParser.php index b4dd4e191..62e2750eb 100644 --- a/includes/parsers/PolygonParser.php +++ b/includes/parsers/PolygonParser.php @@ -26,11 +26,11 @@ protected function handleCommonParams( array &$params, Line &$line ) { protected function handlePolygonParams( array &$params, Polygon &$polygon ) { if ( $fillColor = array_shift( $params ) ) { - // TODO + $polygon->setFillColor( $fillColor ); } if ( $fillOpacity = array_shift( $params ) ) { - // TODO + $polygon->setFillOpacity( $fillOpacity ); } if ( $showOnlyOnHover = array_shift( $params ) ) { diff --git a/src/Maps/Elements/Polygon.php b/src/Maps/Elements/Polygon.php index 0f7b7b0f7..df2ee1d38 100644 --- a/src/Maps/Elements/Polygon.php +++ b/src/Maps/Elements/Polygon.php @@ -2,35 +2,31 @@ namespace Maps\Elements; -use MWException; +use InvalidArgumentException; /** * @since 3.0 * - * * @licence GNU GPL v2+ * @author Kim Eik < kim@heldig.org > * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ class Polygon extends Line implements \iHoverableMapElement { - /** - * @since 3.0 - * - * @var boolean - */ protected $onlyVisibleOnHover = false; + protected $fillOpacity = '0.5'; + protected $fillColor = '#FF0000'; /** * @since 3.0 * * @param boolean $visible * - * @throws MWException + * @throws InvalidArgumentException */ public function setOnlyVisibleOnHover( $visible ) { if ( !is_bool( $visible ) ) { - throw new MWException( '$visible should be a boolean' ); + throw new InvalidArgumentException( '$visible should be a boolean' ); } $this->onlyVisibleOnHover = $visible; @@ -45,10 +41,28 @@ public function isOnlyVisibleOnHover() { return $this->onlyVisibleOnHover; } + public function setFillOpacity( $fillOpacity ) { + if ( !is_string( $fillOpacity ) ) { + throw new InvalidArgumentException( '$fillOpacity should be a string' ); + } + + $this->fillOpacity = $fillOpacity; + } + + public function setFillColor( $fillColor ) { + if ( !is_string( $fillColor ) ) { + throw new InvalidArgumentException( '$fillColor should be a string' ); + } + + $this->fillColor = $fillColor; + } + public function getJSONObject( $defText = '' , $defTitle = '' ) { $json = parent::getJSONObject( $defText, $defTitle ); - $json['onlyVisibleOnHover'] = $this->isOnlyVisibleOnHover(); + $json['onlyVisibleOnHover'] = $this->onlyVisibleOnHover; + $json['fillColor'] = $this->fillColor; + $json['fillOpacity'] = $this->fillOpacity; return $json; } diff --git a/tests/phpunit/elements/PolygonTest.php b/tests/phpunit/elements/PolygonTest.php index 690e7ce61..ab7364d13 100644 --- a/tests/phpunit/elements/PolygonTest.php +++ b/tests/phpunit/elements/PolygonTest.php @@ -40,6 +40,36 @@ public function testSetOnlyVisibleOnHover( Polygon $polygon, array $arguments ) $this->assertFalse( $polygon->isOnlyVisibleOnHover() ); } + /** + * @dataProvider instanceProvider + * @param Polygon $polygon + * @param array $arguments + */ + public function testSetFillOpacity( Polygon $polygon, array $arguments ) { + $polygon->setFillOpacity( '0.42' ); + $this->assertHasJsonKeyWithValue( $polygon, 'fillOpacity', '0.42' ); + } + + protected function assertHasJsonKeyWithValue( Polygon $polygon, $key, $value ) { + $json = $polygon->getJSONObject(); + + $this->assertArrayHasKey( $key, $json ); + $this->assertEquals( + $value, + $json[$key] + ); + } + + /** + * @dataProvider instanceProvider + * @param Polygon $polygon + * @param array $arguments + */ + public function testSetFillColor( Polygon $polygon, array $arguments ) { + $polygon->setFillColor( '#FFCCCC' ); + $this->assertHasJsonKeyWithValue( $polygon, 'fillColor', '#FFCCCC' ); + } + } From 0ffe713b306b7f3c5624454876a9a6f303fc0285 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 7 Jan 2014 16:29:51 +0100 Subject: [PATCH 160/163] Re-implement direct link functionality --- includes/parsers/LocationParser.php | 35 +++++++++- tests/phpunit/parsers/LocationParserTest.php | 73 ++++++++++++++++++++ 2 files changed, 107 insertions(+), 1 deletion(-) diff --git a/includes/parsers/LocationParser.php b/includes/parsers/LocationParser.php index b5a10beef..d4aebd36d 100644 --- a/includes/parsers/LocationParser.php +++ b/includes/parsers/LocationParser.php @@ -5,6 +5,7 @@ use DataValues\LatLongValue; use Maps\Elements\Location; use MWException; +use Title; use ValueParsers\GeoCoordinateParser; use ValueParsers\ParseException; use ValueParsers\StringValueParser; @@ -42,7 +43,7 @@ public function stringParse( $value ) { $location = new Location( $coordinates ); if ( $metaData !== array() ) { - $location->setTitle( array_shift( $metaData ) ); + $this->setTitleOrLink( $location, array_shift( $metaData ) ); } if ( $metaData !== array() ) { @@ -64,6 +65,38 @@ public function stringParse( $value ) { return $location; } + protected function setTitleOrLink( Location $location, $titleOrLink ) { + if ( $this->isLink( $titleOrLink ) ) { + $this->setLink( $location, $titleOrLink ); + } + else { + $location->setTitle( $titleOrLink ); + } + } + + protected function isLink( $value ) { + return strpos( $value , 'link:' ) === 0; + } + + protected function setLink( Location $location, $link ) { + $link = substr( $link, 5 ); + $location->setLink( $this->getExpandedLink( $link ) ); + } + + protected function getExpandedLink( $link ) { + if ( filter_var( $link , FILTER_VALIDATE_URL , FILTER_FLAG_SCHEME_REQUIRED ) ) { + return $link; + } + + $title = Title::newFromText( $link ); + + if ( $title === null ) { + return ''; + } + + return $title->getFullUrl(); + } + /** * @since 3.0 * diff --git a/tests/phpunit/parsers/LocationParserTest.php b/tests/phpunit/parsers/LocationParserTest.php index 569a05179..b78b44666 100644 --- a/tests/phpunit/parsers/LocationParserTest.php +++ b/tests/phpunit/parsers/LocationParserTest.php @@ -4,6 +4,8 @@ use DataValues\LatLongValue; use Maps\Elements\Location; +use Maps\LocationParser; +use Title; /** * @covers Maps\LocationParser @@ -67,4 +69,75 @@ protected function requireDataValue() { return false; } + /** + * @dataProvider titleProvider + */ + public function testGivenTitleThatIsNotLink_titleIsSetAndLinkIsNot( $title ) { + $parser = new LocationParser(); + $location = $parser->parse( '4,2~' . $title ); + + $this->assertTitleAndLinkAre( $location, $title, '' ); + } + + public function titleProvider() { + return array( + array( '' ), + array( 'Title' ), + array( 'Some title' ), + array( 'link' ), + array( 'links:foo' ), + ); + } + + protected function assertTitleAndLinkAre( Location $location, $title, $link ) { + $this->assertHasJsonKeyWithValue( $location, 'title', $title ); + $this->assertHasJsonKeyWithValue( $location, 'link', $link ); + } + + protected function assertHasJsonKeyWithValue( Location $polygon, $key, $value ) { + $json = $polygon->getJSONObject(); + + $this->assertArrayHasKey( $key, $json ); + $this->assertEquals( + $value, + $json[$key] + ); + } + + /** + * @dataProvider linkProvider + */ + public function testGivenTitleThatIsLink_linkIsSetAndTitleIsNot( $link ) { + $parser = new LocationParser(); + $location = $parser->parse( '4,2~link:' . $link ); + + $this->assertTitleAndLinkAre( $location, '', $link ); + } + + public function linkProvider() { + return array( + array( 'https://semantic-mediawiki.org' ), + array( 'http://www.semantic-mediawiki.org' ), + array( 'irc://freenode.net' ), + ); + } + + /** + * @dataProvider titleLinkProvider + */ +// public function testGivenPageTitleAsLink_pageTitleIsTurnedIntoUrl( $link ) { +// $parser = new LocationParser(); +// $location = $parser->parse( '4,2~link:' . $link ); +// +// $linkUrl = Title::newFromText( $link )->getFullURL(); +// $this->assertTitleAndLinkAre( $location, '', $linkUrl ); +// } +// +// public function titleLinkProvider() { +// return array( +// array( 'Foo' ), +// array( 'Some_Page' ), +// ); +// } + } From 966eb9a708413f24cd2a2d2a63da4e7f0de846ba Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 7 Jan 2014 16:32:24 +0100 Subject: [PATCH 161/163] Bump version --- Maps.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maps.php b/Maps.php index 857c92a19..0ae906e0b 100644 --- a/Maps.php +++ b/Maps.php @@ -17,7 +17,7 @@ return 1; } -define( 'Maps_VERSION' , '3.0 beta' ); +define( 'Maps_VERSION' , '3.0-RC1' ); // Include the composer autoloader if it is present. if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) { From f5e8b92d412dde400e86404b3e543bb60d1ed7c6 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 7 Jan 2014 17:24:43 +0100 Subject: [PATCH 162/163] Remove knowledge of extension location from resource paths --- Maps.resources.php | 2 +- includes/services/GoogleMaps3/GoogleMaps3.php | 10 +++++----- includes/services/Leaflet/Leaflet.php | 2 +- includes/services/OpenLayers/OpenLayers.php | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Maps.resources.php b/Maps.resources.php index b5f3bfa0f..7de14de9f 100644 --- a/Maps.resources.php +++ b/Maps.resources.php @@ -14,7 +14,7 @@ $moduleTemplate = array( 'localBasePath' => __DIR__ . '/includes', - 'remoteExtPath' => 'Maps/includes', + 'remoteExtPath' => '..' . substr( __DIR__, strlen( $GLOBALS['IP'] ) ) . '/includes', 'group' => 'ext.maps' ); diff --git a/includes/services/GoogleMaps3/GoogleMaps3.php b/includes/services/GoogleMaps3/GoogleMaps3.php index 1022d1d3b..67b2a398e 100644 --- a/includes/services/GoogleMaps3/GoogleMaps3.php +++ b/includes/services/GoogleMaps3/GoogleMaps3.php @@ -23,7 +23,7 @@ $wgResourceModules['ext.maps.googlemaps3'] = array( 'dependencies' => array( 'ext.maps.common' ), 'localBasePath' => __DIR__, - 'remoteExtPath' => '/Maps/includes/services/GoogleMaps3', + 'remoteExtPath' => '..' . substr( __DIR__, strlen( $GLOBALS['IP'] ) ), 'group' => 'ext.maps', 'scripts' => array( 'jquery.googlemap.js', @@ -40,7 +40,7 @@ $wgResourceModules['ext.maps.gm3.markercluster'] = array( 'localBasePath' => __DIR__ . '/gm3-util-library', - 'remoteExtPath' => '/Maps/includes/services/GoogleMaps3/gm3-util-library', + 'remoteExtPath' => '..' . substr( __DIR__, strlen( $GLOBALS['IP'] ) ) . 'gm3-util-library', 'group' => 'ext.maps', 'scripts' => array( 'markerclusterer.js', @@ -49,7 +49,7 @@ $wgResourceModules['ext.maps.gm3.markerwithlabel'] = array( 'localBasePath' => __DIR__ . '/gm3-util-library', - 'remoteExtPath' => '/Maps/includes/services/GoogleMaps3/gm3-util-library', + 'remoteExtPath' => '..' . substr( __DIR__, strlen( $GLOBALS['IP'] ) ) . 'gm3-util-library', 'group' => 'ext.maps', 'scripts' => array( 'markerwithlabel.js', @@ -61,7 +61,7 @@ $wgResourceModules['ext.maps.gm3.geoxml'] = array( 'localBasePath' => __DIR__ . '/geoxml3', - 'remoteExtPath' => '/Maps/includes/services/GoogleMaps3/geoxml3', + 'remoteExtPath' => '..' . substr( __DIR__, strlen( $GLOBALS['IP'] ) ) . 'geoxml3', 'group' => 'ext.maps', 'scripts' => array( 'geoxml3.js', @@ -72,7 +72,7 @@ $wgResourceModules['ext.maps.gm3.earth'] = array( 'localBasePath' => __DIR__ . '/gm3-util-library', - 'remoteExtPath' => '/Maps/includes/services/GoogleMaps3/gm3-util-library', + 'remoteExtPath' => '..' . substr( __DIR__, strlen( $GLOBALS['IP'] ) ) . 'gm3-util-library', 'group' => 'ext.maps', 'scripts' => array( 'googleearth-compiled.js', diff --git a/includes/services/Leaflet/Leaflet.php b/includes/services/Leaflet/Leaflet.php index 4b3cc89f6..11f1126ab 100644 --- a/includes/services/Leaflet/Leaflet.php +++ b/includes/services/Leaflet/Leaflet.php @@ -27,7 +27,7 @@ $wgResourceModules['ext.maps.leaflet'] = array( 'dependencies' => array( 'ext.maps.common' ), 'localBasePath' => __DIR__, - 'remoteExtPath' => '/Maps/includes/services/Leaflet', + 'remoteExtPath' => '..' . substr( __DIR__, strlen( $GLOBALS['IP'] ) ), 'group' => 'ext.maps', 'scripts' => array( 'jquery.leaflet.js', diff --git a/includes/services/OpenLayers/OpenLayers.php b/includes/services/OpenLayers/OpenLayers.php index e2e5f0191..dcff5a5ab 100644 --- a/includes/services/OpenLayers/OpenLayers.php +++ b/includes/services/OpenLayers/OpenLayers.php @@ -23,7 +23,7 @@ $wgResourceModules['ext.maps.openlayers'] = array( 'dependencies' => array( 'ext.maps.common' ), 'localBasePath' => __DIR__, - 'remoteExtPath' => '/Maps/includes/services/OpenLayers', + 'remoteExtPath' => '..' . substr( __DIR__, strlen( $GLOBALS['IP'] ) ), 'group' => 'ext.maps', 'scripts' => array( 'OpenLayers/OpenLayers.js', From 5e3e92596937f618b2ad805c02cf05b45cbae973 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Tue, 7 Jan 2014 18:18:53 +0100 Subject: [PATCH 163/163] Make OL hack accessable from SemanticMaps --- includes/Maps_DisplayMapRenderer.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/Maps_DisplayMapRenderer.php b/includes/Maps_DisplayMapRenderer.php index f43f82731..7b3cce138 100644 --- a/includes/Maps_DisplayMapRenderer.php +++ b/includes/Maps_DisplayMapRenderer.php @@ -142,7 +142,7 @@ protected function handleMarkerData( array &$params, Parser $parser ) { $this->handleShapeData( $params, $parserClone ); if ( $params['mappingservice'] === 'openlayers' ) { - $params['layers'] = $this->evilOpenLayersHack( $params['layers'] ); + $params['layers'] = self::evilOpenLayersHack( $params['layers'] ); } } @@ -186,7 +186,7 @@ protected function handleShapeData( array &$params, Parser $parserClone ) { * * @return string[] */ - protected function evilOpenLayersHack( $layers ) { + public static function evilOpenLayersHack( $layers ) { global $egMapsOLLayerGroups, $egMapsOLAvailableLayers; $layerDefs = array(); @@ -252,7 +252,7 @@ protected function evilOpenLayersHack( $layers ) { } } - MapsMappingServices::getServiceInstance( 'openlayers' )->addLayerDependencies( $this->getLayerDependencies( $layerNames ) ); + MapsMappingServices::getServiceInstance( 'openlayers' )->addLayerDependencies( self::getLayerDependencies( $layerNames ) ); return $layerDefs; } @@ -261,7 +261,7 @@ protected function evilOpenLayersHack( $layers ) { * FIXME * @see evilOpenLayersHack */ - protected function getLayerDependencies( array $layerNames ) { + private static function getLayerDependencies( array $layerNames ) { global $egMapsOLLayerDependencies, $egMapsOLAvailableLayers; $layerDependencies = array();