julien-nc / gpxpod

Nextcloud app to view gpx track files
GNU Affero General Public License v3.0
40 stars 3 forks source link

How to add a custom map ? #33

Closed ventoux84 closed 1 year ago

ventoux84 commented 1 year ago

I have an IGN account and i does not find how to add the same wmts map that i added in the old interface.

julien-nc commented 1 year ago

Hey. I tried adding a WMS tile server as a raster one in GpxPod, works fine. Here is an example server (Norway only): https://wms.geonorge.no/skwms1/wms.sjokartraster2?&service=wms&version=1.3.0&request=GetMap&bbox={bbox-epsg-3857}&transparent=true&width=512&height=512&layers=all&CRS=EPSG:3857&format=image/png MapLibre (the underlying map library) supports WMS raster tile server URLs.

Now WMTS is a different story apparently. I found some examples of WMTS services providing URLs to access tiles with x/y/z coords like https://wmts.geo.admin.ch/1.0.0/ch.swisstopo.swissimage/default/current/3857/{z}/{x}/{y}.jpeg (Swiss only).

Could you provide the tile server address you're trying to add? Could you create a temporary IGN API key (if it's even possible) so I could use it while implementing support for this kind of WMTS in the new map?

ventoux84 commented 1 year ago

Thanks. For the moment, my problem is simple. I don't see where the interface entry point is to add this layer. Where do I click? Or what command should I use? I have a permanent key at IGN and i kow how to add a tile server in the old interface of GPXPod or app like Qmapshak or Oruxmaps.

ventoux84 commented 1 year ago

Oops Oops and Oops !!! I could only see one window in the settings. I have to scroll ! Perhaps you could add a downward arrow for those fools who don't understand the need to scroll.

The french menu for "Tile server" shows "Serveurs de t..." I hadn't noticed

Edit: I easily added the three IGN urls I need. Thanks for all your hard work. Once I got the hang of it, the new interface was much smoother and easier to set up and use.

Here is the url for a public map of France by IGN, the "Plan V2". https://wxs.ign.fr/pratique/geoportail/wmts?LAYER=GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2&EXCEPTIONS=text/xml&FORMAT=image/png&SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&STYLE=normal&TILEMATRIXSET=PM&TILEMATRIX={z}&TILECOL={x}&TILEROW={y}

julien-nc commented 1 year ago

Thanks for the feedback and the WMTS server example.