XMapStyle

Within this forum we want to offer discussions all around our .NET based Map control including all .Net-language specific questions concerning calls of the xServer-API. Attention: xServer-relevant concepts can be found in further forums such as xRoute or xTour.
Post Reply
puissancei
Posts: 46
Joined: Wed Jul 05, 2017 10:27 am

XMapStyle

Post by puissancei »

Hello,

I don't understand why this.XMapStyle = "Gravelpit" (or other value) has no effect.

Xserver 1.22
Xserver .net 1.5

Thank you
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: XMapStyle

Post by Bernd Welter »

Hello Michel,

I forwarded your topic to Oliver, usually he answers quite fast.

As a temporary workaround I can offer this:
Change the default profile on the server which means you set the map.profile (and restart the xMap afterwards)
# The map profile contains visualization parameters such as colors etc.
# If empty the engine's default is used
#
#map.profile=
map.profile=gravelpit.ini
in the conf files
  • xmap-ajax-av.properties
  • xmap-ajax-fg.properties
  • xmap-ajax-bg.properties
  • xmap-ajax-ov.properties
At least this will show you the result of the desired style but of course this is less flexible than the feature you asked for.

Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
Oliver Heilig
Posts: 154
Joined: Tue May 13, 2014 12:10 pm
Location: Karlsruhe, Germany
Contact:

Re: XMapStyle

Post by Oliver Heilig »

Hi Michel,

the XMapStyle must be an appropriate style with an -fg and -bg profile. What should work out-of-the box is

default, silkysand, sandbox and gravelpit

I've tested the sample "FormsMapVB" at

https://github.com/ptv-logistics/xservernet-bin

to change the style at runtime, and it works as expected:

Code: Select all

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        FormsMap1.XMapStyle = "gravelpit"
End Sub
Can you reproduce this?
Oli
Oliver Heilig
Chief Developer Logistic Services
PTV GROUP - Germany

https://github.com/oliverheilig/
Post Reply