From 36112bffc7a719d5e0b9d975569a408a16c6a936 Mon Sep 17 00:00:00 2001 From: mourner Date: Sat, 2 Apr 2011 14:54:16 +0300 Subject: [PATCH] update docs --- reference.html | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/reference.html b/reference.html index 070da41d..20b7226b 100644 --- a/reference.html +++ b/reference.html @@ -297,13 +297,23 @@ map.addLayer(cloudmade); addLayer( <ILayer> layer ) this - Adds a given layer to the map. + Adds the given layer to the map. removeLayer( <ILayer> layer ) this Removes the given layer from the map. + + openPopup( <Popuppopup ) + this + Opens the specified popup while closing the previously opened (to make sure only one is opened at one time for usability). + + + closePopup() + this + Closes the popup opened with openPopup. + invalidateSize() this @@ -482,13 +492,23 @@ map.addLayer(marker); LatLng Returns the current geographical position of the marker. + + bindPopup( <String> htmlContent, <Popup optionsoptions? ) + this + Binds a popup with a particular HTML content to a click on this marker. You can also open the bound popup with the Marker openPopup method. + + + openPopup() + this + Opens the popup previously bound by the bindPopup method. + -

Used to open popups in certain places of the map.

+

Used to open popups in certain places of the map. Use Map#openPopup to open popups while making sure that only one popup is open at one time (recommended for usability), or use Map#addLayer to open as many as you want.

Usage example

var popupContent = '<p>Hello world!<br />This is a nice popup.</p>', 
@@ -637,7 +657,7 @@ map.openPopup(popup);
-

Polyline

+

L.Polyline

A class for drawing polyline overlays on a map. Extends Path. Use Map#addLayer to add it to the map.

@@ -690,7 +710,7 @@ map.addLayer(polyline); -

Polygon

+

L.Polygon

A class for drawing polygon overlays on a map. Extends Polyline. Use Map#addLayer to add it to the map.

@@ -708,7 +728,7 @@ map.addLayer(polyline); -

Circle

+

L.Circle

A class for drawing circle overlays on a map. Extends Path. Use Map#addLayer to add it to the map.