|     Blog    |     Wiki    |     Support

Some questions about WMTS


I would like to be able to access this url via a WMTS layer in a WPF application.

When I test this url in a web browser, I have an answer.
So I tested in a WMTS layer but I have a 404 response

Here is my code :

WmtsLayer wmtsLayer = new WmtsLayer();
wmtsLayer.ServerUris.Add(new Uri(“”));
wmtsLayer.Parameters.Add(“SERVICE”, “GetTile”);
wmtsLayer.Parameters.Add(“VERSION”, “1.0.0”);
wmtsLayer.Parameters.Add(“LAYER”, “ORTHOIMAGERY.ORTHOPHOTOS”);
wmtsLayer.Parameters.Add(“TILEMATRIXSET”, “PM”);
wmtsLayer.Parameters.Add(“TILEMATRIX”, “14”);
wmtsLayer.Parameters.Add(“TILECOL”, “8180”);
wmtsLayer.Parameters.Add(“TILEROW”, “5905”);
wmtsLayer.Parameters.Add(“STYLE”, “normal”);
wmtsLayer.Parameters.Add(“FORMAT”, “image/jpeg”);

        LayerOverlay layerOverlay = new LayerOverlay();
        layerOverlay.Layers.Add("wmtsLayer", wmtsLayer);
        MapToto.ZoomIntoCenter(10, new PointShape(48.845, 2.424));

Have I forgotten something?
And if I do not want to specify a tilecol or tilerow or tilematrix, what should I put in parameter?
This …
wmtsLayer.Parameters…Add (“tilecol”, “{x}”)
wmtsLayer.Parameters.Add (“tilerow”, “{y}”)
wmtsLayer.Parameters.Add (“tilematrix”, “{z}”)

Thank you for your help.



One more thing

a screen shot from postman

Hi Stephanie,

Our layer cannot parse the capability of it,

You can see it contains this node:

Our map throw exception when parse here, because follow the “Web Map Tile Service Standard” 1.0.0 version it should be a known URI format:

For example:

And you should want to use the WMTS layer like this:

 wmtsLayer.ServerUris.Add(new Uri(""));

        wmtsLayer.ActiveStyleName = "normal";
        wmtsLayer.ActiveLayerName = "ORTHOIMAGERY.ORTHOPHOTOS";
        wmtsLayer.TileMatrixSetName = "PM";            
        wmtsLayer.OutputFormat = "image/jpeg";
        wmtsLayer.Parameters.Add("VERSION", "1.0.0");

BTW, if you found anything have problem in the parameters, you can modify it in our event like this:

wmtsLayer.SendingWebRequest += WmtsLayer_SendingWebRequest;

        private void WmtsLayer_SendingWebRequest(object sender, SendingWebRequestEventArgs e)
        string sourceUrl = e.WebRequest.RequestUri.ToString();
        string newUrl = sourceUrl;  // Modify the url here
        e.WebRequest = HttpWebRequest.Create(newUrl);

Wish that’s helpful.



Hi Ethan,

Thank you for your help.
I used the WmtsLayer_SendingWebRequest event and changed the call url.

private void WmtsLayer_SendingWebRequest(object sender, SendingWebRequestEventArgs e)
var rr = new Uri(“”);
e.WebRequest = WebRequest.Create(rr);

I have a type error

Message=Il existe un caractère non valide dans l’encodage donné. Ligne 1, position 1.
Arborescence des appels de procédure :
à ThinkGeo.MapSuite.Wpf.Tile.DrawException(GeoCanvas geoCanvas, Exception exception)
à ThinkGeo.MapSuite.Wpf.Tile.Draw(GeoCanvas geoCanvas)
à ThinkGeo.MapSuite.Wpf.Tile.hFY=(Object status)
à System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
à System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
à System.Threading.ThreadPoolWorkQueue.Dispatch()
à System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Have you ever encountered this kind of error?


Hi Stephanie,

Your code have problem here.

If you view the sending url, you can see the first request url is:

The process for render a WMTS layer is follow this steps:

  1. Get capability
  2. Parse capability, get the information from it
  3. Get tile image, some information comes from the capability

You directly modify all the url to the get tile request, it get the image instead of XML, so the layer cannot parse it.

And just like I mentioned, your capability XML have problem, our layer cannot parse it correct in the step2.

And it looks we cannot find a way to ignore this step.



Hi Ethan,

My message is related to your response from this post. (MAP IGN integrated to MAP SUITE)

I’m sorry, I do not see how to change anything with getcapability.
I understand that the GetCapability returned by IGN does not meet a standard and so the thinkgeo Wmts layer can not read it.
By putting a breakpoint in the code, in sourceurl I have “
I can read it with xdocument but after that, how can I change <ows: SupportedCRS> EPSG: 3857 </ ow: SupportedCRS> by its equivalence that meets the standard …urn:ogc:def:crs:EPSG:6.18:3:3857?

But it’s mostly how to return a new uri that contains the GetCapabilities with this value there?

Thanks a lot for your help.



Hi Steph,

If the server is provide by 3rd part, you can try something like this:

  1. Contact the service provider, and see whether they can fix that
  2. Download their capability and modify it, then put the file in one of your server, and in your sending request event, modify the capability request link to get the modified version
  3. If you find the cached capability file here: %Temp%\MapSuite\WfsLayer, you can just replace that with yours.

Do you think which one is suitable your scenario?