Posts

Showing posts from August, 2016

First blog post

This is your very first post. Click the Edit link to modify or delete it, or start a new post . If you like, use this post to tell readers why you started this blog and what you plan to do with it.

leaflet remove all layers javascript

To remove all layers in the leaflet just u need to keep code ass follows map.eachLayer(function (layer) {       map.removeLayer(layer) }); map is the main object of the leaflet map i.e. L.map and eachLayer is function used to get all layers on the map area including map images also, If you need to remove specific elements you can use instanceof function. It will helps you to know which type of layer passed as arg to that the syntax for this instanceof function is layer instanceof L.layer_type for removing specific data i.e.,to remove only circles from map you can use map.eachLayer(function (layer) {         if(layer instanceof L.Circle)         map.removeLayer(layer)     }); This code.... thank You...:-) keep visiting

Leaflet-Simple Maps API uses javascript

Image
Leaflet-Simple Maps API Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just about 33 KB of JS , it has all the mapping features most developers ever need. Leaflet is designed with simplicity , performance and usability in mind. It works efficiently across all major desktop and mobile platforms, can be extended with lots of plugins , has a beautiful, easy to use and well-documented API and a simple, readable  source code that is a joy to contribute to. Map Usage example Creation Options Events Map Methods Modifying map state Getting map state Layers and controls Conversion methods Other methods Map Misc Properties Panes UI Layers Marker Popup Raster Layers TileLayer TileLayer.WMS TileLayer.Canvas ImageOverlay Vector Layers Path Polyline MultiPolyline Polygon MultiPolygon Rectangle Circle CircleMarker Other Layers LayerGroup FeatureGroup GeoJSON Basic Types LatLng LatLngBounds Point Bounds Icon DivIcon Controls Control Zoom Attri...