Tag Info

Hot answers tagged

2

After seeking for a more broad (jQuery and AJAX related) answer here I assigned to my jsonpCallbacks unique values, like the following: //JSON request $.ajax({ url: ...


2

The problem with the above code was that map.getLayersByName("Annotations") returns a list and not a single object. So the drawn features were actually being added to the layer but my accessing of the layer was incorrect. Correct getFeatures() code: function getFeatures() { var annotation_layer_list = map.getLayersByName("Annotations") var ...


1

Just read this: http://suite.opengeo.org/4.1/webapps/gxp/viewer/geocoder.html and apply it to the tools array somewhere here in GeoExplorer: https://github.com/boundlessgeo/suite/blob/master/geoexplorer/app/static/script/app/GeoExplorer/Composer.js#L58


1

The problem is that you are using getMap() in the constructor of your control. But at the moment you instantiate the control, it is not yet added to the map. So, getMap() returns undefined. You can overwrite setMap(map) in your control which is called by the map when executing map.setControl(). ol3_legend.prototype.setMap = function(map) { ...


1

I was able to accomplish this by defining my own control derived from Navigation control. var NavigationControl = OpenLayers.Class(OpenLayers.Control.Navigation, { wheelDown: function(evt, delta) { if (canZoomOut()) { return OpenLayers.Control.Navigation.prototype.wheelDown.apply(this,arguments); } else { console.log('Blocked user of ...



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