Tag Info

New answers tagged

0

I found the solution A lot of post on stackexchange showme the way to do that Here a sample extract of the code in c++ : //Declaration CMyQgsMapCanvas * mpMapCanvas; QgsMapToolEmitPoint * mpClickPoint; mpMapCanvas = new CMyQgsMapCanvas( this, NULL); mpMapCanvas->create(); mpMapCanvas->setProjection(); mpClickPoint = new ...


0

I have not found the class ol.source.GeoJSON, and could not find a case where vectorSource.getState() != 'ready'. So I ended up doing something like this: // Toggle spinner on layer loading layer.on('change', function() { spin(); }); layer.getSource().on('change', function() { spin(false); });


1

This way: var deleteFeature = function(evt){ if(evt.keyCode == 46){ //delete key pressed //delete feature } }; document.addEventListener('keydown', deleteFeature, false);


1

I did a little searching and found a few things that may be helpful for you concerning QGIS and events. From the documentation (looks like only C++... should be able to take some names and figure out the python bindings though), there looks to be a class than handles when the canvas is clicked and moved. You may be able to find the python bindings that ...



Top 50 recent answers are included