0byt3m1n1
Path:
/
var
/
lib
/
vz
/
www
/
clients
/
client6
/
web11
/
web
/
wp-content
/
plugins
/
wp-google-maps
/
docs
/
js
/
[
Home
]
File: WPGMZA.Map.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>Documentation Class: Map</title> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css"> <link type="text/css" rel="stylesheet" href="styles/site.simplex.css"> </head> <body> <div class="navbar navbar-default navbar-fixed-top "> <div class="container"> <div class="navbar-header"> <a class="navbar-brand" href="index.html">Documentation</a> <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="navbar-collapse collapse" id="topNavigation"> <ul class="nav navbar-nav"> <li class="dropdown"> <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a> <ul class="dropdown-menu "> <li><a href="module-Circle.html">Circle</a></li><li><a href="module-Compatibility.html">Compatibility</a></li><li><a href="module-CSS.html">CSS</a></li><li><a href="module-Distance.html">Distance</a></li><li><a href="module-Event.html">Event</a></li><li><a href="module-EventDispatcher.html">EventDispatcher</a></li><li><a href="module-FriendlyError.html">FriendlyError</a></li><li><a href="module-Geocoder.html">Geocoder</a></li><li><a href="module-GoogleAPIErrorHandler.html">GoogleAPIErrorHandler</a></li><li><a href="module-GoogleCircle.html">GoogleCircle</a></li><li><a href="module-GoogleGeocoder.html">GoogleGeocoder</a></li><li><a href="module-GoogleInfoWindow.html">GoogleInfoWindow</a></li><li><a href="module-GoogleMap.html">GoogleMap</a></li><li><a href="module-GoogleMarker.html">GoogleMarker</a></li><li><a href="module-GoogleModernStoreLocator.html">GoogleModernStoreLocator</a></li><li><a href="module-GoogleModernStoreLocatorCircle.html">GoogleModernStoreLocatorCircle</a></li><li><a href="module-GooglePolygon.html">GooglePolygon</a></li><li><a href="module-GooglePolyline.html">GooglePolyline</a></li><li><a href="module-GoogleUICompatibility.html">GoogleUICompatibility</a></li><li><a href="module-GoogleVertexContextMenu.html">GoogleVertexContextMenu</a></li><li><a href="module-Gutenberg.html">Gutenberg</a></li><li><a href="module-InfoWindow.html">InfoWindow</a></li><li><a href="module-Integration.html">Integration</a></li><li><a href="module-LatLng.html">LatLng</a></li><li><a href="module-LatLngBounds.html">LatLngBounds</a></li><li><a href="module-Map.html">Map</a></li><li><a href="module-MapObject.html">MapObject</a></li><li><a href="module-MapsEngineDialog.html">MapsEngineDialog</a></li><li><a href="module-MapSettings.html">MapSettings</a></li><li><a href="module-MapSettingsPage.html">MapSettingsPage</a></li><li><a href="module-Marker.html">Marker</a></li><li><a href="module-ModernStoreLocator.html">ModernStoreLocator</a></li><li><a href="module-ModernStoreLocatorCircle.html">ModernStoreLocatorCircle</a></li><li><a href="module-NativeMapsAppIcon.html">NativeMapsAppIcon</a></li><li><a href="module-OLCircle.html">OLCircle</a></li><li><a href="module-OLGeocoder.html">OLGeocoder</a></li><li><a href="module-OLInfoWindow.html">OLInfoWindow</a></li><li><a href="module-OLMap.html">OLMap</a></li><li><a href="module-OLMarker.html">OLMarker</a></li><li><a href="module-OLModernStoreLocator.html">OLModernStoreLocator</a></li><li><a href="module-OLModernStoreLocatorCircle.html">OLModernStoreLocatorCircle</a></li><li><a href="module-OLPolygon.html">OLPolygon</a></li><li><a href="module-OLPolyline.html">OLPolyline</a></li><li><a href="module-Polygon.html">Polygon</a></li><li><a href="module-Polyline.html">Polyline</a></li><li><a href="module-PopoutPanel.html">PopoutPanel</a></li><li><a href="module-Version.html">Version</a></li><li><a href="module-WPGMZA.html">WPGMZA</a></li><li><a href="WPGMZA.module_RestAPI.html">WPGMZA.RestAPI</a></li> </ul> </li> <li class="dropdown"> <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a> <ul class="dropdown-menu "> <li><a href="module-OLGeocoder-OLGeocoder.html">OLGeocoder~OLGeocoder</a></li><li><a href="WPGMZA.Circle.html">WPGMZA.Circle</a></li><li><a href="WPGMZA.Compatibility.html">WPGMZA.Compatibility</a></li><li><a href="WPGMZA.Distance.html">WPGMZA.Distance</a></li><li><a href="WPGMZA.Event.html">WPGMZA.Event</a></li><li><a href="WPGMZA.EventDispatcher.html">WPGMZA.EventDispatcher</a></li><li><a href="WPGMZA.FriendlyError.html">WPGMZA.FriendlyError</a></li><li><a href="WPGMZA.Geocoder.html">WPGMZA.Geocoder</a></li><li><a href="WPGMZA.GoogleAPIErrorHandler.html">WPGMZA.GoogleAPIErrorHandler</a></li><li><a href="WPGMZA.GoogleCircle.html">WPGMZA.GoogleCircle</a></li><li><a href="WPGMZA.GoogleGeocoder.html">WPGMZA.GoogleGeocoder</a></li><li><a href="WPGMZA.InfoWindow.html">WPGMZA.InfoWindow</a></li><li><a href="WPGMZA.LatLng.html">WPGMZA.LatLng</a></li><li><a href="WPGMZA.LatLngBounds.html">WPGMZA.LatLngBounds</a></li><li><a href="WPGMZA.Map.html">WPGMZA.Map</a></li><li><a href="WPGMZA.MapEngineDialog.html">WPGMZA.MapEngineDialog</a></li><li><a href="WPGMZA.MapObject.html">WPGMZA.MapObject</a></li><li><a href="WPGMZA.MapSettings.html">WPGMZA.MapSettings</a></li><li><a href="WPGMZA.MapSettingsPage.html">WPGMZA.MapSettingsPage</a></li><li><a href="WPGMZA.Marker.html">WPGMZA.Marker</a></li><li><a href="WPGMZA.ModernStoreLocator.html">WPGMZA.ModernStoreLocator</a></li><li><a href="WPGMZA.ModernStoreLocatorCircle.html">WPGMZA.ModernStoreLocatorCircle</a></li><li><a href="WPGMZA.NativeMapsAppIcon.html">WPGMZA.NativeMapsAppIcon</a></li><li><a href="WPGMZA.Polygon.html">WPGMZA.Polygon</a></li><li><a href="WPGMZA.Polyline.html">WPGMZA.Polyline</a></li><li><a href="WPGMZA.PopoutPanel.html">WPGMZA.PopoutPanel</a></li><li><a href="WPGMZA.RestAPI.html">WPGMZA.RestAPI</a></li> </ul> </li> </ul> <div class="col-sm-3 col-md-3"> <form class="navbar-form" role="search"> <div class="input-group"> <input type="text" class="form-control" placeholder="Search" name="q" id="search-input"> <div class="input-group-btn"> <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button> </div> </div> </form> </div> </div> </div> </div> <div class="container" id="toc-content"> <div class="row"> <div class="col-md-8"> <div id="main"> <h1 class="page-title">Class: Map</h1> <section> <header> <h2> Map </h2> <div class="class-description">WPGMZA.Map</div> </header> <article> <div class="container-overview"> <hr> <dt> <h4 class="name" id="Map"><span class="type-signature"></span>new Map(element [, options])</h4> </dt> <dd> <div class="description"> Base class for maps. <strong>Please <em>do not</em> call this constructor directly. Always use createInstance rather than instantiating this class directly.</strong> Using createInstance allows this class to be externally extensible. </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Argument</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>element</code></td> <td class="type"> <span class="param-type">HTMLElement</span> </td> <td class="attributes"> </td> <td class="description last">to contain map</td> </tr> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">Options to apply to this map</td> </tr> </tbody> </table> <dl class="details"> </dl> </dd> </div> <h3 class="subsection-title">Extends</h3> <ul> <li><a href="WPGMZA.EventDispatcher.html">WPGMZA.EventDispatcher</a></li> </ul> <h3 class="subsection-title">Methods</h3> <dl> <hr> <dt> <h4 class="name" id=".createInstance"><span class="type-signature"><static> </span>createInstance(element [, options])</h4> </dt> <dd> <div class="description"> Creates an instance of a map, <strong>please <em>always</em> use this function rather than calling the constructor directly</strong>. </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Argument</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>element</code></td> <td class="type"> <span class="param-type">HTMLElement</span> </td> <td class="attributes"> </td> <td class="description last">to contain map</td> </tr> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">Options to apply to this map</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <div class="param-desc"> An instance of WPGMZA.Map </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="WPGMZA.Map.html">WPGMZA.Map</a></span> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id=".getConstructor"><span class="type-signature"><static> </span>getConstructor()</h4> </dt> <dd> <div class="description"> Returns the contructor to be used by createInstance, depending on the selected maps engine. </div> <dl class="details"> </dl> <h5>Returns:</h5> <div class="param-desc"> The appropriate contructor </div> <dl> <dt> Type </dt> <dd> <span class="param-type">function</span> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id=".getGeographicDistance"><span class="type-signature"><static> </span>getGeographicDistance(lat1, lon1, lat2, lon1)</h4> </dt> <dd> <div class="description"> This gets the distance in kilometers between two latitude / longitude points TODO: Move this to the distance class, or the LatLng class </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>lat1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">Latitude from the first coordinate pair</td> </tr> <tr> <td class="name"><code>lon1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">Longitude from the first coordinate pair</td> </tr> <tr> <td class="name"><code>lat2</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">Latitude from the second coordinate pair</td> </tr> <tr> <td class="name"><code>lon1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">Longitude from the second coordinate pair</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <div class="param-desc"> The distance between the latitude and longitudes, in kilometers </div> <dl> <dt> Type </dt> <dd> <span class="param-type">number</span> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id="_triggerListeners"><span class="type-signature"></span>_triggerListeners()</h4> </dt> <dd> <div class="description"> Handles the logic of triggering listeners </div> <dl class="details"> <dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt> <dd class="inherited-from"> <ul class="dummy"> <li> <a href="WPGMZA.EventDispatcher.html#_triggerListeners">WPGMZA.EventDispatcher#_triggerListeners</a> </li> </ul> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id="addCircle"><span class="type-signature"></span>addCircle(circle)</h4> </dt> <dd> <div class="description"> Adds the specified circle to this map </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>circle</code></td> <td class="type"> <span class="param-type"><a href="WPGMZA.Circle.html">WPGMZA.Circle</a></span> </td> <td class="description last">The circle to add</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>event:polygonadded</li> </ul> <h5>Throws:</h5> <div class="param-desc"> Argument must be an instance of WPGMZA.Circle </div> </dd> <hr> <dt> <h4 class="name" id="addEventListener"><span class="type-signature"></span>addEventListener(type, callback [, thisObject] [, useCapture])</h4> </dt> <dd> <div class="description"> Adds an event listener on this object </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Argument</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">The event type, or multiple types separated by spaces</td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="attributes"> </td> <td class="description last">The callback to call when the event fires</td> </tr> <tr> <td class="name"><code>thisObject</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">The object to use as "this" when firing the callback</td> </tr> <tr> <td class="name"><code>useCapture</code></td> <td class="type"> <span class="param-type">bool</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">If true, fires the callback on the capture phase, as opposed to bubble phase</td> </tr> </tbody> </table> <dl class="details"> <dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt> <dd class="inherited-from"> <ul class="dummy"> <li> <a href="WPGMZA.EventDispatcher.html#addEventListener">WPGMZA.EventDispatcher#addEventListener</a> </li> </ul> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id="addMarker"><span class="type-signature"></span>addMarker(marker)</h4> </dt> <dd> <div class="description"> Adds the specified marker to this map </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>marker</code></td> <td class="type"> <span class="param-type"><a href="WPGMZA.Marker.html">WPGMZA.Marker</a></span> </td> <td class="description last">The marker to add</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>event:markeradded</li> <li>WPGMZA.Marker#event:added</li> </ul> <h5>Throws:</h5> <div class="param-desc"> Argument must be an instance of WPGMZA.Marker </div> </dd> <hr> <dt> <h4 class="name" id="addPolygon"><span class="type-signature"></span>addPolygon(polygon)</h4> </dt> <dd> <div class="description"> Adds the specified polygon to this map </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>polygon</code></td> <td class="type"> <span class="param-type"><a href="WPGMZA.Polygon.html">WPGMZA.Polygon</a></span> </td> <td class="description last">The polygon to add</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>event:polygonadded</li> </ul> <h5>Throws:</h5> <div class="param-desc"> Argument must be an instance of WPGMZA.Polygon </div> </dd> <hr> <dt> <h4 class="name" id="addPolyline"><span class="type-signature"></span>addPolyline(polyline)</h4> </dt> <dd> <div class="description"> Adds the specified polyline to this map </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>polyline</code></td> <td class="type"> <span class="param-type"><a href="WPGMZA.Polyline.html">WPGMZA.Polyline</a></span> </td> <td class="description last">The polyline to add</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>event:polylineadded</li> </ul> <h5>Throws:</h5> <div class="param-desc"> Argument must be an instance of WPGMZA.Polyline </div> </dd> <hr> <dt> <h4 class="name" id="deleteCircleByID"><span class="type-signature"></span>deleteCircleByID(id)</h4> </dt> <dd> <div class="description"> Removes a circle by ID </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>id</code></td> <td class="type"> <span class="param-type">int</span> </td> <td class="description last">The ID of the circle to remove</td> </tr> </tbody> </table> <dl class="details"> </dl> </dd> <hr> <dt> <h4 class="name" id="deletePolygon"><span class="type-signature"></span>deletePolygon(polygon)</h4> </dt> <dd> <div class="description"> Removes the specified polygon from this map </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>polygon</code></td> <td class="type"> <span class="param-type"><a href="WPGMZA.Polygon.html">WPGMZA.Polygon</a></span> </td> <td class="description last">The polygon to remove</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>event:polygonremoved</li> </ul> <h5>Throws:</h5> <ul> <li> <div class="param-desc"> Argument must be an instance of WPGMZA.Polygon </div> </li> <li> <div class="param-desc"> Wrong map error </div> </li> </ul> </dd> <hr> <dt> <h4 class="name" id="deletePolygonByID"><span class="type-signature"></span>deletePolygonByID(id)</h4> </dt> <dd> <div class="description"> Removes a polygon by ID </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>id</code></td> <td class="type"> <span class="param-type">int</span> </td> <td class="description last">The ID of the polygon to remove</td> </tr> </tbody> </table> <dl class="details"> </dl> </dd> <hr> <dt> <h4 class="name" id="deletePolyline"><span class="type-signature"></span>deletePolyline(polyline)</h4> </dt> <dd> <div class="description"> Removes the specified polyline from this map </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>polyline</code></td> <td class="type"> <span class="param-type"><a href="WPGMZA.Polyline.html">WPGMZA.Polyline</a></span> </td> <td class="description last">The polyline to remove</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>event:polylineremoved</li> </ul> <h5>Throws:</h5> <ul> <li> <div class="param-desc"> Argument must be an instance of WPGMZA.Polyline </div> </li> <li> <div class="param-desc"> Wrong map error </div> </li> </ul> </dd> <hr> <dt> <h4 class="name" id="deletePolylineByID"><span class="type-signature"></span>deletePolylineByID(id)</h4> </dt> <dd> <div class="description"> Removes a polyline by ID </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>id</code></td> <td class="type"> <span class="param-type">int</span> </td> <td class="description last">The ID of the polyline to remove</td> </tr> </tbody> </table> <dl class="details"> </dl> </dd> <hr> <dt> <h4 class="name" id="dispatchEvent"><span class="type-signature"></span>dispatchEvent(event)</h4> </dt> <dd> <div class="description"> Fires an event on this object </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>event</code></td> <td class="type"> <span class="param-type">string</span> | <span class="param-type"><a href="WPGMZA.Event.html">WPGMZA.Event</a></span> </td> <td class="description last">Either the event type as a string, or an instance of WPGMZA.Event</td> </tr> </tbody> </table> <dl class="details"> <dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt> <dd class="inherited-from"> <ul class="dummy"> <li> <a href="WPGMZA.EventDispatcher.html#dispatchEvent">WPGMZA.EventDispatcher#dispatchEvent</a> </li> </ul> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id="getCircleByID"><span class="type-signature"></span>getCircleByID(id)</h4> </dt> <dd> <div class="description"> Gets a circle by ID </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>id</code></td> <td class="type"> <span class="param-type">int</span> </td> <td class="description last">The ID of the circle to get</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <div class="param-desc"> The circle, or null if no circle with the specified ID is found </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="WPGMZA.Circle.html">WPGMZA.Circle</a></span> | <span class="param-type">null</span> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id="getMarkerByID"><span class="type-signature"></span>getMarkerByID(id)</h4> </dt> <dd> <div class="description"> Gets a marker by ID </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>id</code></td> <td class="type"> <span class="param-type">int</span> </td> <td class="description last">The ID of the marker to get</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <div class="param-desc"> The marker, or null if no marker with the specified ID is found </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="WPGMZA.Marker.html">WPGMZA.Marker</a></span> | <span class="param-type">null</span> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id="getPolygonByID"><span class="type-signature"></span>getPolygonByID(id)</h4> </dt> <dd> <div class="description"> Gets a polygon by ID </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>id</code></td> <td class="type"> <span class="param-type">int</span> </td> <td class="description last">The ID of the polygon to get</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <div class="param-desc"> The polygon, or null if no polygon with the specified ID is found </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="WPGMZA.Polygon.html">WPGMZA.Polygon</a></span> | <span class="param-type">null</span> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id="getPolylineByID"><span class="type-signature"></span>getPolylineByID(id)</h4> </dt> <dd> <div class="description"> Gets a polyline by ID </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>id</code></td> <td class="type"> <span class="param-type">int</span> </td> <td class="description last">The ID of the polyline to get</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <div class="param-desc"> The polyline, or null if no polyline with the specified ID is found </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="WPGMZA.Polyline.html">WPGMZA.Polyline</a></span> | <span class="param-type">null</span> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id="hasEventListener"><span class="type-signature"></span>hasEventListener(type)</h4> </dt> <dd> <div class="description"> Test for listeners of type on this object </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The event type to test for</td> </tr> </tbody> </table> <dl class="details"> <dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt> <dd class="inherited-from"> <ul class="dummy"> <li> <a href="WPGMZA.EventDispatcher.html#hasEventListener">WPGMZA.EventDispatcher#hasEventListener</a> </li> </ul> </dd> </dl> <h5>Returns:</h5> <div class="param-desc"> True if this object has listeners bound for the specified type </div> <dl> <dt> Type </dt> <dd> <span class="param-type">bool</span> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id="loadSettings"><span class="type-signature"></span>loadSettings()</h4> </dt> <dd> <div class="description"> Loads the maps settings and sets some defaults </div> <dl class="details"> </dl> </dd> <hr> <dt> <h4 class="name" id="nudge"><span class="type-signature"></span>nudge(x, y)</h4> </dt> <dd> <div class="description"> Nudges the map viewport by the given pixel coordinates </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">Number of pixels to nudge along the x axis</td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">Number of pixels to nudge along the y axis</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Throws:</h5> <div class="param-desc"> Invalid coordinates supplied </div> </dd> <hr> <dt> <h4 class="name" id="off"><span class="type-signature"></span>off()</h4> </dt> <dd> <div class="description"> Alias for removeEventListener </div> <dl class="details"> <dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt> <dd class="inherited-from"> <ul class="dummy"> <li> <a href="WPGMZA.EventDispatcher.html#off">WPGMZA.EventDispatcher#off</a> </li> </ul> </dd> <dt class="tag-see method-doc-label method-doc-details-label">See:</dt> <dd class="tag-see"> <ul> <li><a href="WPGMZA.EventDispatcher.html#removeEventListener">WPGMZA.EventDispatcher#removeEventListener</a></li> </ul> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id="on"><span class="type-signature"></span>on()</h4> </dt> <dd> <div class="description"> Alias for addEventListener </div> <dl class="details"> <dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt> <dd class="inherited-from"> <ul class="dummy"> <li> <a href="WPGMZA.EventDispatcher.html#on">WPGMZA.EventDispatcher#on</a> </li> </ul> </dd> <dt class="tag-see method-doc-label method-doc-details-label">See:</dt> <dd class="tag-see"> <ul> <li><a href="WPGMZA.EventDispatcher.html#addEventListener">WPGMZA.EventDispatcher#addEventListener</a></li> </ul> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id="onBoundsChanged"><span class="type-signature"></span>onBoundsChanged()</h4> </dt> <dd> <div class="description"> Called when the map viewport bounds change. Fires the legacy bounds_changed event. </div> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>event:boundschanged</li> <li>event:bounds_changed</li> </ul> </dd> <hr> <dt> <h4 class="name" id="onElementResized"><span class="type-signature"></span>onElementResized()</h4> </dt> <dd> <div class="description"> Called when the engine map div is resized </div> <dl class="details"> </dl> </dd> <hr> <dt> <h4 class="name" id="onIdle"><span class="type-signature"></span>onIdle()</h4> </dt> <dd> <div class="description"> Called when the map viewport becomes idle (eg movement done, tiles loaded) </div> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>event:idle</li> </ul> </dd> <hr> <dt> <h4 class="name" id="onWindowResize"><span class="type-signature"></span>onWindowResize()</h4> </dt> <dd> <div class="description"> Called when the window resizes </div> <dl class="details"> </dl> </dd> <hr> <dt> <h4 class="name" id="removeCircle"><span class="type-signature"></span>removeCircle(circle)</h4> </dt> <dd> <div class="description"> Removes the specified circle from this map </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>circle</code></td> <td class="type"> <span class="param-type"><a href="WPGMZA.Circle.html">WPGMZA.Circle</a></span> </td> <td class="description last">The circle to remove</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>event:circleremoved</li> </ul> <h5>Throws:</h5> <ul> <li> <div class="param-desc"> Argument must be an instance of WPGMZA.Circle </div> </li> <li> <div class="param-desc"> Wrong map error </div> </li> </ul> </dd> <hr> <dt> <h4 class="name" id="removeEventListener"><span class="type-signature"></span>removeEventListener(type [, listener] [, thisObject] [, useCapture])</h4> </dt> <dd> <div class="description"> Removes event listeners from this object </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Argument</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">The event type to remove listeners from</td> </tr> <tr> <td class="name"><code>listener</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">The function to remove. If omitted, all listeners will be removed</td> </tr> <tr> <td class="name"><code>thisObject</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">Use the parameter to remove listeners bound with the same thisObject</td> </tr> <tr> <td class="name"><code>useCapture</code></td> <td class="type"> <span class="param-type">bool</span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">Remove the capture phase event listener. Otherwise, the bubble phase event listener will be removed.</td> </tr> </tbody> </table> <dl class="details"> <dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt> <dd class="inherited-from"> <ul class="dummy"> <li> <a href="WPGMZA.EventDispatcher.html#removeEventListener">WPGMZA.EventDispatcher#removeEventListener</a> </li> </ul> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id="removeMarker"><span class="type-signature"></span>removeMarker(marker)</h4> </dt> <dd> <div class="description"> Removes the specified marker from this map </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>marker</code></td> <td class="type"> <span class="param-type"><a href="WPGMZA.Marker.html">WPGMZA.Marker</a></span> </td> <td class="description last">The marker to remove</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>event:markerremoved</li> <li>WPGMZA.Marker#event:removed</li> </ul> <h5>Throws:</h5> <ul> <li> <div class="param-desc"> Argument must be an instance of WPGMZA.Marker </div> </li> <li> <div class="param-desc"> Wrong map error </div> </li> </ul> </dd> <hr> <dt> <h4 class="name" id="removeMarkerByID"><span class="type-signature"></span>removeMarkerByID(id)</h4> </dt> <dd> <div class="description"> Removes a marker by ID </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>id</code></td> <td class="type"> <span class="param-type">int</span> </td> <td class="description last">The ID of the marker to remove</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>event:markerremoved</li> <li>WPGMZA.Marker#event:removed</li> </ul> </dd> <hr> <dt> <h4 class="name" id="setCenter"><span class="type-signature"></span>setCenter(latLng)</h4> </dt> <dd> <div class="description"> Centers the map on the supplied latitude and longitude </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>latLng</code></td> <td class="type"> <span class="param-type">object</span> | <span class="param-type"><a href="WPGMZA.LatLng.html">WPGMZA.LatLng</a></span> </td> <td class="description last">A LatLng literal or an instance of WPGMZA.LatLng</td> </tr> </tbody> </table> <dl class="details"> </dl> </dd> <hr> <dt> <h4 class="name" id="setDimensions"><span class="type-signature"></span>setDimensions(width, height)</h4> </dt> <dd> <div class="description"> Sets the dimensions of the map engine element </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>width</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">Width as a CSS string</td> </tr> <tr> <td class="name"><code>height</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">Height as a CSS string</td> </tr> </tbody> </table> <dl class="details"> </dl> </dd> <hr> <dt> <h4 class="name" id="setOptions"><span class="type-signature"></span>setOptions()</h4> </dt> <dd> <div class="description"> Sets options in bulk on map </div> <dl class="details"> </dl> </dd> <hr> <dt> <h4 class="name" id="trigger"><span class="type-signature"></span>trigger()</h4> </dt> <dd> <div class="description"> Alias for removeEventListener </div> <dl class="details"> <dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt> <dd class="inherited-from"> <ul class="dummy"> <li> <a href="WPGMZA.EventDispatcher.html#trigger">WPGMZA.EventDispatcher#trigger</a> </li> </ul> </dd> <dt class="tag-see method-doc-label method-doc-details-label">See:</dt> <dd class="tag-see"> <ul> <li><a href="WPGMZA.EventDispatcher.html#removeEventListener">WPGMZA.EventDispatcher#removeEventListener</a></li> </ul> </dd> </dl> </dd> </dl> </article> </section> </div> </div> <div class="clearfix"></div> <div class="col-md-3"> <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div> </div> </div> </div> <div class="modal fade" id="searchResults"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">Search results</h4> </div> <div class="modal-body"></div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div> <footer> <span class="jsdoc-message"> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on 2019-01-20T11:35:48+00:00 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>. </span> </footer> <script src="scripts/docstrap.lib.js"></script> <script src="scripts/toc.js"></script> <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script> <script> $( function () { $( "[id*='$']" ).each( function () { var $this = $( this ); $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) ); } ); $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () { var $this = $( this ); var example = $this.find( "code" ); exampleText = example.html(); var lang = /{@lang (.*?)}/.exec( exampleText ); if ( lang && lang[1] ) { exampleText = exampleText.replace( lang[0], "" ); example.html( exampleText ); lang = lang[1]; } else { var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/); lang = langClassMatch ? langClassMatch[1] : "javascript"; } if ( lang ) { $this .addClass( "sunlight-highlight-" + lang ) .addClass( "linenums" ) .html( example.html() ); } } ); Sunlight.highlightAll( { lineNumbers : false, showMenu : true, enableDoclinks : true } ); $.catchAnchorLinks( { navbarOffset: 10 } ); $( "#toc" ).toc( { anchorName : function ( i, heading, prefix ) { return $( heading ).attr( "id" ) || ( prefix + i ); }, selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4", showAndHide : false, smoothScrolling: true } ); $( "#main span[id^='toc']" ).addClass( "toc-shim" ); $( '.dropdown-toggle' ).dropdown(); $( "table" ).each( function () { var $this = $( this ); $this.addClass('table'); } ); } ); </script> <!--Navigation and Symbol Display--> <!--Google Analytics--> <script type="text/javascript"> $(document).ready(function() { SearcherDisplay.init(); }); </script> </body> </html>