Tag Info

Hot answers tagged

4

FYI... I believe this has changed for OL3 V3.5.0, so gcarrillo's answer would be: new ol.layer.Vector({ title: 'added Layer', source: new ol.source.Vector({ url: 'mygeojson.json', format: new ol.format.GeoJSON() }) }) You can see the changes here: ...


2

If I am understanding you correctly, this funnctionality already exists in my Search widget which is a companion to my Attributes Tables widget.


2

This probably isn't the type of answer that you are looking for, but I'll try to give a general answer on how one could do this. If we break down your problem into smaller tasks, then the first thing that you need to do, is to get the point that the user clicks on. There is an sample on the OpenLayers site that shows exactly how to get this done. Click ...


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

Right now the ESRI CDN source looks like it has a broken build. For instance, you cannot pan or zoom on the map right now whereas yesterday you could. I would wait until later in the day to see if their fix doesn't take care of your problem.


1

This probably has nothing to do with Leaflet — it requests tile images the same way as other JS libraries, and caching is fully handled by the browser. Check your browser/devtools settings.


1

Have a look at leaflet maps - gps plugin (http://labs.easyblog.it/maps/leaflet-gps/) It automatically updates the gps location received from the device (html5 geolocation). I suppose you can attach a javascript to that updating event, to look up any POI's within a certain buffer around that gps point. These POI's can then be fed back into the leafletmap ...


1

The solution is that in my code I had called in "loadFeatures" twice, once in each of the layers. Simply by renaming one of them it stopped calling both layers into the single one.


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

To use any formula, you need the parameters of the Albers Equal Area projection: latitude and longitude of origin first and second parallel You can guess the longitude from the only meridian that is straightly vertical, but the others are more difficult to get. You might be better off by using a georeferencing tool. The georeferencer inside QGIS does a ...


1

It depends on the javascript client you are using (e.g. Leaflet, OpenLayers, Google Maps API, ESRI javascript API, etc.), and what you are trying to publish (WFS, WMS, etc.). For OpenLayers, you can preview the layer through the admin UI and get a good idea of how it works (view the page source after the preview loads): ...


1

based on srussking answer I wrote the following code assuming the main map object called map and it is a global var, I preferred using find layer by name and not by id, here is my code: function moveLayerBefore(old_idx, new_idx){ if((old_idx === -1) || (new_idx === -1)){ return false; } layer = map.getLayers().removeAt(old_idx); ...



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