Feature Layer

Within this forum we want to offer discussions all around our .NET based xServer controls.

Feature Layer

Postby dstest » Wed Oct 24, 2018 12:39 pm

Hallo,
ich wir möchten FeatureLayers auf der Karte dynamisch zur Laufzeit ein und ausblenden. U.a. PTV_TruckAttributes,PTV_SpeedPatterns und PTV_TrafficIncidents (soll immer dann immer angezeigt werden unabhängig von routenplanung/xroute). Gibt es hierfür ein Beispiel in .NET wie dies einfach geschehen kann?
MfG
Frank
dstest
 
Posts: 3
Joined: Mon Aug 06, 2018 11:11 am

Re: Feature Layer

Postby Bernd Welter » Wed Oct 24, 2018 3:42 pm

Hello Frank,

please check whether this post gives answers...

viewtopic.php?f=14&t=353&p=900&hilit=featurelayer#p900

The colleagues usually provide samples via GITHUB and if a sample is missing they can check whether they can add one.

Best regards from LINZ AIRPORT / Austria,
Bernd
Bernd Welter
Manager Technical Consulting & Requirement Engineering
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
 
Posts: 1157
Joined: Mon Apr 14, 2014 10:28 am

Re: Feature Layer

Postby dstest » Fri Oct 26, 2018 2:14 pm

Hello Bernd,
thank you for the answer.
i have seen the example. Thats exact what we need. But it doesn't work in my project with the .net mapcontrol we use.

Feature Layer Classes are the same. Call of the Procedure is the same. Only other thing is the kind of the Mapcontrol:

Private flPresenter As dsoft.logit.mgxsharp.FeatureLayer.FeatureLayerPresenter

Private Sub InitFeatureLayers()
flPresenter = New mgxsharp.FeatureLayer.FeatureLayerPresenter(pxFormsMap.WrappedMap)
flPresenter.ReferenceTime = Now
flPresenter.UseTrafficIncidents = True
flPresenter.UseRestrictionZones = False
flPresenter.UseTruckAttributes = False
flPresenter.UseSpeedPatterns = False
flPresenter.RefreshMap()
End Sub

Is there a problem with the mapcontrol we use? What do i have to change?

BR
Frank
Attachments
2018-10-26 16_00_33-(Debugging) - Microsoft Visual Studio.png
dstest
 
Posts: 3
Joined: Mon Aug 06, 2018 11:11 am

Re: Feature Layer

Postby Oliver Heilig » Tue Oct 30, 2018 9:35 am

Hello Frank,

i guess you are referring to thesample "FeatureLayers" here:

https://github.com/ptv-logistics/xserver.net-bin

We have changed the sample to fit to the latest version (1.6) of the control. This has some internal interface changes regarding xMapServe-access. To make this code work you can either revert to a pre-October version

https://github.com/ptv-logistics/xserve ... rovider.cs

or use the latest version 1.6.0 (inside the lib folder) in your project. I would recommend this anyways, because this will also be next supported version, and also abailable on GitHub

https://github.com/ptv-logistics/xserver.net

Oli
Oliver Heilig
Chief Developer
PTV GROUP - Germany

https://github.com/oliverheilig/
User avatar
Oliver Heilig
 
Posts: 107
Joined: Tue May 13, 2014 12:10 pm
Location: Karlsruhe, Germany

Re: Feature Layer

Postby dstest » Thu Nov 15, 2018 10:46 am

Hallo Oliver,
leider konnte das Problem mit Komponentenupdate und Verwendung des neuen Feature-Layer Beispiels nicht behoben werden.
Die Fehlermeldung bleibt gleich. Ich habe ein Testprojekt hierzu hinzugefügt, damit Sie das Problem sehen könne.
Gruß
Frank
Attachments
Maptest.zip
(1.23 MiB) Downloaded 1 time
dstest
 
Posts: 3
Joined: Mon Aug 06, 2018 11:11 am

Re: Feature Layer

Postby Oliver Heilig » Fri Nov 16, 2018 8:05 am

Hello Frank,

i've reviewed the sample and found the problem is that you must initialize the map with specific providers, and not just by setting xMapUrl.

I must admit this is a bit cumbersome, but was required because the default didn't support the ReferenceTime property, which is required for FeatureLayer. I've added this property to the basic xmap-1 provider. Now the special implementation isn't needed, and you can change ReferenceTime with the standard inplementation. Take a look at the new sample.

But this requires the latest revision of the control, which is available here: https://github.com/ptv-logistics/xserve ... master/Lib

Oli
Oliver Heilig
Chief Developer
PTV GROUP - Germany

https://github.com/oliverheilig/
User avatar
Oliver Heilig
 
Posts: 107
Joined: Tue May 13, 2014 12:10 pm
Location: Karlsruhe, Germany


Return to PTV xServer.NET (Admin=OH)