diff --git a/reference.html b/reference.html index b2db9f7f..da7f8150 100644 --- a/reference.html +++ b/reference.html @@ -65,6 +65,7 @@

Raster layers

Vector layers

@@ -73,6 +74,7 @@
  • Polyline
  • Polygon
  • Circle
  • +
  • CircleMarker
  • @@ -89,22 +91,13 @@
  • Zoom
  • Attribution
  • -
    -

    Events

    -

    Interfaces

    -
    -
    +

    Utility

    -->
    +
    +

    Interfaces

    + +

    @@ -367,6 +369,11 @@ map.addLayer(cloudmade); LocationEvent Fired when geolocation (using locate or locateAndSetView method) went successfully. + + locationerror + ErrorEvent + Fired when geolocation (using locate or locateAndSetView method) failed. + @@ -399,17 +406,17 @@ map.addLayer(cloudmade); Decreases the zoom of the map by 1. - fitBounds( <LatLngBounds> bounds ) + fitBounds( <LatLngBounds> bounds ) this Sets a map view that contains the given geographical bounds with the maximum zoom level possible. - panTo( <LatLng> latlng ) + panTo( <LatLnglatlng ) this Pans the map to a given center. Makes an animated pan if new center is not more than one screen away from the current one. - panBy( <Point> point ) + panBy( <Pointpoint ) this Pans the map by a given number of pixels (animated). @@ -419,9 +426,18 @@ map.addLayer(cloudmade); Checks if the map container size changed and updates the map if so — call it after you've changed the map size dynamically. - locate( <Boolean> noAutoFitBounds? ) + locate() this - Tries to locate the user using Geolocation API and zooms the map if successful, firing locationfound (with location data) or locationerror event. Set noAutoFitBounds to true if you don't want the map view to be set automatically (false by default). + Tries to locate the user using Geolocation API, firing locationfound event with location data on success or locationerror event on failure. + + + locateAndSetView( <Number> maxZoom ) + this + The same as locate method, but it automatically sets the map view to the user location with respect to detection accuracy (or to the world view if geolocation failed). You can optionally specify the maximum zoom of the view. @@ -935,6 +951,77 @@ map.openPopup(popup); If false, new tiles are loaded during panning, otherwise only after it (for better performance). true by default on mobile WebKit, otherwise false. + + + +

    L.TileLayer.WMS

    + +

    Used to display WMS services as tile layers on the map. Extends TileLayer, implements ILayer interface.

    + +

    Usage example

    + +
    var nexrad = new L.TileLayer.WMS("http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi", {
    +	layers: 'nexrad-n0r-900913',
    +	format: 'image/png',
    +	transparent: true,
    +	attribution: "Weather data © 2011 IEM Nexrad"
    +});
    + +

    Constructor

    + + + + + + + + + + +
    ConstructorDescription
    L.TileLayer.WMS( <String> baseUrl, <TileLayer.WMS optionsoptions )Instantiates a WMS tile layer object given a base URL of the WMS service and a WMS parameters/options object.
    + +

    Options

    + +

    Includes all TileLayer options and additionally:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    OptionTypeDefault valueDescription
    layersString-(required) Comma-separated list of WMS layers to show.
    stylesStringComma-separated list of WMS styles.
    formatStringimage/jpegWMS image format (use 'image/png' for layers with transparency).
    transparentBooleanfalseIf true, the WMS service will return images with transparency.
    versionString1.1.1Version of the WMS service to use.
    @@ -1146,7 +1233,7 @@ map.addLayer(polyline);

    L.Circle

    -

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

    +

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

    Constructor

    @@ -1157,11 +1244,28 @@ map.addLayer(polyline); L.Circle( <LatLnglatlng, <Number> radius, <Path optionsoptions? ) - Instantiates a polygon object given an geographical point, a radius in pixels and optionally an options object. + Instantiates a circle object given a geographical point, a radius in meters and optionally an options object. +

    L.CircleMarker

    + +

    A circle of a fixed size with radius specified in pixels. Extends Circe. Use Map#addLayer to add it to the map.

    + +

    Constructor

    + + + + + + + + + + +
    ConstructorDescription
    L.CircleMarker( <LatLnglatlng, <Number> radius, <Path optionsoptions? )Instantiates a circle marker given a geographical point, a radius in pixels and optionally an options object.
    +

    L.LatLng

    @@ -1746,6 +1850,26 @@ var marker = new L.Marker(marker, {icon: icon}); +

    ErrorEvent

    + + + + + + + + + + + + + + + + + +
    propertytypedescription
    messageStringError message.
    codeNumberError code (if applicable).
    +

    LayerEvent