Hot answers tagged

3

QGIS is a desktop program, you could create a project file with the WFS/WMS layers then modify the xml of the QGIS project file to load up in the extent that the Open Layers map is in. Export the user drawn layer to json and then they can load that in a print. But that relies on the user having QGIS. Alternatively see the answer to this question and modify ...


3

It means i need to fire a click on the whole div map, then look for my specificPixel that the feature contains and then do whatever i want. I don't think you understand how forEachFeatureAtPixel works. Once you click, it takes the pixel clicked and iterate through all the layers to find any feature within a range of that pixel coordinate. It's not going ...


2

@JohnBarça Just a note, while turf.intersect(polygon, point) does seem to work, it was pointed out to me that turf.inside(point, polygon) is the proper function to use, for checking that a point is inside a polygon. The turf.intersect() function is intended for polygons. See variations, according to need: https://github.com/Turfjs/turf-inside ...


2

You can add features to the source after the layer is added to the map. See the API vectorSource.addFeature(fearure); // to add a single feature vectorSource.addFeatures(fearures);// to add a set of features.


2

A similar question was asked before: Is it possible to have another CRS in the status bar than used for the map? and the asker finally wrote this piece of code: http://code.activestate.com/recipes/578692/ But I got stuck with it sometimes on startup. You might be better of with the new QuickMapServices plugin, which can deal with different projections far ...


2

Listen for pointermove event on map object: map.on('pointermove', function(evt) { // When user was dragging map, then coordinates didn't change and there's // no need to continue if (evt.dragging) { return; } // You can access coordinates from evt.coordinate now });


1

No, OpenLayers.js is the code for the openlayers library itself. Somewhere your application loads a .js file that specifies the various layers and map functionality (it is also possible that this is done inline in an HTML file). Try searching through all the files in your application for the text "new OpenLayers.Map" and whatever file contains that text ...


1

By default point sizes are measured in pixels and so will change size as you zoom in and out of your map. The Symbology Encoding standard allows you to specify the size of your points (and other features) in map units which will remain the same real world size as you zoom in and out, that is they seem to get bigger as you zoom in like polygons do. You need ...


1

Have you tried Leaflet export as well as Openlayers? Leaflet export warps rasters as best it can to the right projection, but OL3 doesn't. Rasters are not qgis2web's strongest feature, and need more development: https://github.com/tomchadwin/qgis2web/issues/33 Edit: Another thought. Make sure your project is in 4326, check "Match project CRS", and try ...


1

You don't have that (yet) on GeoExt 3. Meanwhile, you might check another smaller project focused on managing layers, called extjs_ol3_layercontrol. It is also written in ExtJS. Check the blog and the github. If you add the Geoserver capabilities URL (something like ...


1

A WMS request returns an image that is generated on the server so the CQL filter must be executed there. If you have a supported query then GeoServer will pass the CQL filter down to the PostGIS (or other) database for further speed savings (unless it's Oracle when it may slow down :-( ).


1

The quick answer to the question is yes it is possible. You will need to construct an external SLD file, and store it on your server, then you will need to send a GetMap request that references that SLD in your request. So here for example is a GetMap request to a GeoServer WMS (generated through a web client using OpenLayers) GetMap to a GeoServer WMS ...



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