MapSearch 2.0 plugin
Table of contents
- Introduction
- Free MapSearch plugin
- Basic version (iframe)
- Advanced version (JavaScript)
- Parameters
- Compatibility
- Plans & pricing
Introduction
You can show your routes and/or places of interest on your own site using the MapSearch 2.0 plugin. There are three versions of this plugin.
- The free version can easily be added to your own website in a matter of minutes. For this free version, please refer to the section below.
- The basic version works the same way as the free version, but allows for more customization. If you are interested in this version, please contact sales[at-r.].
- With the advanced version, you can adapt the plugin to fit your site's design, in layout, placement of the components, color, fonts, mobile friendliness, ... If you are interested in this version, please contact sales[at-r.].
Free MapSearch plugin
Via the RouteYou website
- On www.routeyou.com, surf to the group you want to show on your website.
- Click (Share).
- Click Embed.
- Copy the code.
- Paste the code into the HTML of your own website, adjust the width and height if necessary.
Getting started
This version is iframe-based. To add it to your site, add the following code where you want the plugin to appear:
<iframe src="//plugin.routeyou.com/mapsearch/free/?language=en" width="800" height="500" frameborder="0" allowfullscreen></iframe>
You can change the iframe's width and height to suit your website.
Configuring the plugin
The parameters should be passed in the URL of the iframe. Numbers, strings and booleans can be passed in a simple key=value pattern. Complex values can be passed as JSON encoded strings (remember that these will then need to be URL-encoded as well).
You can find the list of parameters in the "Parameters" section. For the free version, not all parameters are available. The available parameters are marked with .
Examples
Only motorised routes in a specific area
The example below will show you only the car and motor routes in the area of the Netherlands, places of interest will be shown without restrictions. The interface will be in Dutch.
<iframe src="//plugin.routeyou.com/mapsearch/free/?language=nl&map.bounds={%22min%22:{%22lat%22:51.35120063065597,%22lon%22:3.262939453125},%22max%22:{%22lat%22:53.5076512854543,%22lon%22:7.196044921875}}&params.route.type.id=45" width="800" height="500" frameborder="0" allowfullscreen></iframe>
In below interactive demo, you can experiment with the settings and then copy/paste in your site
Routes of a specific user
The example below will show only the routes and places of interest that belong to a specific user. The interface will be in English.
<iframe src="//plugin.routeyou.com/mapsearch/free/?language=en&params.owner.id=2482" width="1000" height="600" frameborder="0" allowfullscreen></iframe>
Routes of a specific user in a specific area, not clustered
The example below will show you the same as the previous example, except that only a specific area will be shown (done with the map.bounds parameter) and the routes will not be clustered (achieved with params.route.clustered=false).
<iframe src="//plugin.routeyou.com/mapsearch/free/?language=en&map.bounds={%22min%22:{%22lat%22:50.79,%22lon%22:3.79},%22max%22:{%22lat%22:50.99,%22lon%22:3.99}}&params.owner.id=2482&params.route.clustered=false" width="1000" height="600" frameborder="0" allowfullscreen></iframe>
Basic version (iframe)
Getting started
This version is iframe-based and works the same way as the free version. To add it to your site, add the following code where you want the plugin to appear:
<iframe src="//plugin.routeyou.com/mapsearch/basic/?token=<your RouteYou web service token, see below>&language=en" width="800" height="500" frameborder="0" allowfullscreen></iframe>
You can change the iframe's width and height to suit your website.
Configuring the plugin
The parameters should be passed in the URL of the iframe. Numbers, strings and booleans can be passed in a simple key=value pattern. Complex values can be passed as JSON encoded strings (remember that these will then need to be URL-encoded as well).
You can find the list of parameters in the "Parameters" section. Some parameters are not applicable to this version. The available parameters are marked with .
Upgrading from the free version
To upgrade from the free version, simply change the /free/
part in the URL to /basic/
and add your key or token (see below) to the list of parameters.
For example, if you currently have this:
<iframe src="//plugin.routeyou.com/mapsearch/free/?language=en&params.owner.id=2482" width="800" height="500" frameborder="0" allowfullscreen></iframe>
You will need to change it to this:
<iframe src="//plugin.routeyou.com/mapsearch/basic/?key=<your RouteYou web service key, see below>&language=en&params.owner.id=2482" width="800" height="500" frameborder="0" allowfullscreen></iframe>
Examples
Only motorised routes in a specific area
The example below will show you only the car and motor routes in the area of the Netherlands, places of interest will be shown without restrictions. The interface will be in Dutch.
<iframe src="//plugin.routeyou.com/mapsearch/basic/?token=<your RouteYou web service token, see below>&language=nl&map.bounds={%22min%22:{%22lat%22:51.35120063065597,%22lon%22:3.262939453125},%22max%22:{%22lat%22:53.5076512854543,%22lon%22:7.196044921875}}&params.route.type.id=45" width="800" height="500" frameborder="0" allowfullscreen></iframe>
Routes of a specific user
The example below will show only the routes and places of interest that belong to a specific user. The interface will be in English.
<iframe src="//plugin.routeyou.com/mapsearch/basic/?token=<your RouteYou web service token, see below>&language=en&params.owner.id=2482" width="1000" height="600" frameborder="0" allowfullscreen></iframe>
Routes of a specific user in a specific area, not clustered
The example below will show you the same as the previous example, except that only a specific area will be shown (done with the map.bounds parameter) and the routes will not be clustered (achieved with params.route.clustered=false).
<iframe src="//plugin.routeyou.com/mapsearch/basic/?token=<your RouteYou web service token, see below>&language=en&map.bounds={%22min%22:{%22lat%22:50.79,%22lon%22:3.79},%22max%22:{%22lat%22:50.99,%22lon%22:3.99}}&params.owner.id=2482&params.route.clustered=false" width="1000" height="600" frameborder="0" allowfullscreen></iframe>
Advanced version (JavaScript)
Getting started
To add the advanced version of the plugin to your site, two pieces of code need to be added. First, you need to provide HTML div elements where the MapSearch components will be placed. You can set their id's to any name you prefer, but make sure they are unique. You can position these divs in any way that fits your site design. The example code below will put the parameter box above the map and the list on the right of both the parameter box and the map. You can omit any component by not creating a div for it and not passing a div id in the configuration object.
<div id="routeYouMapSearchList" style="margin-left: 10px; width: 300px; float: right;"></div> <div id="routeYouMapSearchParameterBox" style="margin-bottom: 10px;"></div> <div id="routeYouMapSearchMap"></div>
Second, add the JavaScript code that launches the plugin. To minimise the load time of your page, it is best to put this code as far down the page as possible.
<script type="text/javascript" src="//plugin.routeyou.com/mapsearch/2.0.js"></script> <script type="text/javascript"> RTY.MapSearch.load({ 'token': '<your RouteYou web service token, see below>', 'language': '<your language, see below>', 'parameterBox.div': 'routeYouMapSearchParameterBox', 'map.div': 'routeYouMapSearchMap', 'list.div': 'routeYouMapSearchList' }); </script>
Tabs
You can also show a tabbed version of the MapSearch plugin. Use the code below to show all components in tabs.
<div id="routeYouMapSearchTabButtons" style="margin-bottom: 10px;"></div> <div id="routeYouMapSearchTabPane"></div>
<script type="text/javascript" src="//plugin.routeyou.com/mapsearch/2.0.js"></script> <script type="text/javascript"> RTY.MapSearch.load({ 'token': '<your RouteYou web service token, see below>', 'language': '<your language, see below>', 'tabButtons.div': 'routeYouMapSearchTabButtons', 'tabPane.div': 'routeYouMapSearchTabPane', 'tabPane.components': ['map', 'list', 'parameterBox'] }); </script>
Configuring the plugin
To further configure the plugin, add parameters from the "Parameters" section below as needed to the JavaScript object. Some parameters are not applicable to this version. The available parameters are marked with .
Some important guidelines:
- Make sure that each line ends with a comma, except the last line.
- Do not put quotes around numbers (integer or decimal) and boolean values (i.e. true and false).
Styling the plugin
The plugin will automatically use the CSS of the surrounding page, which means fonts, colors and most other styling will match your website. Some tips and important guidelines:
- If possible, set a default text color and font on your
<body>
element, this guarantees that all elements will at minimum use that styling. - Never target specific elements of the plugin through their class names or through pseudo-classes such as first-child or nth-child, as elements' class names, order and place in the DOM hierarchy may change without notice, breaking your implementation. There are many parameters available to hide certain elements and to change the order of some elements (see below).
- If you need to apply styling specifically to (parts of) the plugin, target only semantically appropriate tags (h2, p, ...) and keep it as general as possible.
Mobile-friendly
The plugin can be made responsive (different settings on small and large screens) by setting a responsive breakpoint with the layout.breakpoints parameter. Contact sales[at-r.] for more information.
Examples
Only motorised routes in a specific area, tabbed version
The example below will show you only the car and motor routes in the area of the Ghent, places of interest will be shown without restrictions. The interface will be in Dutch.
<script type="text/javascript" src="//plugin.routeyou.com/mapsearch/2.0.js"></script> <script type="text/javascript"> RTY.MapSearch.load({ //RouteYou key 'key': 'f3af0f9cb548aab76a774096206887e1', 'language': 'nl', 'tabButtons.div': 'routeYouMapSearchTabButtons', 'tabPane.div': 'routeYouMapSearchTabPane', 'tabPane.components': ['map', 'list', 'parameterBox'], 'map.bounds': { min: { lat: 50.9795, lon: 3.5798 }, max: { lat: 51.1881, lon: 3.8492, } }, 'params.route.type.id': 45, 'params.route.clustered':false }); </script>
Routes of a specific user, with modified links
The example below will show only the routes and places of interest that belong to you. The map will automatically pan and zoom to fit them as well as possible. When a user clicks on a route or place of interest, he will be directed to your site.
<script type="text/javascript" src="//plugin.routeyou.com/mapsearch/2.0.js"></script> <script type="text/javascript"> RTY.MapSearch.load({ 'token': '<your RouteYou web service token>', 'language': 'en', 'map.div': 'routeYouMapSearchMap', 'list.div': 'routeYouMapSearchList', 'params.owner.id': <your user id>, 'route.view.link': 'http://www.yoursite.com/your-route-page?route=%id%', 'poi.view.link': 'http://www.yoursite.com/your-poi-page?poi=%id%' }); </script>
Routes only
The example below will show only routes. The user will not be able to hide the routes. No places of interest will be shown, and the Places of interest header will not be visible in the list.
<script type="text/javascript" src="//plugin.routeyou.com/mapsearch/2.0.js"></script> <script type="text/javascript"> RTY.MapSearch.load({ 'token': '<your RouteYou web service token>', 'language': 'en', 'map.div': 'routeYouMapSearchMap', 'list.div': 'routeYouMapSearchList', 'content.routes.optional': false, 'content.pois.show': false, 'content.pois.optional': false }); </script>
Parameters
Some parameters are not available in all versions. Each parameter is marked with the version(s) in which it is available:
- Free iframe plugin
- Basic iframe plugin
- Advanced JavaScript plugin
General
- token
Your RouteYou web service token. Do not put your web service key here. Consult this topic for more information on how to generate a token with your key.
Required (unless key is provided). - key
Your RouteYou web service key. You can put your web service key here if you cannot generate a server side web service token, but keep in mind that it is safer to use the token method, and your key may be blocked if it is abused by someone else.
Required (unless token is provided). - language
Lowercase ISO code of the interface language.
Possible values: 'en', 'nl', 'fr', 'de', 'es', 'it', 'ca'. Optional. Default: 'en'. - unit.system
The unit system to use. When using 'metric', all distances will be displayed in kilometers; when using 'imperial', all distances will be displayed in miles.
Possible values: 'metric', 'imperial'. Optional. Default: 'metric'.
Content
You can decide what to show with the following parameters.
- content.routes.show
If true, routes are shown when launching the plugin.
Possible values: true, false. Optional. Default: true. - content.routes.optional
If true, the user can toggle showing routes.
Possible values: true, false. Optional. Default: true. - content.pois.show
If true, places of interest are shown when launching the plugin.
Possible values: true, false. Optional. Default: true. - content.pois.optional
If true, the user can toggle showing places of interest.
Possible values: true, false. Optional. Default: true. - params.keywords
If set, only routes and/or places of interest whose name and/or description matches the keywords are shown.
Possible values: any string. Optional. Default: null. - params.language
If set, only routes and/or places of interest that have content in a specific language are shown.
Possible values: a lowercase ISO code of a language. Optional. Default: null. - params.owner.id
If set, only routes and/or places of interest that belong to a specific user are shown.
Possible values: any integer that is a valid user id. Optional. Default: null. - params.group.id
If set, only routes and/or places of interest from a specific group are shown.
Possible values: any integer that is a valid group id. Optional. Default: null. - params.characteristic.id
If set, only routes and/or places of interest with a specific characteristic are shown.
Possible values: any integer that is a valid characteristic id. Optional. Default: null. - params.theme.id
If set, only routes and/or places of interest with a specific theme are shown.
Possible values: any integer that is a valid theme id. Optional. Default: null. - params.route.includePrivate
Also show private routes. Which routes are shown depends on the used web service key/token. Contact us for more information.
Possible values: true, false. Optional. Default: false. - params.route.type.id
If set, only routes of this type and its subtypes (if any) are shown.
Possible values: any integer larger than 0. Optional. Default: null. - params.route.score.min
If set, only routes whose score is at least this are shown.
Possible values: any integer between 0 and 5, inclusive. Optional. Default: null. - params.route.score.max
If set, only routes whose score is at most this are shown.
Possible values: any integer between 0 and 5, inclusive. Optional. Default: null. - params.route.length.min
If set, only routes whose length is at least this are shown. Depending on the unit.system parameter, this value is interpreted in either kilometers (metric) or miles (imperial).
Possible values: any integer equal to or larger than 0. Optional. Default: null. - params.route.length.max
If set, only routes whose length is at most this are shown. Depending on the unit.system parameter, this value is interpreted in either kilometers (metric) or miles (imperial).
Possible values: any integer equal to or larger than 0. Optional. Default: null. - params.route.clustered
If true, clusters which contain routes are shown.
Possible values: true, false. Optional. Default: true. - params.route.limit
The maximum number of routes to display.
Possible values: any integer larger than 0. Optional. Default: 20. - params.poi.includePrivate
Also show private places of interest. Which places of interest are shown depends on the used web service key/token. Contact us for more information.
Possible values: true, false. Optional. Default: false. - params.poi.type.id
If set, only places of interest of this type and its subtypes (if any) are shown.
Possible values: any integer larger than 0. Optional. Default: null. - params.poi.score.min
If set, only places of interest whose score is at least this are shown.
Possible values: any integer between 0 and 5, inclusive. Optional. Default: null. - params.poi.score.max
If set, only places of interest whose score is at most this are shown.
Possible values: any integer between 0 and 5, inclusive. Optional. Default: null. - params.poi.clustered
If true, clusters which contain places of interest are shown.
Possible values: true, false. Optional. Default: false. - params.poi.limit
The maximum number of places of interest to display.
Possible values: any integer larger than 0. Optional. Default: 20.
Layout and behaviour
The plugin adapts to the height of the user's browser window or the iframe. When resizing, the map takes the height of the parameter box into account, while the list takes the height of the tab buttons into account. The following parameters influence this behaviour.
- tabPane.position
The position of the list. Setting this to null will hide the info column, including all tabs. Setting this to 'left' or 'right' will put the info column on the left or right of the map.
Possible values: null, 'left', 'right'. Optional. Default: 'right'. - layout.breakpoints
A list of responsive breakpoints. Different settings can be applied when the screen width crosses such a breakpoint. Contact sales[at-r.] for more information.
Possible values: a list of integers equal to or larger than 0. Optional. Default: [0]. - layout.map.height.enable
Whether or not to adjust the map's height to the browser window height. If you disable this, you will need to set the height of the map div explicitly.
Possible values: true, false. Optional. Default: true. - layout.map.height.minimum
The minimal height of the map. The map's height will never be smaller than this, even when the browser window height gets smaller.
Possible values: any integer larger than 0. Optional. Default: 200. - layout.map.height.remainder
The space to leave when making the map fit the browser window height. Setting this to zero will make the map fit the available vertical space exactly. Setting it to anything higher will leave room above and/or below the map.
Possible values: any integer equal to or larger than 0. Optional. Default: 100. - layout.map.height.subtract.tabButtons
Whether or not to take the height of the tab buttons into account when calculating the map's height.
Possible values: true, false. Optional. Default: false. - layout.map.height.subtract.parameterBox
Whether or not to take the height of the parameter box into account when calculating the map's height.
Possible values: true, false. Optional. Default: true. - layout.list.height.enable
Whether or not to adjust the list's height to the browser window height.
Possible values: true, false. Optional. Default: true. - layout.list.height.minimum
The minimal height of the list. The list's height will never be smaller than this, even when the browser window height gets smaller.
Possible values: any integer larger than 0. Optional. Default: 200. - layout.list.height.remainder
The space to leave when making the list fit the browser window height. Setting this to zero will make the list fit the available vertical space exactly. Setting it to anything higher will leave room above and/or below the list.
Possible values: any integer equal to or larger than 0. Optional. Default: 100. - layout.list.height.subtract.tabButtons
Whether or not to take the height of the tab buttons into account when calculating the list's height.
Possible values: true, false. Optional. Default: true. - layout.list.height.subtract.parameterBox
Whether or not to take the height of the parameter box into account when calculating the list's height.
Possible values: true, false. Optional. Default: false.
Colors and more
The following parameters change the style (color scheme and related properties) of all components.
- style.line.color
The color of lines, if nothing more specific is set.
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: '#644c2a'. - style.line.width
The width of lines, if nothing more specific is set.
Possible values: any integer larger than 0. Optional. Default: 3. - style.line.opacity
The opacity of lines, if nothing more specific is set.
Possible values: any decimal number between 0 and 1, inclusive. Optional. Default: 1. - style.fill.color
The color of fill areas, if nothing more specific is set.
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: '#647c00'. - style.fill.opacity
The opacity of fill areas, if nothing more specific is set.
Possible values: any decimal number between 0 and 1, inclusive. Optional. Default: 0.4.
Parameter box (filters) component
- parameterBox.div
The HTML div element on which to place the parameter box.
Possible values: any valid div id, a DOM element, or null. Optional. Default: null. - parameterBox.show.basic
A list of parameter controls (see below) that should be shown by default. They will be shown in the same order in which they appear in the list (except where noted below).
Possible values: a JavaScript array containing one or more of the parameter control names listed below,['
(control name)', '
(control name)',
(...)]
. Optional. Default: ['route.type.choose', 'route.type.select', 'poi.type.select', 'keywords.search', 'route.length.slider', 'score.slider']. - parameterBox.show.advanced
A list of parameter controls (see below) that should be shown by default. They will be shown in the same order in which they appear in the list (except where noted below).
Possible values: a JavaScript array containing one or more of the parameter control names listed below,['
(control name)', '
(control name)',
(...)]
. Optional. Default: [].
Parameter control names and what they do:- panLocation.search
When the user enters a country, city, address, ... in the input field, the map will pan to this place of interest (if it exists). - keywords.search
When the user enters a keyword in the input field, only routes and/or places of interest whose name and/or description matches it are displayed. - language.select
When the user selects a language from the list, only routes and/or places of interest that are available in that language are shown. - characteristic.select
When the user selects a characteristic from the list, only routes and/or places of interest with that characteristic are shown. - theme.select
When the user selects a theme from the list, only routes and/or places of interest with that theme are shown. - score.slider
Allows the user to filter the routes and/or places of interest by score. - route.type.choose
Allows the user to choose a route type using large buttons. Due to this control's size, it is always aligned to the left, regardless of its position in the list. - route.type.select
Allows the user to choose a route type using a selection list. When both this control and route.type.choose are in the list, they will form a single control combining the features of both. - route.length.slider
Allows the user to filter the routes by length. - poi.type.choose
Allows the user to choose a place of interest type using large buttons. Due to this control's size, it is always aligned to the left, regardless of its position in the list. - poi.type.select
Allows the user to choose a place of interest type using a selection list. When both this control and poi.type.choose are in the list, they will form a single control combining the features of both.
- panLocation.search
Map component
- map.div
The HTML div element on which to place the map.
Possible values: any valid div id, a DOM element, or null. Optional. Default: null. - map.api.key
The Google API key with which to load the Google Maps API. Google Maps layers will only be available if this is set. Consult this topic for more information on the Google API key and how to obtain one.
Possible values: any valid Google API key. Optional. Default: null. - map.availableTypes
A list of map base layers and overlays the user can choose from.
Possible values: a JavaScript array containing one or more of the map layer names listed below,['
(layer name)', '
(layer name)',
(...)]
. Optional. Default: ['roadmap', 'satellite', 'osm', 'terrain', 'hybrid', 'satellite45'].
Base layer names:- osm
OpenStreetMap. - roadmap
Google Maps roadmap. Only available with a Google API key. - satellite
Google Maps satellite. Only available with a Google API key.
- terrain
Google Maps terrain overlay (on the roadmap base layer). Only available with a Google API key. - hybrid
Show labels on the Google Maps satellite base layer. Only available with a Google API key. - satellite45
Show tilted imagery on the Google Maps satellite base layer. Only available with a Google API key.
- osm
- map.type
The initial map type.
Possible values: one of the base layer names listed above. Optional. Default: 'roadmap' if the Google API key is set, 'osm' otherwise. - map.overlays
The initial map overlays.
Possible values: a JavaScript array containing one or more of the overlay names listed above,['
(overlay name)', '
(overlay name)',
(...)]
. Optional. Default: ['hybrid']. - map.center
The initial center of the map. If both center and bounds (see below) are set, the bounds will take precedence.
Possible values: a JavaScript object of the form{ lat:
(decimal number), lon:
(decimal number)}
. Optional. Default: null. - map.zoom
The initial zoom level of the map. This can be used together with map.center to define the initial area to show on the map.
Possible values: any integer between 0 and 18, inclusive. Optional. Default: 1. - map.bounds
The initial area to show on the map. If both center and bounds are set to null, the map will pan and zoom to the optimal bounds for the search parameters.
Possible values: a JavaScript object of the form{ min: { lat:
(decimal number), lon:
(decimal number)}, max: { lat:
(decimal number), lon:
(decimal number)} }
. Optional. Default: null. - map.route.line.normal.standard.color
The default color of the route line when shown on a map.
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: the value of style.line.color. - map.route.line.normal.standard.width
The default width of the route line when shown on a map.
Possible values: any integer larger than 0. Optional. Default: the value of style.line.width. - map.route.line.normal.standard.opacity
The default opacity of the route line when shown on a map.
Possible values: any decimal number between 0 and 1, inclusive. Optional. Default: 0.9. - map.route.line.normal.standard.fill.color
The default color of the route line's fill when shown on a map. Combine with the next parameter to create a two-toned line.
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: the value of style.fill.color. - map.route.line.normal.standard.fill.width
The default width of the route line's fill when shown on a map.
Possible values: any integer equal to or larger than 0. Optional. Default: 0. - map.route.line.normal.standard.fill.opacity
The default opacity of the route line's fill when shown on a map.
Possible values: any decimal number between 0 and 1, inclusive. Optional. Default: 0.9. - map.route.line.normal.standard.arrow.color
The default color of the arrows on the route line when shown on a map.
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: the value of style.line.color. - map.route.line.normal.standard.arrow.width
The default width of the arrows on the route line when shown on a map.
Possible values: any integer larger than 0. Optional. Default: the value of style.line.width. - map.route.line.normal.standard.arrow.opacity
The default opacity of the arrows on the route line when shown on a map.
Possible values: any decimal number between 0 and 1, inclusive. Optional. Default: 0.9. - map.route.line.normal.standard.arrow.fill.color
The default color of the route line arrows' fill when shown on a map. Combine with the next parameter to create a two-toned arrow.
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: the value of style.fill.color. - map.route.line.normal.standard.arrow.fill.width
The default width of the route line arrows' fill when shown on a map.
Possible values: any integer equal to or larger than 0. Optional. Default: 0. - map.route.line.normal.standard.arrow.fill.opacity
The default opacity of the route line arrows' fill when shown on a map.
Possible values: any decimal number between 0 and 1, inclusive. Optional. Default: 0.9. - map.route.line.normal.roadmap.color
The color of the route line, when it is shown on a map with type 'roadmap' (including the 'terrain' overlay).
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: the value of style.line.color. - map.route.line.normal.roadmap.arrow.color
The color of the arrows on the route line, when it is shown on a map with type 'roadmap' (including the 'terrain' overlay).
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: the value of style.line.color. - map.route.line.normal.satellite.color
The color of the route line, when it is shown on a map with type 'satellite' (including the 'hybrid' overlay).
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: '#ff6000'. - map.route.line.normal.satellite.arrow.color
The color of the arrows on the route line, when it is shown on a map with type 'satellite' (including the 'hybrid' overlay).
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: '#ff6000'. - map.route.line.hovered.standard.color
The default color of the hovered route line when shown on a map.
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: the value of style.line.color. - map.route.line.hovered.standard.width
The default width of the hovered route line when shown on a map.
Possible values: any integer larger than 0. Optional. Default: the value of style.line.width. - map.route.line.hovered.standard.opacity
The default opacity of the hovered route line when shown on a map.
Possible values: any decimal number between 0 and 1, inclusive. Optional. Default: 0.9. - map.route.line.hovered.standard.fill.color
The default color of the hovered route line's fill when shown on a map. Combine with the next parameter to create a two-toned line.
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: the value of style.fill.color. - map.route.line.hovered.standard.fill.width
The default width of the hovered route line's fill when shown on a map.
Possible values: any integer equal to or larger than 0. Optional. Default: 0. - map.route.line.hovered.standard.fill.opacity
The default opacity of the hovered route line's fill when shown on a map.
Possible values: any decimal number between 0 and 1, inclusive. Optional. Default: 0.9. - map.route.line.hovered.standard.arrow.color
The default color of the arrows on the hovered route line when shown on a map.
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: the value of style.line.color. - map.route.line.hovered.standard.arrow.width
The default width of the arrows on the hovered route line when shown on a map.
Possible values: any integer larger than 0. Optional. Default: the value of style.line.width. - map.route.line.hovered.standard.arrow.opacity
The default opacity of the arrows on the hovered route line when shown on a map.
Possible values: any decimal number between 0 and 1, inclusive. Optional. Default: 0.9. - map.route.line.hovered.standard.arrow.fill.color
The default color of the hovered route line arrows' fill when shown on a map. Combine with the next parameter to create a two-toned arrow.
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: the value of style.fill.color. - map.route.line.hovered.standard.arrow.fill.width
The default width of the hovered route line arrows' fill when shown on a map.
Possible values: any integer equal to or larger than 0. Optional. Default: 0. - map.route.line.hovered.standard.arrow.fill.opacity
The default opacity of the hovered route line arrows' fill when shown on a map.
Possible values: any decimal number between 0 and 1, inclusive. Optional. Default: 0.9. - map.route.line.selected.standard.color
The default color of the selected route line when shown on a map.
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: the value of style.line.color. - map.route.line.selected.standard.width
The default width of the selected route line when shown on a map.
Possible values: any integer larger than 0. Optional. Default: the value of style.line.width. - map.route.line.selected.standard.opacity
The default opacity of the selected route line when shown on a map.
Possible values: any decimal number between 0 and 1, inclusive. Optional. Default: 0.9. - map.route.line.selected.standard.fill.color
The default color of the selected route line's fill when shown on a map. Combine with the next parameter to create a two-toned line.
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: the value of style.fill.color. - map.route.line.selected.standard.fill.width
The default width of the selected route line's fill when shown on a map.
Possible values: any integer equal to or larger than 0. Optional. Default: 0. - map.route.line.selected.standard.fill.opacity
The default opacity of the selected route line's fill when shown on a map.
Possible values: any decimal number between 0 and 1, inclusive. Optional. Default: 0.9. - map.route.line.selected.standard.arrow.color
The default color of the arrows on the selected route line when shown on a map.
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: the value of style.line.color. - map.route.line.selected.standard.arrow.width
The default width of the arrows on the selected route line when shown on a map.
Possible values: any integer larger than 0. Optional. Default: the value of style.line.width. - map.route.line.selected.standard.arrow.opacity
The default opacity of the arrows on the selected route line when shown on a map.
Possible values: any decimal number between 0 and 1, inclusive. Optional. Default: 0.9. - map.route.line.selected.standard.arrow.fill.color
The default color of the selected route line arrows' fill when shown on a map. Combine with the next parameter to create a two-toned arrow.
Possible values: any valid hexadecimal color, starting with a #. Optional. Default: the value of style.fill.color. - map.route.line.selected.standard.arrow.fill.width
The default width of the selected route line arrows' fill when shown on a map.
Possible values: any integer equal to or larger than 0. Optional. Default: 0. - map.route.line.selected.standard.arrow.fill.opacity
The default opacity of the selected route line arrows' fill when shown on a map.
Possible values: any decimal number between 0 and 1, inclusive. Optional. Default: 0.9. - map.route.drawAll
If true, the complete geometry of each route will be shown on the map.
Possible values: true, false. Optional. Default: false.
List component
- list.div
The HTML div element on which to place the list.
Possible values: any valid div id, a DOM element, or null. Optional. Default: null. - list.show.headers
If true, the 'Routes' and 'Places of interest' headers will be shown on the list.
Possible values: true, false. Optional. Default: true. - list.show.moreLessButtons
If true, the + and - buttons to increase/decrease the number of routes and places of interest will be shown on the list headers.
Possible values: true, false. Optional. Default: true.
Route blocks
The following parameters change the behaviour of the route components (both in the list and on the map).
- route.show.typeIcon
If true, the route type icons are shown.
Possible values: true, false. Optional. Default: true. - route.show.ownerAvatar
If true, the route owner's avatar is shown next to each route. You are not allowed to disable avatars if you display routes of which you are not the owner.
Possible values: true, false. Optional. Default: true. - route.show.flag
If true, each route's flag is shown.
Possible values: true, false. Optional. Default: true. - route.show.typeName
If true, the route type names are shown.
Possible values: true, false. Optional. Default: true. - route.show.score
If true, each route's score is shown.
Possible values: true, false. Optional. Default: true. - route.show.length
If true, each route's length is shown.
Possible values: true, false. Optional. Default: true. - route.show.languages
If true, each route's language(s) is/are shown.
Possible values: true, false. Optional. Default: true.
Place of interest blocks
The following parameters change the behaviour of the place of interest components (both in the list and on the map).
- poi.show.typeIcon
If true, the place of interest type icons are shown.
Possible values: true, false. Optional. Default: true. - poi.show.ownerAvatar
If true, the place of interest owner's avatar is shown next to each place of interest. You are not allowed to disable avatars if you display places of interest of which you are not the owner.
Possible values: true, false. Optional. Default: true. - poi.show.flag
If true, each place of interest's flag is shown.
Possible values: true, false. Optional. Default: true. - poi.show.typeName
If true, the place of interest type names are shown.
Possible values: true, false. Optional. Default: true. - poi.show.score
If true, each place of interest's score is shown.
Possible values: true, false. Optional. Default: true. - poi.show.languages
If true, each place of interest's language(s) is/are shown.
Possible values: true, false. Optional. Default: true.
Tabs
- tabButtons.div
The HTML div element on which to place the tab buttons.
Possible values: any valid div id, a DOM element, or null. Optional. Default: null. - tabPane.div
The HTML div element on which to place the tabbed components.
Possible values: any valid div id, a DOM element, or null. Optional. Default: null. - tabPane.components
A list of components that should be shown as tabs.
Possible values: a JavaScript array containing one or more of the component names listed below,['
(component name)', '
(component name)',
(...)]
. Optional. Default: ['list']. - tabPane.activeTab
Which tab to show when the plugin loads. If set to null, the first tab from the components list will be shown.
Possible values: one of the component names listed below, or null. Optional. Default: null.
Component names:- parameterBox
- map
- list
Links
By default, all routes and places of interest link back to the RouteYou website. The following parameters influence this behaviour. You can use these parameters to link directly to the RouteViewer plugin.
- route.view.link
The URL users are directed to when clicking on a route. Put the string "%id%" (without the quotes) in this URL, it will be replaced with the route's id.
Optional. Default: www.routeyou.com route link. - route.view.target
The URL target for route links.
Possible values: any valid frame name, including '_blank', '_top', '_self', ... Optional. Default: '_top'. - poi.view.link
The URL users are directed to when clicking on a place of interest. Put the string "%id%" (without the quotes) in this URL, it will be replaced with the place of interest's id.
Optional. Default: www.routeyou.com place of interest link. - poi.view.target
The URL target for place of interest links.
Possible values: any valid frame name, including '_blank', '_top', '_self', ... Optional. Default: '_top'.
Compatibility
The MapSearch 2.0 plugin is compatible with all major browsers. However, to ensure full compatibility, it is vital that the pages on which you place the plugin begin with a valid DOCTYPE, for example:
<!DOCTYPE html> <html ...
Plans & pricing
For a list of the RouteYou functionalities per type of account, take a look at the RouteYou Functionality Overview per account type.