r83848 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83847‎ | r83848 | r83849 >
Date:18:39, 13 March 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fixed projection fail
Modified paths:
  • /branches/SemanticMaps0.8/includes/forminputs/ext.sm.forminputs.js (modified) (history)
  • /branches/SemanticMaps0.8/includes/services/OpenLayers/jquery.openlayersinput.js (modified) (history)

Diff [purge]

Index: branches/SemanticMaps0.8/includes/services/OpenLayers/jquery.openlayersinput.js
@@ -156,12 +156,15 @@
157157 markerLayer.removeMarker( markerCollection[i] );
158158 }
159159
 160+ var normalProjectionLocation = new OpenLayers.LonLat( location.lon, location.lat );
 161+ normalProjectionLocation.transform( new OpenLayers.Projection( "EPSG:900913" ), new OpenLayers.Projection( "EPSG:4326" ) );
 162+
160163 markerLayer.addMarker(
161164 mapDiv.getOLMarker(
162165 markerLayer,
163166 {
164167 lonlat: location,
165 - text: '<b>' + address + '</b><hr />' + semanticMaps.dms( location.lat, location.lon ),
 168+ text: '<b>' + address + '</b><hr />' + semanticMaps.dms( normalProjectionLocation.lat, normalProjectionLocation.lon ),
166169 title: address,
167170 icon: options.icon
168171 }
@@ -169,9 +172,7 @@
170173 );
171174
172175 mapDiv.map.panTo( location );
173 -
174 - var normalProjectionLocation = new OpenLayers.LonLat( location.lon, location.lat );
175 - normalProjectionLocation.transform( new OpenLayers.Projection( "EPSG:900913" ), new OpenLayers.Projection( "EPSG:4326" ) );
 176+
176177 $( '#' + mapDivId + '_values' ).attr( 'value', semanticMaps.buildInputValue( [ normalProjectionLocation ] ) );
177178 }
178179
Index: branches/SemanticMaps0.8/includes/forminputs/ext.sm.forminputs.js
@@ -15,7 +15,7 @@
1616 var dms = [];
1717
1818 for ( i in locations ) {
19 - dms.push( this.locationToDMS( locations[i].lat, locations[i].lon ) );
 19+ dms.push( this.dms( locations[i].lat, locations[i].lon ) );
2020 }
2121
2222 return dms.join( '; ' );

Status & tagging log