Skip to content

Commit

Permalink
Merge pull request #4882 from camptocamp/GSGMF-942
Browse files Browse the repository at this point in the history
api: reverse to order of the coordinates to be compatible with the old api
  • Loading branch information
fredj committed May 8, 2019
2 parents 773ca8f + 7fb825d commit 0d9d84b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions api/dist/apihelp/data.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id point title description icon iconSize iconOffset
1 553000,216300 Information Office de l'information<br />Tél: 032 000 00 00<br>Email: <a href="mailto:info@example.com">info@example.com</a><br />Internet: <a href="http://fr.wikipedia.org/wiki/La_Chaux-de-Fonds" target=new>Cliquer ici</a> http://dev.openlayers.org/releases/OpenLayers-2.13.1/img/marker.png 21,25 -10.5,-25
2 554250,215600 Ma première station Diesel pas cher http://dev.openlayers.org/releases/OpenLayers-2.13.1/img/marker-blue.png 21,25 -10.5,-25
3 552556,215864 Mon parking C'est celui-là le meilleur. http://dev.openlayers.org/releases/OpenLayers-2.13.1/img/marker-gold.png 21,25 -10.5,-25
4 554489,217126 Mon parking Ce parking est<br/>le meillleur. http://dev.openlayers.org/releases/OpenLayers-2.13.1/img/marker-gold.png 21,25 -10.5,-25
5 554089,217326 Ma deuxième station Sans-plomb pas cher. http://dev.openlayers.org/releases/OpenLayers-2.13.1/img/marker-blue.png 21,25 -10.5,-25
1 216300,553000 Information Office de l'information<br />Tél: 032 000 00 00<br>Email: <a href="mailto:info@example.com">info@example.com</a><br />Internet: <a href="http://fr.wikipedia.org/wiki/La_Chaux-de-Fonds" target=new>Cliquer ici</a> http://dev.openlayers.org/releases/OpenLayers-2.13.1/img/marker.png 21,25 -10.5,-25
2 215600,554250 Ma première station Diesel pas cher http://dev.openlayers.org/releases/OpenLayers-2.13.1/img/marker-blue.png 21,25 -10.5,-25
3 215864,552556 Mon parking C'est celui-là le meilleur. http://dev.openlayers.org/releases/OpenLayers-2.13.1/img/marker-gold.png 21,25 -10.5,-25
4 217126,554489 Mon parking Ce parking est<br/>le meillleur. http://dev.openlayers.org/releases/OpenLayers-2.13.1/img/marker-gold.png 21,25 -10.5,-25
5 217326,554089 Ma deuxième station Sans-plomb pas cher. http://dev.openlayers.org/releases/OpenLayers-2.13.1/img/marker-blue.png 21,25 -10.5,-25
3 changes: 2 additions & 1 deletion api/src/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,9 @@ class Map {
for (const line of lines) {
if (line) {
const values = zip(columns, line.split('\t'));
// reverse to order of the coordinates to be compatible with the old api.
const marker = new Feature({
geometry: new Point(values.point.split(',').map(parseFloat))
geometry: new Point(values.point.split(',').reverse().map(parseFloat))
});
marker.setProperties(filterByKeys(values, attr));
marker.setId(values.id);
Expand Down

0 comments on commit 0d9d84b

Please sign in to comment.