TrailZilla Webmap API

TrailZilla’s new API lets you embed a free route finder tool into any website with virtually no HTML knowledge required!

It’s a great way to add value to your site and encourage visitors to stay longer and return time and time again. And, if you sign up for the TrailZilla Affiliate scheme too then you can also benefit from up to 30% commission on premium content sales such as OS maps or publishers route guides.

  • Free custom trail finder for your website
  • Easy to us iframe ‘Plug and play’ API requires minimal web skills
  • Let’s your users create and share trails anywhere in the world for FREE
  • Customise the size, location and zoom level of the map to suit your website
  • Free technical support from the Memory-Map digital mapping experts
  • Plus  – Join the Affiliate scheme to earn up to 30% commission!

Here’s some examples of what you can add to your site right now for free – to get started just follow the instructions below the maps.

TrailZilla API example showing multiple routes using Google Satelite maps in an iframe 600 x 600 pixels wide centred and zoomed in to the Isle of Wight.

TrailZilla API example showing a single route on Google Terrain maps by specifying the trail ID. Map size 500 x 500 pixels wide.

BASIC INTEGRATION INSTRUCTIONS WITHOUT AFFILIATE MEMBERSHIP

Simply embed the following code into the HTML of your site page where you want it to appear and upload the page. You can change the API parameters to set the size, location, zoom level, and type of map.

<iframe id=”trailzilla” src=”http://www.trailzilla.com/index.php?&view=compact&lat=53.78767&lng=-2.26318&zoom=6″ frameborder=”0″ width=”590″ height=”500″></iframe>

or to just show a single trail map use this changing the tid=xxxx to the trail ID of your trail

<iframe id=”trailzilla” src=”http://www.trailzilla.com/index.php?&view=compact&tid=xxxx width=”500″ height=”500″></iframe>

TrailZilla API on LFTO.com

ADVANCED INTEGRATION INSTRUCTIONS WITH AFFILIATE MEMBERSHIP

  1. Subscribe to TrailZilla and apply for free Affiliate membership at www.trailzilla.com/affiliate. Once approved you will be allocated an affiliate ID exclusive to your account.
  2. Embed the following code into the HTML of your site page where you want it to appear.
  3. Change the xxxx in the following code snippet within the iframe code to your 4digit affiliate id number
  4. <iframe id=”trailzilla” src=”http://www.trailzilla.com/index. php?&aid=xxxx&view=compact&lat=53.78767&lng=-2.26318&zoom=6″ frameborder=”0″ width=”590″ height=”500″></iframe>
  5. Upload the page when you are happy with the settings.

CUSTOMISING THE MAP WITH TRAILZILLA API PARAMETERS

You can customise the TrailZilla API to set size, initial map type shown, location and zoom level. The TrailZilla menu buttons and zoom bar will reposition automatically.

For example <iframe id=”trailzilla” src=”http://www.trailzilla.com/index.php?aid=1038&view=compact&lat=50.68379&lng=-1.28918&zoom=4&basemap=google_terrain” frameborder=”0″ width=”590″ height=”500″></iframe>

The src=”" sets Affiliate ID, map type, zoom level and location. The first parameter should be preceded by a question mark (?) and then each parameter delimited by an ampersand (&). The following parameters can be used with the src=”" string:

view=compact – (required) defines that this an API view of Trailzilla
aid=xxxx – (optional) adds your TrailZilla Affiliate ID
tid=xxxx – (optional) use to show a single route map by specifying the trail ID
lat=xx&lng=yy – (optional) sets where in the world the map opens. Use latitude and longitude in decimal degrees eg lat=53.78767&lng=-2.26318 centres the map on the Isle of Wight. If lat&lng are omitted then initial location is set automatically by IP address lookup.
zoom=x – (optional)  alters the zoom level of the initial map, higher values zoom in to more map detail (Range 2-15) eg zoom=6 covers the majority of the UK
basemap=google_terrain – (optional)  defines which initial Google map will be shown. Choose from: google_terrain, google_map, google_satellite.  Default if omitted is google_terrain
nonmembers=off – (optional)  API map window will now only show your data and that of your members. The Show button in the API can be used to turn all data on/off.

The iframe size is set with the frameborder=”0″ width=”590″ height=”500″ parameters that follow the src=”" string. Size and border set in pixels. Minimum size without scroll bars appearing is 460 x 460.

WORDPRESS INTEGRATION
Wordpress does not natively support iframes. Please download and install the TrailZilla API iFrame plugin to your WordPress blog to enable iframes within pages and blog posts. Use the following code format to insert your API code, remembering to change xxxx for your affiliate ID if required.

IMPORTANT: In the code snippets below change the angle < > brackets to square [ ] brackets when you cut/paste into WordPress.

iFrame code for basic API
<iframe: id=”trailzilla” src=”http://www.trailzilla.com/index.php? &view=compact&lat=53.78767&lng=-2.26318&zoom=6″ frameborder=”0″ width=”550″ height=”500″></iframe>

iFrame code for TrailZilla Affiliates
<iframe: id=”trailzilla” src=”http://www.trailzilla.com/index.php?aid=xxxx&view=compact&lat=53.78767&lng=-2.26318&zoom=6″ frameborder=”0″ width=”550″ height=”500″></iframe>

TrailZilla.com API for facebookFACEBOOK INTEGRATION
Facebook does not natively support iframes on fan pages without using a developer App like ‘Static IFRAME Tab’. Install the App, or another similar app depending on your preference to your facebook fan page and use the standard iframe code with or without your affiliate number as per the instructions above. Please note that Facebook frames and tabs are no more than 520px wide so make sure your iframe is smaller than this to avoid cropping.

Why use my affiliate ID in the code?
By including your affiliate ID in any code links for banners, login boxes or the API on your website you can be assured that if anyone uses those links and subsequently subscribes to TrailZilla’s paid content such as maps or routes you will qualify for commission on the sale of that subscription as per the Affiliate Scheme Ts & Cs. For more information please visit www.trailzilla.com/affiliate

How can I just show my sites routes?
To give your site visitors the widest possible choice of routes, by default, the TrailZilla API shows all TrailZilla members routes. Contact marketing@trailzilla.com if you have a specialist application and only want to show your own routes.

How can I find which lat/long to use?
You only need to add a lat/long if you ALWAYS want TrailZilla to open the map at that point. If your site visitors are searching worldwide then leave it out and the map will automatically locate them based on ttheir IP address.

If your site is geographically based, for example ‘Best walks in the Isle of Wight’ then you might want to add a lat/long to make the map always opens showing the Isle of Wight.

Make sure you use decimal degrees eg The centre of the Isle of Wight is approximately  lat=50.68379 & lng=-1.2891.

We recommend using www.findlatitudeandlongitude.com as this site will show you your lat/long and let you quickly see different map zoom level parameters too.

If you get stuck just email us your location and explain what area you’re trying to show and we’ll tell you your lat/long and recomended map zoom level too.

 

For more information on the TrailZilla API please contact marketing@trailzilla.com