Tag Info

Hot answers tagged

4

esri leaflet is an alternative to the ArcGIS API for JavaScript, not something that makes much sense to try and combine. L.esri.DynamicMapLayer provides comparable functionality (within Leaflet) for loading dynamic map services published to ArcGIS Server to the class 'esri/layers/ArcGISDynamicMapServiceLayer' in the JSAPI please check out the esri leaflet ...


3

It seems you have the same problem as I had. Have a look here. Since you are using AJAX to load the JSON the geojsonAjax has most probably no data when you fire markers.addLayer(L.geoJson(geojsonAJAX)); Try something like this: var markers = new L.MarkerClusterGroup({ showCoverageOnHover: false, maxClusterRadius: 80}); // Style function for ...


3

On creating the div, make sure to add an event listener to it, which stops propagating the event to the map. Easier way: info.onAdd = function (map) { this._div = L.DomUtil.create('div', 'info'); // create a div with a class "info" this._div.onmousedown = function(evt) {evt.stopPropagation()}; this.update(); return this._div; }; More ...


2

Your events are propagating to the map. Leaflet provides DomEvent methods to prevent this, for example (using jQuery): $('div').each(function () { L.DomEvent.on(this,'mousedown',L.DomEvent.stop); L.DomEvent.on(this,'click',L.DomEvent.stop); L.DomEvent.on(this,'touchstart',L.DomEvent.stop); });


2

Leaflet's map.fitBounds has an option padding which you can use like so: map.fitBounds(polygon.getBounds(), { padding:[50,50] } ); JSFiddle demo: http://jsfiddle.net/1vjqjx6h/


1

geojson styles need to be defined in javascript, not css. Here's a sample style: var countyStyle = { "color": "#cec4bc", // medium? brown "weight": 1, // stroke weight in pixels "opacity": 0.65 }; You can look up path style options here in Leaflet documentation. There are many sites to look up hex or rgb color codes and help choose ...


1

I just googled and found the Leaflet Quick Start Guide: This step-by-step guide will quickly get you started on Leaflet basics, including setting up a Leaflet map, working with markers, polylines and popups, and dealing with events. If you are looking for an eLearning video that is cheap (but not free) then Zoran Petrović has published a course ...


1

I normally upload the whole export folder to an accessible folder on my server and implement the map with an <iframe src="relative path to the export folder"> </iframe> and that's it!


1

This is a general answer since you didn't provide any code to work with. Note that I assume you have managed to work out the QGIS2LEAF plugin. The output of the plugin gives you a folder with an index.html file, which contain the webpage main code, and few more folders described below. CSS: contains CSS styling files, including own_style.css that is meant ...


1

I am not sure if this is helpful, but a suggestion for an algoritm to process OSM multipolygon into into proper GIS multipolygons is given here http://wiki.openstreetmap.org/wiki/Relation:multipolygon/Algorithm Helpful reading regarding boundaries, enclaves and exclaves: http://wiki.openstreetmap.org/wiki/Relation:boundary Especially the last example is ...



Only top voted, non community-wiki answers of a minimum length are eligible