Page 1 of 1

xMap2: how to retrieve specific layers only? (REST)

Posted: Wed Nov 27, 2019 5:21 pm
by Bernd Welter
Hi there,

today I got asked whether it is possible to request only the truck attributes (PTV_TruckAttributes) with a REST call so the result tile would not contain any standard layers such as label or transport.

Well: here's the solution: just do not ask for what you don't want to see ;-) Here's the same geography rendered with different layer sets:
/services/rest/XMap/tile/12/2124/1366?layers=PTV_TruckAttributes
/services/rest/XMap/tile/12/2124/1366?layers=PTV_TruckAttributes
PTV_TruckAttributes-only.png (2.11 KiB) Viewed 10354 times
/services/rest/XMap/tile/12/2124/1366?layers=PTV_TruckAttributes,labels,transport
/services/rest/XMap/tile/12/2124/1366?layers=PTV_TruckAttributes,labels,transport
PTV_TruckAttributes-labels,transport.png (9.06 KiB) Viewed 10354 times
/services/rest/XMap/tile/12/2124/1366?layers=PTV_TruckAttributes,labels,transport,background
/services/rest/XMap/tile/12/2124/1366?layers=PTV_TruckAttributes,labels,transport,background
PTV_TruckAttributes-labels,transport,background.png (14.16 KiB) Viewed 10354 times
HERE Satellite images mashed up with PTV_TrafficIncidents
HERE Satellite images mashed up with PTV_TrafficIncidents
Best regards,
Bernd

Re: xMap2: how to retrieve specific layers only? (REST)

Posted: Thu Jun 11, 2020 1:54 pm
by danper
Hi Bernd,
could you add the code of the xmap2 + here satellite map example?
Kind Regards,
Daniele

Re: xMap2: how to retrieve specific layers only? (REST)

Posted: Thu Jun 11, 2020 2:50 pm
by Bernd Welter
Hello Daniele,

there's not a single call for what you need. It requires a mesh up of the
- here call to gather the satellite image
- the call to xmap2 to gather the feature layers
You then have to create the superposition of two layers with the technique that is provided by the framework you use. Which one do you need? I'd like to get one to provide it here in the forum?

We could also start some collection...
Best regards to my Italian friends!

Bernd

Re: xMap2: how to retrieve specific layers only? (REST)

Posted: Thu Jun 11, 2020 3:13 pm
by danper
Hi Bernd,

we are using leaflet JS on a webpage. In the meanwhile, we solved using adding an extra tile layer for the satellite HERE maps...

Kind Regards
Daniele e Fabio

Re: xMap2: how to retrieve specific layers only? (REST)

Posted: Fri Jun 12, 2020 6:36 am
by Joost
For leaflet, don't forget the code Oliver put on github to give examples:

https://github.com/ptv-logistics/xserve ... oilerplate