In computing an event is an action that is usually initiated outside the scope of a program and that is handled by a piece of code inside the program

learn more… | top users | synonyms

15
votes
5answers
1k views

GIS Day function ideas?

Given that today is GIS Day I was wondering what people had run/been to/ had ideas for as function for GIS day. I have seen a few I have liked but any other stories would be awesome.
8
votes
3answers
3k views

ArcObjects (ArcGIS for Desktop and C#): How to cast between the ArcMap COM UI and my custom .Net UserControl objects?

I'm creating a utility to run in ArcGIS for Desktop using ArcObjects (9.3.1 SDK) and C#.Net. My prototype involves a toolbar with two comboboxes and a tool. The first combo selects a layer in the TOC, ...
7
votes
2answers
3k views

How to trigger registered events in Openlayers?

I am building a web application where I need to compare 2 different maps of the same area, I need for the events on one map to automatically be triggered on the other map. I have so far: ...
7
votes
3answers
2k views

How do I stop event propagation with rightclick on Leaflet marker?

I didn't find a rightclick event in Leaflet markers so I started listening to the mousedown event. In the method that resolves this event I check if (event.originalEvent.button == 2) { ...
5
votes
2answers
5k views

Will mousedown events fire with Touch events on OpenLayers mobile?

I can't get the mousedown event to fire on a mobile device when I click on a marker. I'm using openlayers 2.11 with TouchNavigation. The mousedown event fires just fine in Chrome on my Desktop. Are ...
5
votes
2answers
399 views

ArcObjects Class Extension - core events not being fired by an editing tool

I think I've just hit a major limitation with how ArcMap (10) deals with class extensions on a Feature Class but I would first like to make sure I'm not missing something or seeing a bug. I have a ...
5
votes
2answers
480 views

How to filter the MouseWheel event in a QGIS C++ plugin?

I’m developing a C++ plugin for Qgis and I want to filter/override the mouse-wheel event. I created a “maptool” to select a polygon feature on a vector layer, the feature has two attributes : an id ...
4
votes
2answers
6k views

register event “loadend” on layer

I'm trying to register a listener event on "loadend" for my google maps layer on OpenLayers. But for some reason it's not firing. There must be something small i'm overlooking. What is wrong with my ...
4
votes
1answer
4k views

Showing menu based on right click on Point Geometry in Javascript

I have implemented a vector layer(using javascript) in open layers which is having point geometry. Now my requirement is to show menu just besides with the point whenever we do right-click on ...
4
votes
2answers
5k views

How to implement mouse down event when the user clicks on the map?

Newbie programming in C#.net. I have a very simple desktop application in in arcmap. I'm trying to get the coordinates when a user clicks a button on a toolbar and when click the map. The toolbar is ...
4
votes
3answers
630 views

Type of event dispatched when the user double-clicks the map

I am currently working with a drawing tool for the ESRI Flex API, and every time I double-click the mouse a map service will perform a measurement and display the length of the line that I am drawing. ...
3
votes
2answers
5k views

Is there a On Map Move event in OpenLayers?

In my OpenLayers web app I have registered an onmousemove event which performs certain functions. What I am really after though is a way to register and handle the user panning or zooming the map. ...
3
votes
2answers
1k views

Counting Events Per Polygon Feature

I would like to calculate the total number of events within each feature of a polygon using a dbf file and a polygon shapefile. Is there an easy way to automate this so I can then produce charts per ...
3
votes
1answer
192 views

How to release Events

I want to use the OnCreateFeature-Event to combine it with other actions. So I use Events.OnCreateFeature += delegate(IObject obj) { LoopTools_OnCreateFeature(obj); }; to listen to this event. ...
3
votes
1answer
100 views

Is there a way to know if an error occurred while loading a WMS layer, in OpenLayers 2?

First of all, I already asked this question in stackoverflow. I don't want to spam by asking again here. But I think the question fits better in gis.stackexchange. I am sorry for the replication. Feel ...
3
votes
1answer
78 views

How to prevent user from deleting a feature?

How can I prevent the user from deleting a feature? void m_editEvents_OnDeleteFeature(IObject obj) { // Code }
3
votes
1answer
220 views

ArcObjects: Perform action upon refresh command in the TOC

We are using custom layers in our plugin used in ArcScene/ArcMap. For quite some time we were trying to figure out how to hook into the event occuring when the user selects "Refresh" in the right ...
3
votes
2answers
2k views

How to list ActiveView SelectionChanged event delegates in ArcObjects .NET?

I currently have an issue in an ArcObjects ArcMap add-in where my event handlers are seemingly-randomly being unhooked from the event I'm trying to catch. I've spent some time looking for a way to ...
2
votes
2answers
82 views

zoom over vector in leaflet

I have created a map from geojson file of administrative boundaries (polygons layer). Similar to this example. When the mouse is over the polygon feature, the cursor changes from hand to finger. In ...
2
votes
5answers
4k views

Event listeners after each plotting of a point of a Polygon Vector in OpenLayers

I am quite new to OpenLayers. I have a polygonLayer for users to draw polygon vectors. The plotting feature is working fine. polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer"); ...
2
votes
1answer
2k views

How to record a base layer change event in OpenLayers?

The OpenLayers.Control class possesses an eventListener property which could be used in the layer switcher control. I am not sure how to make use of it to detect a base layer change event so that I ...
2
votes
1answer
124 views

How to cancel the edit session?

I want to prevent the user from starting an edit session under certain conditions. How can I do that? void m_editEvents_OnStartEditing() { // Code }
2
votes
1answer
1k views

OpenLayers popup - random losing click event, have to refresh page

I have a OpenLayers, Mapfish, GeoServer map on a webpage. I am using OpenLayers.Popup and getFeaturesInfo to get the attributes from GeoServer (2.1.3). I have several wms layers with markers and ...
2
votes
2answers
885 views

ArcMap - Strange Behavior When Trying To Wire IActiveViewEvents in IDockableWindow

I can't seem to wire up IActiveViewEvents for an IDockableWindow. I am using a straight out-of-the-box IDockableWindow which inherits BaseCommand. The snippet below shows what I have added to the ...
2
votes
2answers
77 views

ESRI JavaScript API FeatureLayer Click Event

I am using FeatureLayers in the API to load in a layer. I have an info template set for the layer for identifying individual features. I am trying to disconnect the click event from the layer while ...
2
votes
1answer
561 views

Why does destroying a popup cause a “this.events is null” error?

I am trying to create dynamically generated popups in OpenLayers with a mouseover event. According to the documentation, it is recommended that the popups be destroyed after use to avoid memory leaks. ...
2
votes
1answer
1k views

OpenLayers: add a listener to a single polygon

I want to add a listener to a single polygon. Currently, I am trying to add one that makes a polygon opaque when you click on it, but I should be able to add any general listener. OpenLayers.Layer has ...
2
votes
1answer
196 views

Streaming polyline while adding records to related tables in ArcPad

I'm designing an ArcPad solution for our field staff; we collect point data and use lines to identify the amount of 'effort' (and to maintain accountability). While collecting a 'streaming polyline' ...
2
votes
1answer
326 views

OpenLayers featureclick event does not work with named graphic (graphicName)?

OpenLayers 2.13. (and 2.13.1) I have been trying to make featureclick event working with vector layers and named graphic features. It works with externalGraphic, but not named graphic (graphicName: ...
2
votes
1answer
117 views

postgis values within XYZ viewport in openlayers

I got this XYZ server where I get my maptiles. Now, when the user is at zoom level 1 ( closest). I want it to execute a command that gets the current viewport from the map and Queries my PostGIS ...
2
votes
1answer
649 views

How to keep bound popups from opening on [click]?

I am working on a map application which creates and binds popups on markers and polyline objects. The popups are created and bound lazily, i.e. ad-hoc when a user clicks on a specific object. The ...
2
votes
1answer
932 views

How to suppress moveend event while switching the base layer?

I have created a map that contains a two base layers (Google Street Map and Open Street Map). A moveend event listener is registered to listen for any map movement which would perform a function call ...
2
votes
1answer
124 views

How to use IObjectClassEvents?

I need to use IObjectClassEvents in my project. I don't know how to start, can any one give me a simple explanation, or an example in C#.
2
votes
0answers
102 views

mousemove event is fired with IE and firefox but it is not fired with chrome [closed]

I am using mousemove event to do some code when the mouse get over features, the code below is working well with IE and firefox but It is not working with chrome ...
2
votes
1answer
123 views

How to pass an argument to an event function in OpenLayers?

I am loading to my map two KML layers for which I add a quasi-similar featuresadded event : layerICPE = new OpenLayers.Layer.Vector( "ICPE (Installations Classées pour la Protection de ...
2
votes
0answers
63 views

How to simulate events from Openlayers 2?

I am working on a GIS API that uses OpenLayers. I am testing it using QUnit. The problem is I need to simulate clicks and trigger some events to be able to test the whole code. For example, I have a ...
2
votes
0answers
78 views

Leaflet Marker Dragend Bug/Difficulty

I am having a problem with leaflet markers. The problem is that when I drag a marker with a lower z-index under another marker with a higher z-index and let it go, it makes another marker. I have a ...
2
votes
0answers
322 views

Leaflet Event Craziness: jQuery click events don't propagate to L.DomEvents

I noticed that calling .click() on jQuery selected DOM elements in Leaflet ( such as anchor icons ) will not do anything -- the click event isn't propagated to the events created with L.DomEvents. For ...
2
votes
0answers
562 views

How to wire ESRI.ArcGIS.Desktop.AddIns.Extension to a custom AddIn Button click event?

I am developing custom ArcMap toolbar with various AddIn tools, button and extension. I see the sample how to access the ActiveView events in the extension Initialize() method. private void ...
2
votes
0answers
116 views

Cancel event in Python Gp tools with arcpy

In GP-tools written in C# (ArcObjects) we can listen for the Cancel-event and react on that. I wonder if there is anything similar in Python GP-tools applying arcpy. I googled that issue and the only ...
2
votes
0answers
69 views

How to prevent the user from moving the feature?

I want to prevent the user from moving the feature in ArcMap when editing. I used OnChangeFeature event but it does not work. void m_editEvents_OnChangeFeature(IObject obj) { ...
1
vote
1answer
2k views

Go to the URL when clicked on Leaflet marker

I want to implement marker click event so when user click on marker it goes to url. Url is written inside an array (a[3]). However, this is my code which doesn't work, it always goes to the link of ...
1
vote
2answers
4k views

SelectFeature not working in OpenLayers

I'm still sort of new to openlayers, but I've been able to set up a map which reads in a KML, loops through the different regions contained therein, and draws those polygons on a vector layer overtop ...
1
vote
1answer
116 views

Listen to edit events

I recently started working on ArcMap. I want to make some changes to the edit tools. For example I want to prevent the user from using the sketch tool when the time is between 1pm and 2pm But I ...
1
vote
1answer
54 views

How to let leaflet layer events to propagate to layer below

I am working on a leaflet map with three layers: a base tile-layer, a GeoJson layer and a label tile-layer. For display, I want the label layer to be on top, but for interaction I would like to let ...
1
vote
1answer
24 views

Openlayers. How to remove last sketch if invalid

I can currently identify if a polygon is invalid through wps as per below code. What I want to know is how to remove the last sketch polygon if it returns invalid? To give you an idea, here is the ...
1
vote
2answers
2k views

how does one reset map.fitbounds (zoomtofeature()) to the original zoom?

I have a lovely map setup using Leaflet with MapBox tiles (only). It is a United States map with polygons for each state with an onclick event to zoomToFeature. The basic zoomToFeature() function ...
1
vote
1answer
401 views

CartoDB.js - Accessing table fields in hover function

I am new to CartoDB.js and javascript in general, and I am attempting to highlight polygons in response to a mouse hover. My plan of attack attempts to utilize one of the interesting templates ...
1
vote
2answers
412 views

ESRI JS API - How to get event object from Draw Toolbar onDrawEnd

I am using the Draw Toolbar in the Esri Javascript API v3.4 and connecting to the onDrawEnd event using aspect.after(drawingToolbar, "onDrawEnd", drawEndHandleFunction, true); I am using the Draw ...
1
vote
1answer
134 views

How to abort a layer event in Openlayers

I have a problem ( How to stop features to redraw unwillingly in OpenLayers ) that might be solved by aborting the beforefeatureremoved or beforefeaturesremoved event. What I would like to to is to ...