Hello everybody,
how can I include traffic incidents in an xMap? A code snippet would be very helpful and much appreciated.
Kind Regards,
Günter
Traffic Incidents
- Oliver Heilig
- Posts: 160
- Joined: Tue May 13, 2014 12:10 pm
- Location: Karlsruhe, Germany
- Contact:
Re: Traffic Incidents
Hello Günter,
one way to display traffic incidents with xMapServer is the PTV FeatureLayer for traffic incidents. If you want to display them with the xServer.NET control, there's a sample "FeatureLayers" at https://github.com/ptv-logistics/xservernet-bin. If you want to display static xMap image with the FL-TrafficIncidents: I've extended the sample https://github.com/ptv-logistics/SharpMap.Widgets to add additional xMapServer layers to the base map:
Best regards
Oliver
one way to display traffic incidents with xMapServer is the PTV FeatureLayer for traffic incidents. If you want to display them with the xServer.NET control, there's a sample "FeatureLayers" at https://github.com/ptv-logistics/xservernet-bin. If you want to display static xMap image with the FL-TrafficIncidents: I've extended the sample https://github.com/ptv-logistics/SharpMap.Widgets to add additional xMapServer layers to the base map:
Code: Select all
// test for displaying traffic incidents
var customXMapLayers = new List<XMapServiceReference.Layer>
{
new XMapServiceReference.FeatureLayer {name = "PTV_TrafficIncidents", visible = true}
};
// xmap-bg
sharpMap.Layers.Add(new XMapLayer("xmap-bg", "https://api-eu-test.cloud.ptvgroup.com/xmap/ws/XMap", MapMode.Background)
{ User = "xtok", Password = token, CustomXMapLayers = customXMapLayers });
// insert your application layers
// xmap-fg
sharpMap.Layers.Add(new XMapLayer("xmap-fg", "https://api-eu-test.cloud.ptvgroup.com/xmap/ws/XMap", MapMode.Town)
{ User = "xtok", Password = token, CustomXMapLayers = customXMapLayers });
// insert your application layers
Oliver
Oliver Heilig
Chief Developer Logistic Services
PTV GROUP - Germany
https://github.com/oliverheilig/
Chief Developer Logistic Services
PTV GROUP - Germany
https://github.com/oliverheilig/
-
- Posts: 5
- Joined: Thu Jul 28, 2016 11:52 am
Re: Traffic Incidents
Hi Oliver,
thanks again for your quick and competent help.
Kind Regards,
Günter
thanks again for your quick and competent help.
Kind Regards,
Günter