To celebrate the first TM 9.0 live customer, today’s knowledge snippet deals with detailed routes on our SAP TM geo-map component SAP Visual Business. The customer uses the component to track its vehicles, what seems to be one of the most underestimated use cases for our solution.
By default, connections between locations are displayed with a straight arrow on the geo-map. First of all, this makes it easier to oversee a displayed scene potentially having very many connection. Secondly it is quicker.
As the screenshot shows, it is possible to switch to a detailed route mode. When selecting this, the geo-map calls a backend service responsible to get the detailed routes and in case it is successfull, changes the scene.
To enable this function, a GIS service must be connected. This can be enabled in the geo-map customizing:
Here, you can enter a georouting strategy using a process controller strategy.
And now comes the tricky part: Within this strategy you need a method that calls a GIS service delivering for start and destination coordinates and some additional attributes like speeds a table of route points. Some of the services even respond with a detailed way description in textual form.
How the input / output mapping is done can be checked in method /SCMB/CL_GEOROUTING_CONNECTOR->GET_STANDARD_ROUTE. Here you find the standard SAP coding for calling the outdated IGS – GIS integration. But at least it is useful as an example for your own implementation. The final route must be passed back to standard in attribute <fs_geo_request>-route_points for each request.
So here is what needs to be done:
1. Create own process controller strategy with a single method.
2. Within this method implement the call to your GIS service
3. Set your strategy in the geo-map customizing as georoute strategy
4. Test it!
A few things in addition:
– Currently there is no buffering, which can slow down the geo-map quite a bit. So really carefully handle multiple connections at the same time! Or maybe implement your own buffering in your GIS connector.
– It is important to carefully handle coordinate formats! SAP uses here the GPS format. So if your route appears to be somewhere in the nowhere, this is the first thing to check.
– The accuracy of the displayed route depends on the number of supplied route points. In case you see a route with just a few stages, the service might only supply information at coordinates where roads are changed. This is insufficient for the detailed route on the geo-map. On the other hand, if you have coordinates ever 10 centimeters, the data volume might be too high.
– Switching between quickest and shortest route for example is not supported in standard and must be implemented in the own coding.
– In general this function is not limited to street transports, but can also be used for ocean.
So still a bit to do to get it running, but cool feature.