ThinkGeo.com    |     Documentation    |     Premium Support

Using a map service

Hello,

We have developed some map services for use in our online product. I would like to use these services in our desktop version. However, when I access the URI via a WmsRasterLayer, I get the following error when the map refreshes:

: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host

I’m not sure if I’m using the wrong type of layer, or if there is some property I need to set to get this to work. I’m not changing any of the default properties of the raster layer. If I just put the URL into a browser window, I get the GeoJson data back that we expect.

Any thoughts?

Thanks, Dib

Hi Dib,

Does your online product built by our web edition or it’s supported by 3rd part product?

If you used our web edition, the parameter should be the same because it use the same layer with desktop edition.

If you used 3rd part product, you should want to make sure whether it’s WMS, because maybe is tiled wms or wmts, they have its corresponding layer. And you need to set the parameter to make it works, you can sent us the link(if it don’t require security) and our developer can try to connect it to see how to set the parameter. Or you can view the other topic or our sample to learn how to set correct parameters.

Regards,

Ethan

Ethan,

It looks like the service is WFS, not WMS. Here is the line I’m now trying to use to create the layer:

Dim wpLayer As New WfsFeatureLayer(“https://OUR_URL/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typename=nhp:windprobs_view&outputFormat=application/json&srsname=EPSG:3857&viewparams=date:1539098504;fcstHr:120;spd:STS”, “nhp:windprobs_view”)

Do you see any adjustments that need to made to that? I’m getting the same error as before.

Hi Dib,

If it’s a wfs server, I think your code should looks like:

WfsFeatureLayer layer = new WfsFeatureLayer("https://OUR_URL/geoserver/wfs", "nhp:windprobs_view");
layer.open();
layer .GetBoundingBox();
Collection<FeatureSourceColumn> columns = layer.FeatureSource.GetColumns();
Collection<Feature> features = layer.FeatureSource.GetAllFeatures(ReturningColumnsType.NoColumns);

Wish that’s helpful.

Regards,

Ethan

Ethan,

I ended up downloading the data in KML format, and adjusting the KML in code to get the results.

Hi Dib,

Thanks for your update.

Regards,

Ethan