Page 1 of 1

Tooltip info of Low Emission Zones

Posted: Tue Aug 13, 2024 11:26 am
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