Page 1 of 1
How to connect SAP Visual Business to the xMap2 (REST)?
Posted: Mon Jul 27, 2020 2:43 pm
by Bernd Welter
Hi there,
today I was in a call with an xServer "rookie" who just starts with the APIs. He asked me how to create a mapping interface based on Visual Business but unfortunately I am not familiar with SAP in detail. He showed this
SAP page and the
PTV based document which is based on xMap1.
He expected me to tell him a simple
REST URL scheme such as
but I am not sure whether this scheme is what he would need. Can anyone guide us through this?
Best regards,
Bernd
Re: How to connect SAP Visual Business to the xMap2 (REST)?
Posted: Tue Jul 28, 2020 8:18 am
by MISTERX
Hi Bernd!
You're very close to the correct URL for REST via xMap2 (xMap1 will only accept WMS as described in SCN) in SAP VBI:
PROFILE might be silkysand, e.g.
TOKEN is the required authentication at PTV-xServer-Internet
LAYERS might be
- labels
background
transport
PTV_PreferredRoutes
PTV_TruckAttributes
Most simple request:
Map with TruckAttributes and RestrictionZones:
How to deal with map-tiles:
https://xserver2-europe-eu-test.cloud.p ... g%7C_____1
Please take into consideration that Customizing in SAP requires LOD (aka Level-Of-Detail) instead of z!
Re: How to connect SAP Visual Business to the xMap2 (REST)?
Posted: Tue Jul 28, 2020 12:38 pm
by saravana.subbiah
Hi Bernd/MISTERX,
Thanks for replying,
@MISTERX, Could you please provide your inputs for the following questions?
1. For an On Premise (Local Server) installation of PTV, Do we need to pass the "xtok" parameter as a part of the "REST API URL"? (I assume this is not needed, Please correct me if am wrong)
2. Will the below proposed URL work for SAP TM application as well where an Interactive map is usually rendered for performing Freight planning and for viewing actual routes between different geo-coordinates?
http://[FQDN]/services/rest/XMap/tile/{LOD}/{X}/{Y}?storedProfile=silkysand
I assume values for {LOD} ,{X} and {Y} are determined dynamically by SAP when it generates a call to PTV server. Kindly let us know if we need to specify default values for these parameters in the Map configuration step?
Note: Again this question is for an On Premise (Local Server) installation.
3.If the local installation has a "Https" connection with the server can we replace "Http" connection with "Https" in the Rest API URL?
Thanks and Regards,
Saravana S
Re: How to connect SAP Visual Business to the xMap2 (REST)?
Posted: Tue Jul 28, 2020 12:59 pm
by MISTERX
Dear Saravana,
you are welcome!
Concerning your questions:
#1 You got it right: On-Premises-xServers do not need xtok (aka token).
#2 Yes, SAP TM provides a map-container in the planning cockpit and will work as well with xMap2 via REST and the values for {LOD}, {X} und {Y} will be determined dynamically by SAP.
#3 On-Premises-xServer (aka local installation) run normally with HTTP, only. From my point of view, there are no reasons to work with HTTPS. But anyhow, there is no difference in the request-URL besides with or without S (aka Secure).
Re: How to connect SAP Visual Business to the xMap2 (REST)?
Posted: Tue Jul 28, 2020 4:08 pm
by saravana.subbiah
Hi,
We updated the SAP Map configuration as per your suggestion, We are now able to render the PTV map in the SAP TM Application.
Note: The "Https" prefix had worked for us.
Thanks for your timely support!
Thanks and Regards,
Saravana S
Re: How to connect SAP Visual Business to the xMap2 (REST)?
Posted: Wed Jul 29, 2020 6:18 am
by MISTERX
To whom it may concern!
Just to shorten the way to the first map in any application, I'd like to give some hints:
There is no need to install an xServer2 locally (On-Premises). The PTV xServer internet is ready to be of service.
To get a free trial "xtok" for testing PTV xServer internet (60 days validity):
https://www.ptvgroup.com/en/solutions/p ... /test-now/
The thread (in this forum)
xServer2: : setup a basic Auth
contains some meaningful information about the "xtok":
https://xserver.ptvgroup.com/forum/view ... =43&t=1120