With the Raster Maps service you can display geographical data, satellite images, traffic incidents, traffic patterns and restrictions on a digital map.
Using the Raster Maps API is simple. Follow the steps on this page to get started with rendering maps.
Please note the individual rate and request limits for each API. You can find all limits in our FAQ.
API Endpoint
To send an image tiles request you need to use the following API endpoint:
https://api.myptv.com/rastermaps/v1/image-tiles
Request
For a single tile showing Paris, France specify the map tile path with zoomLevel, x and y as shown below.
You can test this by entering the URL into your web browser (be sure to replace YOUR_API_KEY with your actual API key).
https://api.myptv.com/rastermaps/v1/image-tiles/11/1037/704?apiKey=YOUR_API_KEY
Alternatively you can choose one of the following options to send your request. You also have the option to send the API key in the request header.
cURL:
curl --location --request GET "https://api.myptv.com/rastermaps/v1/image-tiles/11/1037/704" --header "ApiKey: YOUR_API_KEY"
PowerShell:
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("ApiKey", "YOUR_API_KEY")
$response = Invoke-RestMethod "https://api.myptv.com/rastermaps/v1/image-tiles/11/1037/704" -Method GET -Headers $headers
Response
The call result is a single map tile in the default styling theme (silkysand) and the default size of 256x256 pixels.
Copyright
Attribution
The usage of the PTV Developer map requires attribution to the PTV and their data providers. Please make sure to provide the correct attribution in the tile rendering framework you are using.
Using Leaflet, a copyright string can be set in the attribution of the TileLayer
.
The latest copyright string can be obtained from PTV. For rendering the base map this would be '©2023, PTV Group, HERE'.