RapidMaps 3 API Guide

Introduction

RapidMaps 2.2.x or higher is required.

You can interact with your RapidMaps page using JavaScript.
For example you can:

  • zoom on a group or a pin
  • get directions to a pin (available in next update)
  • show/hide groups/pins/areas/paths/routes/circles/photos (soon available)
  • show photos of different user or with different tags (soon available)

More functionalities will be introduced in next updates.

WARNING: you need to have basic JavaScript knowledge in order to use this guide. We don't provide support on generic JavaScript questions.

Available functions

  • zoomGroup
  • zoomPin
  • bouncePin
  • showLabel
  • showGroup
  • showArea
  • showPath
  • showCircles

Getting started

When you interact with a group or a pin, you need to specify its ID.
ID is shown when you hold your mouse over a group or a pin in the list.
In following code group's and pin's ID are non-negative integer values indicated respectively as GROUP_ID and PIN_ID.

Group's and pin's IDs

Zoom on a group

Available in RapidMaps 2.2.0.

Code

editor.zoomGroup(GROUP_ID);

Examples

Button

<input type="button" value="Zoom on group" onclick="editor.zoomGroup(0);" />

Link

<a href="javascript:editor.zoomGroup(0);">Zoom on group</a>

Zoom on a pin

Available in RapidMaps 2.2.0.

Code

editor.zoomPin(GROUP_ID, PIN_ID);

Examples

Button

<input type="button" value="Zoom on pin" onclick="editor.zoomPin(0,1);" />

Link

<a href="javascript:editor.zoomPin(0,1);">Zoom on pin</a>

Bounce a pin

Available in RapidMaps 2.2.1.

Set GROUP_ID or PIN_ID to -1 to disable animation.

Code

editor.bouncePin(GROUP_ID, PIN_ID);

Examples

Button

<input type="button" value="Bounce pin" onclick="editor.bouncePin(0,0);" />

Link

<a href="javascript:editor.bouncePin(0,0);">Bounce pin</a>

Show pin's label

Available in RapidMaps 2.2.1.

Set GROUP_ID or PIN_ID to -1 to hide all labels.

Code

editor.showLabel(GROUP_ID, PIN_ID);

Examples

Button

<input type="button" value="Show label" onclick="editor.showLabel(0,0);" />

Link

<a href="javascript:editor.showLabel(0,0);">Show label</a>

Show group's pins

Available in RapidMaps 2.4.0.

Set GROUP_ID to -1 to hide all pins or to -2 to show all pins.

Code

editor.showGroup(GROUP_ID);

Examples

Button

<input type="button" value="Show group" onclick="editor.showGroup(0);" />

Link

<a href="javascript:editor.showGroup(0);">Show group</a>

Show group's area

Available in RapidMaps 2.2.1.

Set GROUP_ID to -1 hide all areas or to -2 to show all areas.

Code

editor.showArea(GROUP_ID);

Examples

Button

<input type="button" value="Show area" onclick="editor.showArea(1);" />

Link

<a href="javascript:editor.showArea(1);">Show area</a>

Show group's path

Available in RapidMaps 2.2.1.

Set GROUP_ID to -1 hide all paths or to -2 to show all paths.

Code

editor.showPath(GROUP_ID);

Examples

Button

<input type="button" value="Show path" onclick="editor.showPath(1);" />

Link

<a href="javascript:editor.showPath(1);">Show path</a>

Show group's circles

Available in RapidMaps 2.2.1.

Set GROUP_ID to -1 hide all circles or to -2 to show all circles.

Code

editor.showCircles(GROUP_ID);

Examples

Button

<input type="button" value="Show circles" onclick="editor.showCircles(1);" />

Link

<a href="javascript:editor.showCircles(1);">Show circles</a>

Demo project

Download the following demo project that shows you how to use RapidMaps 2 API in Header/Footer section.

RapidMaps_2_API.rwsw.zip