Tag Info

New answers tagged

0

There is no style option on ol.layer.Tile. You have to find another way. I don't know how.


0

I've had this this situation, and came up with a novel solution: use the WMSGetFeatureInfo instead of the SelectFeature control, because it is able to return multiple features associated with a click event. Even though the WMSGetFeatureInfo is not supposed to be used with vector layers, it is possible to trick OpenLayers into thinking it is interacting with ...


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 ...


0

From Wikipedia: For a general sphere of radius r, any portion of its surface with area A = r2 subtends one steradian. So you can multiply your steradians value by r2 to get the area value. Using r = 6371 km: 8.101249039703731e-8 * (6371 * 6371) = 3.288 kmĀ²


0

A bit hacky but effective L.LayerGroup.prototype.eachLayer.call(layer, each_layer_fn); I use this in a special case of a KML layer what is FeatureGroups inside FeatureGroups, to found the polygons inside I use the following function var each_layer_fn = function(layer) { if(typeof(layer._layers) === 'undefined') { // do da thing } else ...


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.


0

GXP (which is used by GeoExplorer, depends on GeoExt) has some components for this, FeatureEditorForm and FeatureEditorGrid: https://github.com/boundlessgeo/gxp/blob/master/src/script/plugins/FeatureEditorForm.js https://github.com/boundlessgeo/gxp/blob/master/src/script/plugins/FeatureEditorGrid.js They will use a WFS DescribeFeatureType request as the ...


0

omnivore.wkt.parse returns a layer // adding var feature = omnivore.wkt.parse("${feature}"); feature.addTo(map); // removing: feature.removeFrom() is not a function, use map.removeLayer() map.removeLayer(feature);


0

I found out what the mistake was, a very silly mistake actually. I was preparing arrays of coordinates for the parallel lines, but at the time of creation of features, I was creating polygons instead of new line strings. In terms of OL3, it should've been new ol.geom.LineString(coordinate array, 'XYZ'); But what I was doing was: new ...


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!


0

Just add bounds part like below { "layers": { "world": { "src": "ne_50m_admin_0_countries_lakes/ne_50m_admin_0_countries_lakes.shp", "filter": ["gu_a3", "is", "PRI"] }, "states": { "src": "ne_50m_admin_1_states_provinces_lakes/ne_50m_admin_1_states_provinces_lakes.shp", "filter": { ...


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 ...


0

You could use a textarea to collect pairs of coordinates. The coordinates should have a comma between them and each pair should be separated by a new line. Then format the pairs to look like: [[[coord1,coord2],[coord3,coord4],[coord5,coord6]]] Here is an example of how to do that: HTML <textarea id='textareaID'></textarea> JavaScript var ...


0

Remember that JavaScript runs on the client's machine, under their control. They are allowed to set breakpoints and inspect variables at run time on their own machine. You can minify and obfuscate JavaScript, but Chrome DevTools has a one-click pretty-format button to partially undo the minification enough to make breakpoints work effectively. Long story ...


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 ...


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 ...


0

I found the answer that I think may help other people trying to accomplish this as well. The code below shows how to make a Custom Basemap Gallery using your own Basemaps (not ArcGIS maps). In this case, it will create two basemaps for a single gallery. <script> dojo.require("esri.map"); dojo.require("dijit.form.Button"); ...


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 ...


2

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


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: ...


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): ...


0

I believe this occurs because the ESRI JavaScript API actually adds separate graphics layers for different feature types within the KML file. These layers are added after the KML file is loaded and so loaded on top of any previous maps. Perhaps you could explicitlyreorder the KML layer(s) from within an invisible widget once all the layers have been loaded. ...


0

I accepted @javisantana's answer but would like to provide some of my own findings and didn't want to muck up my original question, so here you go: Elements The accepted answer works great and is likely the most semantic approach, but I found myself using plain old <span> elements (or <div> or whatever) to house the mss since I was often in ...


0

You could for example use jquery Datatables ( www.datatables.net ) and create the data-structure on the server-side with php: https://www.datatables.net/examples/server_side/ Then load this data dynamically in your datatable. If you have a common key you could even synchronize the select-control of openlayers with the datatable. You can have a look at ...


-1

got it basically: if (is_opened == true) { $(".cartodb-tooltip").hide(); }



Top 50 recent answers are included