question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error parsing WMTS from IGN

See original GitHub issue

Copied from Mapsui https://github.com/Mapsui/Mapsui/issues/1752


Hello,

I use Mapsui.Forms release 4.0.0-beta.5 in a Xamarin application.

The error comes when I try to parse capabilities from IGN Orthophotos layer, the WmtsParser.Parse method throw this exception :

System.ArgumentException: identifier at BruTile.Wmts.CrsUnitOfMeasureRegistry.get_Item (BruTile.Wmts.CrsIdentifier identifier)

This is the code I use :

var httpClient = new System.Net.Http.HttpClient();
var response = await httpClient.GetStreamAsync("https://wxs.ign.fr/ortho/geoportail/wmts?SERVICE=wmts&VERSION=1.0.0&REQUEST=GetCapabilities");
var tileSources = WmtsParser.Parse(response);
var ortho  = tileSources.First(t => t.Name == "ORTHOIMAGERY.ORTHOPHOTOS");
if (DefaultCache != null)
   ortho.PersistentCache = DefaultCache;
TileLayer Layer = new TileLayer(ortho) { Name = "Photos IGN" };

The same code with an other provider runs well :

var httpClient = new System.Net.Http.HttpClient();
var response = await httpClient.GetStreamAsync("https://geodata.nationaalgeoregister.nl/wmts/top10nl?VERSION=1.0.0&request=GetCapabilities");
var tileSources = WmtsParser.Parse(response);
var nature2000TileSource = tileSources.First(t => t.Name == "natura2000");
if (DefaultCache != null)
   nature2000TileSource.PersistentCache = DefaultCache;
TileLayer Layer = new TileLayer(nature2000TileSource) { Name = nature2000TileSource.Name }; 

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pauldendulkcommented, Dec 30, 2022

Fixed in 5.0.3.

0reactions
edfr73commented, Jan 16, 2023

Thanks for all, I can now use French IGN maps with BruTiles 5.0.3 and Mapsui.Forms 4.0.0-beta.5.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error parsing WMTS from IGN · Issue #1752
The error comes when I try to parse capabilities from IGN Orthophotos layer, the WmtsParser.Parse method throw this exception : System.
Read more >
GeoServer 2.14.0 / Cascading / WMTS : Can't parse crs ...
I want to cascade a WMTS service (IGN France) with my GeoServer ... 2) When I add it as a store in GeoServer,...
Read more >
Exception thrown when initializing connection to WMTS ...
I have seen, with Fiddler, that the “GetCapabilities” call is being done, and responded OK, so I think the problem may be parsing...
Read more >
Can't load WMTS Layer
I'm trying to load a simple WMTS Layer in my map. The version of the ESRI Android SDK that I use is 100.3...
Read more >
Error parsing Tile Server URL in the WMTS Table.Xml. Unable ...
Learn how to resolve MapInfo Pro WMTS error "An error occurred loading a Tile Server table: Error parsing Tile Server URL in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found