Hi SƩbastien,
for our API, we only support LV03 for GEOJson files. There are
open-source
tools available that will transform a GEOJson file from WGS84 to LV03.
For
some of them, see [1].
Anyhow, if you have your data in WGS84, there's also the possibility to
create
a kml file. KML is WGS84 only and is well supported by our API.
I hope this helps.
Gilbert
[1]
http://www.swisstopo.admin.ch/internet/swisstopo/fr/home/products/software/products/skripts.html
On 01.09.2015 16:38, Sebastien Blanc wrote:
> Dear Gilbert,
> Thank you for your reply. The example helped me to make it work. My
> main issue was that the coordinates I have for my path (lineString) is
> in WGS84 whereas it seems that MN03 should be used for the GeoJSON
> file. I proceed to a conversion point by point using the json utility
> of the swisstopo website:
>
http://www.swisstopo.admin.ch/internet/swisstopo/fr/home/products/software/products/m2m/wgs84tolv03.html
> This takes some time since I have arround 200 points and I send one
> request par point. Is there another way to proceed? Can't I configure
> my json reading to be in WGS84 instead of MN03 ?
>
> Thank you in advance,
>
> SƩbastien Blanc
>
> On Friday, August 28, 2015 at 2:30:25 PM UTC+2, Gilbert Jeiziner
> wrote:
>
>> Hi Sebastien,
>>
>> the current API uses OpenLayers 3.6. Support for ol.source.GeoJSON
>> has
>> been removed with
>> OpenLayers 3.5. So it can't be used anymore.
>>
>> Anyhow, it should be possible to use GEOJson with our API. The page
>> you
>> referred
http://openlayers.org/en/master/examples/geojson.html [1]
>> shows a
>> working example.
>>
>> In addition, we have on our examples page an example as well which
>> uses
>> GEOJson as datasource:
>>
http://api3.geo.admin.ch/examples/geoadmin_geojson.html [2]
>> Here is it's source code:
>>
http://api3.geo.admin.ch/examples/geoadmin_geojson.js [3]
>>
>> I hope this helps.
>>
>> Gilbert
>>
>> On 28.08.2015 12:40, Sebastien Blanc wrote:
>>> Dear all,
>>> I am trying to implement a GeoJSON overlay on my map where I would
>>
>>> read the vector information from a json var. Here's an ol example
>> that
>>> I am trying to implement but without any success:
>>>
http://openlayers.org/en/master/examples/geojson.html [1]
>>> For more options, visit
https://groups.google.com/d/optout [4]
>> [1].
>>>
>>>
>>> Links:
>>> ------
>>> [1]
https://groups.google.com/d/optout [4]
>
> --
> You received this message because you are subscribed to the Google
> Groups "GeoAdmin API" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to
geoadmin-api...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout [4].
>
>
> Links:
> ------
> [1]
http://openlayers.org/en/master/examples/geojson.html
> [2]
http://api3.geo.admin.ch/examples/geoadmin_geojson.html
> [3]
http://api3.geo.admin.ch/examples/geoadmin_geojson.js
> [4]
https://groups.google.com/d/optout