From ed57a989dc1645b3184a2f00f296354592b75522 Mon Sep 17 00:00:00 2001 From: Mourner Date: Fri, 15 Apr 2011 14:46:55 +0300 Subject: [PATCH] attribution control docs --- reference.html | 60 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/reference.html b/reference.html index e64d9e30..317a70b2 100644 --- a/reference.html +++ b/reference.html @@ -44,7 +44,7 @@
  • Usage example
  • Constructor
  • Options
  • -
  • Interaction handlers
  • +
  • Properties
  • Events
  • Map methods

    @@ -87,7 +87,7 @@

    Controls

    @@ -236,12 +236,16 @@ map.addLayer(cloudmade); -

    Interaction handlers

    +

    Properties

    -

    Interaction handlers are properties of a map instance that allow you to control interaction behavior in runtime, enabling or disabling certain features such as dragging or touch zoom (see IHandler methods). Example:

    +

    Map properties include interaction handlers that allow you to control interaction behavior in runtime, enabling or disabling certain features such as dragging or touch zoom (see IHandler methods). Example:

    map.doubleClickZoom.disable();
    +

    You can also access default map controls like attribution control through map properties:

    + +
    map.attributionControl.addAttribution("Earthquake data © GeoNames");
    + @@ -273,6 +277,11 @@ map.addLayer(cloudmade); + + + + +
    Property IHandler Shift-drag zoom handler.
    attributionControlControl.AttributionAttribution control.
    @@ -1362,6 +1371,49 @@ map.addLayer(polyline); Creates a zoom control. + + + +

    L.Control.Attribution

    + +

    The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its attributionControl option to false, and it fetches attribution texts from layers with getAttribution method automatically. Implements IControl interface.

    + +

    Constructor

    + + + + + + + + + +
    ConstructorDescription
    L.Control.Attribution()Creates an attribution control.
    + +

    Methods

    + + + + + + + + + + + + + + + + + + + + + +
    MethodReturnsDescription
    setPrefix( <String> prefix )-Sets the string before the attributions ("Powered by Leaflet" by default).
    addAttribution( <String> text )-Adds an attribution text (e.g. "Vector data &copy; CloudMade").
    removeAttribution( <String> text )-Removes an attribution text.
    +

    IHandler