Documentation - Leaflet - a Java. Script library for interactive maps. API Reference. This reference reflects Leaflet 0. Docs for 1. 0 are available here. Overrides any min. Zoom set on map layers. A concept map helps students organize and represent knowledge of a subject. Concept mapping links concepts and ideas together with words and phrases that explain the relationship. Concept maps encourage. Zoom. Numbernull. Maximum zoom level of the map. This overrides any max. Zoom set on map layers. Bounds. Lat. Lng. Boundsnull. When this option is set, the map restricts the view to the given geographical bounds, bouncing the user back when he tries to pan outside the view. Delivering High Quality, Responsive, SEO Done, Retina Ready, Free Best And Professional Blogger Templates.To set the restriction dynamically, use set. Max. Bounds method. CRSL. CRS. EPSG3. Coordinate Reference System to use. Don't change this if you're not sure what it means. Interaction Options. Montana's longest running web based business news portal, promoting Montana Business & Montana Lifestyle since 2005. Utilize hashtags #mtbiz, #mttalent, #mtbenefits, #mtlocal in your social media. Vocaroo is a quick and easy way to share voice messages over the interwebs. Falls Sie sich als administrativer Ansprechpartner bzw. Other areas of Wikipedia. Community portal – Bulletin board, projects, resources and activities covering a wide range of Wikipedia areas. Help desk – Ask questions about using Wikipedia. Local embassy – For Wikipedia. Option. Type. Default. Descriptiondragging. Booleantrue. Whether the map be draggable with mouse/touch or not. Zoom. Booleantrue. Whether the map can be zoomed by touch- dragging with two fingers. Wheel. Zoom. Booleantrue. Whether the map can be zoomed by using the mouse wheel. If passed 'center', it will zoom to the center of the view regardless of where the mouse was. Click. Zoom. Booleantrue. Whether the map can be zoomed in by double clicking on it and zoomed out by double clicking while holding shift. If passed 'center', double- click zoom will zoom to the center of the view regardless of where the mouse was. Zoom. Booleantrue. Whether the map can be zoomed to a rectangular area specified by dragging the mouse while pressing shift. Booleantrue. Enables mobile hacks for supporting instant taps (fixing 2. OS/Android) and touch holds (fired as contextmenu events). Tolerance. Number. The max number of pixels a user can shift his finger during touch for it to be considered a valid tap. Resize. Booleantrue. Whether the map automatically handles browser window resize to update itself. Copy. Jump. Booleanfalse. With this option enabled, the map tracks when you pan to another . Feels especially nice on touch devices. Deceleration. Number. The rate with which the inertial movement slows down, in pixels/second. Max. Speed. Number. Max speed of the inertial movement, in pixels/second. Threshold. Numberdepends. Number of milliseconds that should pass between stopping the movement and releasing the mouse or touch to prevent inertial movement. Control options. Option. Type. Default. Descriptionzoom. Control. Booleantrue. Whether the zoom control is added to the map by default. Control. Booleantrue. Whether the attribution control is added to the map by default. Animation options. Option. Type. Default. Descriptionfade. Animation. Booleandepends. Whether the tile fade animation is enabled. By default it's enabled in all browsers that support CSS3 Transitions except Android. Animation. Booleandepends. Whether the tile zoom animation is enabled. By default it's enabled in all browsers that support CSS3 Transitions except Android. Animation. Threshold. Number. 4Won't animate zoom if the zoom difference exceeds this value. Zoom. Animation. Booleandepends. Whether markers animate their zoom with the zoom animation, if disabled they will disappear for the length of the animation. By default it's enabled in all browsers that support CSS3 Transitions except Android. Events. You can subscribe to the following events using these methods. Event. Data. Descriptionclick. Mouse. Event. Fired when the user clicks (or taps) the map. Mouse. Event. Fired when the user double- clicks (or double- taps) the map. Mouse. Event. Fired when the user pushes the mouse button on the map. Mouse. Event. Fired when the user releases the mouse button on the map. Mouse. Event. Fired when the mouse enters the map. Mouse. Event. Fired when the mouse leaves the map. Mouse. Event. Fired while the mouse moves over the map. Mouse. Event. Fired when the user pushes the right mouse button on the map, prevents default browser context menu from showing if there are listeners on this event. Also fired on mobile when the user holds a single touch for a second (also called long press). Event. Fired when the user focuses the map either by tabbing to it or clicking/panning. Event. Fired when the map loses focus. Mouse. Event. Fired before mouse click on the map (sometimes useful when you want something to happen on click before any existing click handlers start running). Event. Fired when the map is initialized (when its center and zoom are set for the first time). Event. Fired when the map is destroyed with remove method. Event. Fired when the map needs to redraw its content (this usually happens on map zoom or load). Very useful for creating custom overlays. Event. Fired when the view of the map starts changing (e. Makes an animated pan if new center is not more than one screen away from the current one. By(. < Point> point. If options. pan is false, panning will not occur. If options. debounce. Moveend is true, it will delay moveend event so that it doesn't happen often even if the method is called many times in a row. Max. Bounds(. < Lat. Lng. Bounds> boundsthis. Restricts the map view to the given bounds (see map max. Bounds option). locate(. Locate options> options? See Locate options for more details. Locate()this. Stops watching location previously initiated by map. If inside (optional) is set to true, the method instead returns the minimum zoom level on which the map view fits into the given bounds in its entirety. Size()Point. Returns the current size of the map container. Pixel. Bounds()Bounds. Returns the bounds of the current map view in projected pixel coordinates (sometimes useful in layer and overlay implementations). Pixel. Origin()Point. Returns the projected pixel coordinates of the top left point of the map layer (useful in custom layer and overlay implementations). Methods for Layers and Controls. Method. Returns. Descriptionadd. Layer(. < ILayer> layer )this. Adds the given layer to the map. Layer(. < ILayer> layer )this. Removes the given layer from the map. Layer(. < ILayer> layer )Boolean. Returns true if the given layer is currently added to the map. Layer(. < Function> fn. Object> context? You can later stop watching using map. Locate() method. set. View. Booleanfalse. If true, automatically sets the map view to the user location with respect to detection accuracy, or to world view if geolocation failed. Zoom. Number. Infinity. The maximum zoom for automatic view setting when using `set. View` option. timeout. Number. 10. 00. 0Number of milliseconds to wait for a response from geolocation before firing a locationerror event. Age. Number. 0Maximum age of detected location. If less than this amount of milliseconds passed since last geolocation response, locate will return a cached location. High. Accuracy. Booleanfalse. Enables high accuracy, see description in the W3. C spec. Zoom/pan options. Option. Type. Default. Descriptionreset. Booleanfalse. If true, the map view will be completely reset (without any animations). Sets the options for the panning (without the zoom change) if it occurs. Sets the options for the zoom change if it occurs. Boolean- An equivalent of passing animate to both zoom and pan options (see below). Pan options. Option. Type. Default. Descriptionanimate. Boolean- If true, panning will always be animated if possible. If false, it will not animate panning, either resetting the map view if panning more than a screen away, or just setting a new offset for the map pane (except for `pan. By` which always does the latter). Number. 0. 2. 5Duration of animated panning. Linearity. Number. The curvature factor of panning animation easing (third parameter of the Cubic Bezier curve). Move. Start. Booleanfalse. If true, panning won't fire movestart event on start (used internally for panning inertia). Zoom options. Option. Type. Default. Descriptionanimate. Boolean- If not specified, zoom animation will happen if the zoom origin is inside the current view. If true, the map will attempt animating zoom disregarding where zoom origin is. Setting false will make it always reset the view completely without animation. Bounds options. The same as zoom/pan options and additionally: Option. Type. Default. Descriptionpadding. Top. Left. Point. Useful if you have some control overlays on the map like a sidebar and you don't want them to obscure objects you're zooming to. Bottom. Right. Point. Example: map. double. Click. Zoom. disable(); You can also access default map controls like attribution control through map properties: map. Control. add. Attribution(. The difference is mostly in z. Index order that such overlays get. Property. Type. Descriptionmap. Pane. HTMLElement. Pane that contains all other map panes. Pane. HTMLElement. Pane for tile layers. Pane. HTMLElement. Pane that contains all the panes except tile pane. Pane. HTMLElement. Pane for overlay shadows (e. See Icon documentation for details on how to customize the marker icon. Set to new L. Icon. Default() by default. Booleantrue. If false, the marker will not emit mouse events and will act as a part of the underlying map. Booleanfalse. Whether the marker is draggable with mouse/touch or not. Booleantrue. Whether the marker can be tabbed to with a keyboard and clicked by pressing enter. String''Text for the browser tooltip that appear on marker hover (no tooltip by default). String''Text for the alt attribute of the icon image (useful for accessibility). Index. Offset. Number. By default, z. Index for the marker image is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like 1. Number. 1. 0. The opacity of the marker. On. Hover. Booleanfalse. If true, the marker will get on top of others when you hover the mouse over it. Offset. Number. 25. The z- index offset used for the rise. On. Hover feature. Events. You can subscribe to the following events using these methods. Event. Data. Descriptionclick. Mouse. Event. Fired when the user clicks (or taps) the marker. Mouse. Event. Fired when the user double- clicks (or double- taps) the marker. Mouse. Event. Fired when the user pushes the mouse button on the marker. Mouse. Event. Fired when the mouse enters the marker.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2016
Categories |