Was this helpful?
Alpaca Travel offers a vector tile hosting service that includes a regularly updated database of ATDW products across Australia. This can be used by users with ATDW Distributor agreements direct with ATDW in order to display a map of all the ATDW products available in their region.
Alpaca travel can help build and provide map tiles in order to create better exploration around your content.
Before you get started, you must add your ATDW API Key to the platform by logging in to your account and adding the ATDW integration.
Alpaca offers an interactive explorer to review what data is visible within the vector dataset.
Alpaca provides a feature specification that corresponds to commonly used properties that can help you select and style your map accordingly.
Example of Feature Properties
1{
2 "properties": {
3 "id": "5b347afb3e8293ed17072934",
4 "num": "AU0170827",
5 "org_num": "OR0016918",
6 "name": "Hotel Lindrum Melbourne - MGallery",
7 "cat": "ACCOMM",
8 "class": "[\"HOTEL\"]",
9 "maki": "lodging",
10 "atts": "[\"COVIDSAFE\",\"ACCOR\",\"24HOURS\",\"BAGROOM\",\"BAR\",\"BUSINESSFC\",\"CONVFAC\",\"NSMOKESTAB\",\"PAYTV\",\"STEREORADIO\",\"RESTAURANT\",\"TOURDESK\",\"FREEWIFI\",\"Luxury\",\"DISTASSIST\"]",
11 "rate_from": 265,
12 "rate_to": 595,
13 "areas": "[\"Melbourne\"]",
14 "regions": "[\"Melbourne\"]",
15 "suburb": "Melbourne",
16 "state_code": "VIC",
17 "postcode": "3000",
18 "has_deal": false
19 }
20}
Alpaca also determines a recommended 'maki' icon, which allows you to associate
an icon from the maki icon set. Alternatively, you may determine a way to style
a symbol in your application based on the cat
or class
.
You can directly attach the ATDW products to your Mapbox map instance by adding the following style source definition.
1"atdw": {
2 "type": "vector",
3 "data": "https://mapping.withalpaca.travel/v1/set/atdw.tilejson?scheme=xyz&accessToken=YOUR_ACCESS_TOKEN",
4 "scheme": "xyz"
5}
As an example, you can also add a style layer to your map, which will display corresponding ATDW products.
Displaying accommodation throughout Victoria
1{
2 "id": "vic_accomm",
3 "type": "symbol",
4 "source": "atdw",
5 "source-layer": "default",
6 "layout": {
7 "icon-image": "{maki}",
8 "text-field": ["get", "name"],
9 "text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"],
10 "text-offset": [0, 1.25],
11 "text-anchor": "top"
12 },
13 "filter": ["all", ["==", "state", "VIC"], ["==", "cat", "ACCOMM"]]
14}
You can use the Alpaca Travel GraphQL API documentation which provides you an easy mechanism to access product information from ATDW. This can enable you to present images, opening hours and more about each of the products contained in the ATDW database.
1query {
2 place(id: "place/atdw:product:5b347afb3e8293ed17072934") {
3 # Access information about the business
4 name
5 address {
6 addressLineOne
7 addressLineTwo
8 addressLineThree
9 locality
10 region
11 regionCode
12 country
13 countryCode
14 }
15 contact {
16 phoneNumber
17 emailAddress
18 websiteUrl
19 bookingUrl
20 facebookUrl
21 instagramUrl
22 twitterUrl
23 }
24
25 # Draw out a thumbnail
26 preferredMedia {
27 resource {
28 ... on MediaImage {
29 thumbnail: source(bestFit: [200, 200]) {
30 url
31 }
32 altText
33 attribution
34 }
35 }
36 }
37
38 # Include the tracking pixel for you distributor agreement requirements
39 attribution {
40 pixel
41 }
42
43 # Select more about the product, see the documentation how to access any
44 # attribute or other information from ATDW
45 }
46}
If you are building a simple interactive map you can also review using the fetch SDK we offer which can be included with a unpkg script tag and can make calls to the API.
1<!DOCTYPE html>
2<html>
3 <head>
4 <!-- Include the script in your head -->
5 <script src="https://unpkg.com/@alpaca-travel/graph-sdk-fetch@latest/dist/umd/graph-sdk.min.js"></script>
6 </head>
7
8 <body>
9 <script type="text/javascript">
10 // Update below
11 const ACCESS_TOKEN = "UPDATE_WITH_YOUR_ACCESS_TOKEN";
12
13 // Create the SDK
14 const sdk = alpacaGraphSdk.getClientSdk({
15 url: `https://withalpaca.com/api/graphql?accessToken=${ACCESS_TOKEN}`,
16 });
17
18 // Perform a SDK function
19 // See the rest of the API Documentation
20 // https://alpacatravel.github.io/graph-sdk/packages/fetch/docs/
21 sdk
22 .getPlace({
23 id: "place/atdw:product:5b347afb3e8293ed17072934",
24 })
25 .then(({ data }) => console.log(data))
26 .catch(console.error);
27 </script>
28 </body>
29</html>
ATDW Products
The Alpaca GraphQL API allows you to connect to ATDW in a single integration, accessing product information as well as performing search, and adding those products to your own collection.
Adding Photos
Itineraries as well as Itinerary Locations can contain a number of media elements, including Photos.
Integration
The alpaca platform is accessible through creating `Access Tokens` to profiles. There are predominantly 2-levels of access tokens available, such as using a `public` or `secret` access token.
Copyright © 2024 - Made with love ❤️ in Australia.