diff options
| author | Thomas Haddad | 2017-01-18 15:40:46 +0100 |
|---|---|---|
| committer | Thomas Haddad | 2017-01-18 15:45:11 +0100 |
| commit | 4bf26ef9e6159a3624bfe3a307c869de1b7003d0 (patch) | |
| tree | 3e6a753bde9ed308fc505b5464e98fcd3bffb43a /app/assets/javascripts | |
| parent | 0a0a1ae071c36e7929b8c5cebb9bae4680398e7c (diff) | |
| download | chouette-core-4bf26ef9e6159a3624bfe3a307c869de1b7003d0.tar.bz2 | |
Refs #2404: Set ol map projection to EPSG-4326 and prepare extent for API call
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
Diffstat (limited to 'app/assets/javascripts')
| -rw-r--r-- | app/assets/javascripts/es6_browserified/itineraries/components/OlMap.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/assets/javascripts/es6_browserified/itineraries/components/OlMap.js b/app/assets/javascripts/es6_browserified/itineraries/components/OlMap.js index 25222c949..19b36c52e 100644 --- a/app/assets/javascripts/es6_browserified/itineraries/components/OlMap.js +++ b/app/assets/javascripts/es6_browserified/itineraries/components/OlMap.js @@ -11,9 +11,10 @@ class OlMap extends Component{ var map = new ol.Map({ target: 'stoppoint_map' + this.props.index, layers: [ - new ol.layer.Tile({ - source: new ol.source.OSM() - }) + new ol.layer.Tile({ + source: new ol.source.OSM(), + projection: 'EPSG:4326' + }) ], controls: [ new ol.control.ScaleLine() ], interactions: ol.interaction.defaults({ @@ -21,9 +22,14 @@ class OlMap extends Component{ }), view: new ol.View({ center: ol.proj.fromLonLat([2.349014, 48.864716]), - zoom: 18 + zoom: 18, + projection: 'EPSG:4326' }) }); + debugger + // TODO when fetching, use extent value in EPSG 4326 + // var extent = map.getView().calculateExtent(map.getSize()); + // ol.proj.transformExtent(a,"EPSG:3857",'EPSG:4326') } } |
