Hello,
I’m evaluating your product to see if it goes well with our specifications, but haven’t been able to connect to one of the maps we need.
I think the setup is good, but can’t find what goes wrong and why. Here is my code:
var wmtsTiledOverlay = new WmtsTiledOverlay(new Collection<Uri> { new Uri("http://www.ign.es/wmts/ign-base") });
wmtsTiledOverlay.WmtsServerEncodingType = ThinkGeo.MapSuite.Wpf.WmtsSeverEncodingType.Kvp;
wmtsTiledOverlay.Parameters.Add(key: "LAYER", value: "IGNBaseTodo");
wmtsTiledOverlay.Parameters.Add(key: "FORMAT", value: "image/jpeg");
wmtsTiledOverlay.Parameters.Add(key: "TILEMATRIXSET", value: "GoogleMapsCompatible");
wmtsTiledOverlay.InitializeConnection();
When the InitializeConnection line executes, it throws a “FormatException: Input string was not in a correct format”, with the stacktrace being:
in System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
in System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
in ThinkGeo.MapSuite.Wpf.WmtsTiledOverlay.skI=(XmlNode node, XmlNamespaceManager namespaceManager)
in ThinkGeo.MapSuite.Wpf.WmtsTiledOverlay.gRo=(XmlElement element, XmlNamespaceManager namespaceManager)
in ThinkGeo.MapSuite.Wpf.WmtsTiledOverlay.InitializeConnection()
...
I have seen, with Fiddler, that the “GetCapabilities” call is being done, and responded OK, so I think the problem may be parsing the response XML.
I also have tried to contact the server referenced in Errors connection to some WMTS , just to try, and that worked well.
Is there anything wrong with the code?
Thanks,
Euyen