Author |
Topic  |
|
jeanmarc93
France
31 Posts |
Posted - 09/01/2022 : 16:03:41
|
Good morning, I'd like to add a IGN WMS entry Here is the function used by MOBAC String getTileUrl(int Zoom, int X, int Y) { return Myurl + Mykey + Myfolder + "?Layer=" + Mylayer + "&Style=" + Mystyle + "&Tilematrixset=" + Mytilematrixset + "&Service=" + Myservice + "&Request=" + Myrequest + "&Version=" + Myversion + "&Format=" + Myformat + "&TileMatrix=" + Zoom + "&TileCol=" + X + "&TileRow=" + Y; } . May I have the Code dedicated to France IGN Plan V2 to get an example of Code . How could I specify the User-Agent in the Code dedicated to this new entry ? Regards, Jean-Marc |
Edited by - jeanmarc93 on 09/01/2022 17:26:48 |
|
okmap
Italy
2675 Posts |
|
 |
jeanmarc93
France
31 Posts |
Posted - 10/01/2022 : 09:15:26
|
Yes, it is |
 |
|
okmap
Italy
2675 Posts |
Posted - 10/01/2022 : 10:16:09
|
Already exists in OkMap Desktop database. It's named "France IGN Plan v2". |
 |
|
 |
jeanmarc93
France
31 Posts |
Posted - 10/01/2022 : 18:51:16
|
I want to use this map as template to create a new entry in MapServers.xml file for France IGN Topographic What would be the parameters for the key (my IGN identifier) and the User-Agent ? |
 |
|
okmap
Italy
2675 Posts |
Posted - 11/01/2022 : 09:49:07
|
Please give me the URL to get capabilities. |
 |
|
 |
jeanmarc93
France
31 Posts |
|
okmap
Italy
2675 Posts |
Posted - 11/01/2022 : 17:57:05
|
The link returns "Forbidden" |
 |
|
 |
jeanmarc93
France
31 Posts |
Posted - 12/01/2022 : 10:43:27
|
I sent you by mail the chain that must replace <CLEF> in the url It's a private key given by IGN |
 |
|
okmap
Italy
2675 Posts |
|
jeanmarc93
France
31 Posts |
Posted - 12/01/2022 : 11:11:14
|
The Layer is GEOGRAPHICALGRIDSYSTEMS.MAPS |
 |
|
okmap
Italy
2675 Posts |
Posted - 13/01/2022 : 09:27:35
|
This is an example: https://dolmenweb.it/viewers/openlayer/examples/wmts-ign.html
This is the code for OkMap:
var resolutions = []; var matrixIds = []; var proj3857 = ol.proj.get('EPSG:3857'); var maxResolution = ol.extent.getWidth(proj3857.getExtent()) / 256; for (var i = 0; i < 18; i++) {matrixIds[i] = i.toString(); resolutions[i] = maxResolution / Math.pow(2, i);} map.addLayer(new ol.layer.Tile({source: new ol.source.WMTS({url: 'https://wxs.ign.fr/<CLES>/geoportail/wmts/', layer: 'GEOGRAPHICALGRIDSYSTEMS.MAPS', matrixSet: 'PM', format: 'image/jpeg', projection: 'EPSG:3857', tileGrid: new ol.tilegrid.WMTS({origin: [-20037508, 20037508], resolutions: resolutions, matrixIds: matrixIds}), style: 'normal', attributions: '<a href="https://www.ign.fr/" target="_blank"><img src="https://wxs.ign.fr/static/logos/IGN/IGN.gif" title="IGN" alt="IGN"></a>'})}));
|
 |
|
jeanmarc93
France
31 Posts |
Posted - 13/01/2022 : 11:39:41
|
Many Thanks |
 |
|
jeanmarc93
France
31 Posts |
Posted - 22/04/2022 : 08:36:11
|
Hello,
Finally I found the correct code <mapsServer> <name>France IGN TOP 25</name> <code>map.addLayer(new ol.layer.Tile({source: new ol.source.TileWMS({url: 'https://wxs.ign.fr/[KEY]/geoportail/r/wms', params: {'LAYERS':'GEOGRAPHICALGRIDSYSTEMS.MAPS'}, attributions: '<a href="https://www.ign.fr/" target="_blank"><img src="https://wxs.ign.fr/static/logos/IGN/IGN.gif" title="IGN" alt="IGN"></a>'})}));</code> <baseLayer>true</baseLayer> <covered>France</covered> <minZoom>10</minZoom> <maxZoom>20</maxZoom> <active>true</active> <canSaved>true</canSaved> <custom>false</custom> <default>false</default> </mapsServer>
where [KEY] is my personal key registered on IGN Geoservices The IGN TOP25 maps are now displaying.
Regards |
Edited by - jeanmarc93 on 22/04/2022 08:41:19 |
 |
|
okmap
Italy
2675 Posts |
Posted - 22/04/2022 : 10:00:59
|
Thank you for having shared your code! |
 |
|
|
Topic  |
|