ThinkGeo.com    |     Documentation    |     Premium Support

Does WmsHandler support both vector and raster images

Can we use the same WmsHandler which is used to render raster images, load vector images as well?

ie:
If we want to load a raster image/tile to the front end we use the request url below,
http://localhost:8888/Maps/WmsHandler.axd?LAYERS=MultiGeoRaster&STYLES=DEFAULT&FORMAT=image%2Fpng&DISPLAY=testjpg&CACHE_ID=1630287840667&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG%3A4326&BBOX=-22.730375426621,-37.576791808874,29.692832764505,14.846416382253&WIDTH=256&HEIGHT=256

Can we use the same WmsHandler request url to load vector images as well (ie: dwg files)?

Hi KarishmaF,

The WmsHandler you mentioned is the WmsServer class, right? Then the answer is yes, the server can return images of any formats, and only if the client supports the format, you can use it on the client.

Thanks,
Leo

Thats correct WmsServer is what I meant.

I am currently working on adding CAD layer using thinkgeo v10 and came across an issue.
The error is:
“WMS Server Exception: The type initializer for ‘ThinkGeo.MapSuite.Layers.CadFeatureSource’ threw an exception. at ThinkGeo.MapSuite.Layers.CadFeatureSource.qUo=(String cadPathFilename) at ThinkGeo.MapSuite.Layers.CadFeatureSource.pko=() at ThinkGeo.MapSuite.Layers.CadFeatureLayer.OpenCore() at ThinkGeo.MapSuite.Layers.Layer.Open() at MapPlugin.Implementation.CustomGeoWmsLayerPlugin.ReadCadFeatureLayer(String stype, String crs) at MapPlugin.Implementation.CustomGeoWmsLayerPlugin.GetMapConfigurationCore(String style, String crs) at ThinkGeo.MapSuite.WmsServer.WmsHandler.GetMapCore(GetMapRequest getMapRequest, HttpContext context) at ThinkGeo.MapSuite.WmsServer.WmsHandler.ProcessRequestCore(HttpContext context) at ThinkGeo.MapSuite.WmsServer.WmsHandler.ProcessRequest(HttpContext context)”

This error pops up when I try to open the assigned cad layer and for the ease of understanding I have attached link to the sample project below.

The OneDrive link:
https://1drv.ms/u/s!Ar1rm0eYoDgaamApCE-IaE2IBHM?e=0C3eWw

I would greatly appreciate if you could point out what I have done wrong.

Hi Karishma,

Thanks for your sample, I can reproduce this problem, which was caused by lack of some dlls.

You could copy “HelloWmsServerPlugin\bin\Debug\Windows-X86\TeighaCad\ThinkGeo.MapSuite.Wrappers.CadX86.dll” and “WorldMapWmsService\bin\ThinkGeo.MapSuite.dll” to “WorldMapWmsService\bin\Windows-X86\TeighaCad” folder, the problem would go away.

Thanks,
Leo

Thankyou Leo will check this one out