Index: branches/SemanticMaps0.8/includes/services/OpenLayers/jquery.openlayersinput.js |
— | — | @@ -156,12 +156,15 @@ |
157 | 157 | markerLayer.removeMarker( markerCollection[i] ); |
158 | 158 | } |
159 | 159 | |
| 160 | + var normalProjectionLocation = new OpenLayers.LonLat( location.lon, location.lat ); |
| 161 | + normalProjectionLocation.transform( new OpenLayers.Projection( "EPSG:900913" ), new OpenLayers.Projection( "EPSG:4326" ) ); |
| 162 | + |
160 | 163 | markerLayer.addMarker( |
161 | 164 | mapDiv.getOLMarker( |
162 | 165 | markerLayer, |
163 | 166 | { |
164 | 167 | 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 ), |
166 | 169 | title: address, |
167 | 170 | icon: options.icon |
168 | 171 | } |
— | — | @@ -169,9 +172,7 @@ |
170 | 173 | ); |
171 | 174 | |
172 | 175 | 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 | + |
176 | 177 | $( '#' + mapDivId + '_values' ).attr( 'value', semanticMaps.buildInputValue( [ normalProjectionLocation ] ) ); |
177 | 178 | } |
178 | 179 | |
Index: branches/SemanticMaps0.8/includes/forminputs/ext.sm.forminputs.js |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | var dms = []; |
17 | 17 | |
18 | 18 | 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 ) ); |
20 | 20 | } |
21 | 21 | |
22 | 22 | return dms.join( '; ' ); |