From bbbdd3267d2ff6378b4fa479a40ca0ba8675abf1 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 8 May 2019 15:26:29 +0200 Subject: [PATCH] api: reverse to order of the coordinates to be compatible with the old api --- api/dist/apihelp/data.txt | 10 +++++----- api/src/Map.js | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/api/dist/apihelp/data.txt b/api/dist/apihelp/data.txt index 8866fe7180a3..13772b67a5f4 100644 --- a/api/dist/apihelp/data.txt +++ b/api/dist/apihelp/data.txt @@ -1,6 +1,6 @@ id point title description icon iconSize iconOffset -1 553000,216300 Information Office de l'information
Tél: 032 000 00 00
Email: info@example.com
Internet: Cliquer ici 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
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
Tél: 032 000 00 00
Email: info@example.com
Internet: Cliquer ici 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
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 diff --git a/api/src/Map.js b/api/src/Map.js index e781cd371130..fa4971ba6cd2 100644 --- a/api/src/Map.js +++ b/api/src/Map.js @@ -271,8 +271,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);