Tag Info

Hot answers tagged

11

GIS Day is a perfect day to promote GIS within your organisation. Setup something fun - showcase videos like GeoSpatial Revolution or if your in local government, try to woo the people with the budget strings with a video on the role of GIS in Government 2.0 I think its all about showing the non-GIS people in where you work, the potential on what can be ...


9

geocache party / treasure hunt, where the treasure is booz and pizza


9

you can do with the same method: map.events.register(type, obj, listener); movestart triggered after the start of a drag, pan, or zoom move triggered after each drag, pan, or zoom moveend triggered after a drag, pan, or zoom completes zoomend triggered after a zoom completes example code: map.events.register("move", map, function() { ...


7

Do you need to synchronize only moving and zooming of map? In that case, one simple solution is: listen moveend event on map, and then zoom other map to extent of current map. map1 = new OpenLayers.Map('map1'); map2 = new OpenLayers.Map('map2'); map1.events.on({ moveend: function(evt) { map2.zoomToExtent(map1.getExtent()); } }); ...


6

In your code, you are subscribing to an event using an anonymous method delegate. When you need to unsubscribe from an event, it is generally easier and more readable to use non-anonymous methods (note this is C# 3 or higher code, C# 2 would need to be a bit more verbose): // subscribe Events.OnCreateFeature += OnCreateFeature; // unsubscribe ...


6

Have you investigated Spatial Joins?


6

I had basically the same question as user506706. I just couldn't believe that the Vector layer was the only layer to handle touches...so if all else fails...read the code. In OpenLayers-2.11/OpenLayers/lib/Events.js I found: BROWSER_EVENTS: [ "mouseover", "mouseout", "mousedown", "mouseup", "mousemove", "click", "dblclick", "rightclick", ...


5

OftenThe Google layers work differently from other layer types as they are loaded through the Google API rather than OpenLayers code. The loadend issue is logged as a bug in the OpenLayers bug tracker, but its status has since been changed to a (non-completed) feature. Instead you could try capturing the tilesloaded event from the Google API, and put ...


5

Correct, the mousedown events do not occur on mobile with Touch events. Instead, you should use a Vector layer -- the Vector layers appropriately handle 'taps' and interpret them as select events.


5

GIS is everyday in mapperz world...


4

We host a poster contest where all of our GIS staff (although the contest is open to anyone) each make one poster showcasing a GIS project they did in the past year that added value, solved a problem, etc. within our company. Of course we do live demos of our web apps and use the event as an evangelistic opportunity. The posters are voted on by all of the ...


4

As I understand it, you have two .NET ComboBoxes on a UserControl that implements ICommand and IToolControl, and you want to get a reference to one of the combo boxes from the other. As long as they are in the same scope you should just be able to refer to them by their variable names (check your UserControl designer for the names of your controls). If the ...


4

It is by-passing Object Store() behavior. A "quick" (ok, laughing a bit) glance of the GeoDatabase Object Model reveals that you can optionally implement IObjectClassInfo2. try implementing that and returning FALSE for the CanByPassStoreMethod.


4

there is an information here about right click select feature. i havent try it but it looks like it works. myMap is OpenLayers.Map object and myVectorLayer is... OpenLayers.Layer.Vector. myMap.div.oncontextmenu = function noContextMenu(e) { if(!e){ //dear IE... var e = window.event; e.returnValue = false; } var f = ...


4

Preventing default behavior in IE and all other browsers: event.returnValue = false; if (event.preventDefault) event.preventDefault();


4

It's also possible to make the feedback instant, at the cost of complicating the code a bit (and causing potential performance problems if there are other events attached to the maps): (used user1702401's answer and Fiddle as a template - thanks) var mapFollow = function(mapA, mapB) { var syncMapHandler = function() { var aCenter = ...


4

This sample would suggest that the API already separates a single click from drag events quite well (as well as double clicks). http://developers.arcgis.com/en/javascript/samples/map_infowindow/ Would you mind posting some code or at least explaining what you're doing with your custom onclick handler?


4

Either what @poshan has written, or add this line to onEachFeature(feature, layer): if( layer.options ) layer.options.clickable = false;


3

as i understand from the codes and your explanation, it's come to my mind: in OpenLayers.Popup method, there is a parameter which name is closeBox. this works for: {Boolean} Whether to display a close box inside the popup. if you make it true, the closing button will show in popup, in this case when you click to closing box, it is going to destroy all ...


3

There is nothing wrong with your code. It works fine. You are doing it right. I can select the tool, click on the map and the coordinates are displayed in the message box. To convert to map units add references to ESRI.ArcGIS.Display, ESRI.ArcGIS.Geometry and ESRI.ArcGIS.Carto and replace the OnMouseDown with this public override void OnMouseDown(int ...


3

I'm not sure if this is the source of your problem, but I would suggest not applying the events to the mxDoc.ActiveView within the OnCreate event of the dockable window. The active view can change for a variety of reasons, (user adds a new data frame or opens a new map document). By assigning the events in the OnCreate event you are locking the event ...


3

m_editor.StopEditing(false) will stop the edit session. false to not save the changes true if you want to save the changes


3

Some time ago I faced the same task and have searched documentation and forums concerning this question. At last I've ended on this Esri forum topic: How to suppress AbortOperation message. I have used approach proposed in the last message of that topic although it is not very beautiful. This was in 9.3.1, may be there is better solution in 10.0 now. Hope ...


3

As an example, go to http://www.openlayers.org/dev/examples/click.html Type in your console map.events.listeners to get a list of registered events classified by events types. To see if you really added your event to the map, just count the type of events you registered. A sample could be console.log('Before adding a new click event', ...


3

I have written down a small piece of code might be helpful for you. You can try working example on jsFiddle <!DOCTYPE html> <html> <head> <title>Leaflet - Marker Click Event</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" ...


3

This is already documented here. There are two undocumented tileerror events for the layer When a single tile is missing it trigger the event “loadwarning” to indicate that something is wrong with this layer. When all the tiles in a layer are missing it trigger the event “loadfail”. There is also some additional documentation in the code here UPDATE ...


3

I think creating event on layers(polygon layers) will work. layer_name.on('dblclick', function(e) { a = map.getZoom(); map.setZoom(a + 1);})


2

See this DEMO. I've recreated your code in the DEMO and it works fine. Without the complete source it's hard to tell what is causing your problem. Your code was throwing an error and was easily fixed by doing what Vadim mentioned: "switch last 2 statements". I have a feeling it has something to do with the source of rPoly(reading from KML). Because that's ...


2

Switch last 2 statements. Add to map first, then activate.


2

Copy Features uses an insert cursor to 'store' the result and hence doesnt fire OnCreateFeature. Take a look at the following help topic and follow the advice in the 'Feature events and cursors' heading if you want to listen to that event when using CopyFeatures. Responding to feature or row edits



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