Tooltip info of Low Emission Zones

This forum covers all questions dealing with visualization of data within the native PTV xMap interface and the
PTV Developer Raster Maps API
Please remember that additional plugins such as AJAX or Leaflet may be handeled in other forums.
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Tooltip info of Low Emission Zones

Post by Bernd Welter »

Hi there,

the PTV Developer Vector Maps enables users to determine the attributes of a Low Emission Zone via click in a map (Showcase):
  • https://developer-applications.myptv.com/Showcases/MapAndGeocoding/MapWithSuggestions/
    https://developer-applications.myptv.com/Showcases/MapAndGeocoding/MapWithSuggestions/
Is this approach of gathering feature layer data from the underlying PTV_LowEmissionZones layer also available in PTV Raster Maps? If so - can I get an example?

The answer is: no. :cry: The raster APIs do not support providing geometry info exceeding a zero dimension object (point based). Such a level of flexibility is restricted to the vector approach because this offers the option to return more complex objects to the client.

What I see as a workaround is to gather the (lat,lon) of a click in a map and then use PTV Developer.MapMatching API (Cloud Only):

Code: Select all

{
  "longitude": 9.00975132584927,
  "latitude": 48.7977580934059,
  "calculationMode": "QUALITY",
  "heading": 0.0,
  "language": "EN"
}
which returns:

Code: Select all

{
  "latitude": 48.79773,  "longitude": 9.00965,
  "lowEmissionZones": [
    {
      "name": "Lkw-Verbotszone Leonberg",
      "vehicleCategories": [
        "TRUCK"
      ]
    },
  "segmentGeometry": "{\"type\":\"LineString\",\"coordinates\":[[9.00965,48.79773],[9.00919,48.79825],[9.00912,48.79834],[9.00906,48.79845],[9.00897,48.79884],[9.00894,48.79912]]}",
  "matchDistance": 8,  "angleDifference": 30.23,
    "segmentLocationDescriptors": {
    "countryName": "Germany",    "city": "Leonberg",    "postalCode": "71229",    "street": "Mozartstraße"
  },
  "segmentAttributes": {
    "bridge": false,    "tunnel": false,    "ramp": false,    "frontage": false,    "paved": true,
    "requiresFourWheelDrive": false,    "privatelyManaged": false,    "publicAccess": true,
    "parkingLot": false,    "priorityRoad": false,    "builtUpArea": true,    "speedLimit": 30
  }
  ]
}

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:
Post Reply