Questions tagged [event-listener]

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

Filter by
Sorted by
Tagged with
5 votes
0 answers
43 views

QGIS geometry editing listener

I would like to know if it's ever possible to make a listener on geometry editing. What I know so far is a geometryChanged signal that can be used in listening to layer when its feature's geometry is ...
user avatar
1 vote
1 answer
125 views

Mapbox - checkbox filters work in modal but not div

In my first map (https://codepen.io/flyinginsect2/pen/oNoQvNQ), the checkbox filters in the modal popup seem to work just fine. However, when I move the filters to a new div (https://codepen.io/...
user avatar
  • 145
0 votes
0 answers
86 views

Stop/prevent showing context menu in OpenLayers 3

I am trying to make the context menu in a way that I can control where to show and where not to show. The summary is like I should be able to enable and disable the context menu in OpenLayers 3. I am ...
user avatar
  • 139
0 votes
1 answer
81 views

Using event listeners such as Polygons, polylines and point for API query with ArcGIS JS

I recently started working on ArcGIS JS to query with API from another site. I want to get the rasterized outputs by calling the API. It would work the way of EOS's real-time crop analysis. I am ...
user avatar
0 votes
1 answer
94 views

Differences between 'target' and 'selected' properties of an event in OpenLayers

In the case of a browser event in OpenLayers, what exactly is the difference between: select.on('select', function (event) { let selectedFeature = event.selected[0]; } and: select.on('select', ...
user avatar
  • 6,698
1 vote
1 answer
141 views

Adding a tooltip overlay /eventListener to OL map when / for scrolling

I would like to fully implement Google Map API-s solution in Openlayers. I activated the ctrl+scroll zoom, but the poor user cannot know how to zoom now, and the nicest solution would be this: https://...
user avatar
2 votes
0 answers
62 views

Why is my eventlistener not listening to some tiles of the map? [closed]

I have a Leaflet map on a page that I developed as part of a school assignment. The ID of the map element is mapid. I have added mouse listeners to mapid. When I enter the area of mapid on my page, ...
user avatar
  • 21
1 vote
1 answer
418 views

QgsMapToolEmitPoint.canvasReleaseEvent not firing with SHIFT modifier

I've created a plugin that implements a Map Tool. It captures mouse click events, which works fine. Now I want to capture Shift+Mouseclick. This doesn't work at all, while Alt+Mouseclick and Ctrl+...
user avatar
  • 161
1 vote
0 answers
149 views

Difference between an interaction and eventListener in OpenLayers

I am wondering when should I use an interaction instead of an eventListener. For example I can have a handler function like this: function handler(evt) { if (evt.type === 'click') { console....
user avatar
2 votes
0 answers
2k views

Listen to a click event inside bindpopup with Leaflet

I'm using Leaflet, I have bound popups to layers, and created a popupopen event listener on the map as follow: map.on('popupopen', this._managePopUp.bind(this)); _managePopUp(layer) { ...
user avatar
  • 303
1 vote
1 answer
33 views

How do you retrieve a single attribute from a feature layer by clicking on it using ArcGIS Javascript API v3.2?

I am building a map that you can hover over and click on. I need to access a feature's project number (ProjectNum) when I click on it, but my click event on the layer doesn't seem to be firing. When I ...
user avatar
  • 147
0 votes
1 answer
68 views

List of possible events from event handler

This may be an elementary question but I cannot figure out how to word it so that I can google it properly. map.on('click', function(evt) { var coordinates = evt.coordinate; alert(coordinates)...
user avatar
  • 285
1 vote
3 answers
1k views

OpenLayers 4 hover popup delay

I added a function to display a popup on hover to the feature layer but it doesn't work very well. Here my code: map.on('pointermove', function(evt) { if (evt.dragging) { return; } var ...
user avatar
0 votes
1 answer
626 views

OpenLayers 2 loadstart and loadend

I want to add a loading symbol to my openlayers map, which is triggered when a layer is set to load and stopped when the layer is loaded. So I used the event listeners loadstart and loaded. Here is my ...
user avatar
  • 129
0 votes
1 answer
1k views

Calling a function after map display rather than map load

I have the following method which I am calling on load of the map. However when I try to turn on a particular layer within this code I am unsuccessful as although the map would have been loaded it ...
user avatar
  • 313
0 votes
1 answer
932 views

How to determine whether a map click event has been set?

The Evented section of the Leaflet documentation shows how to set an event listener for the map object: Leaflet deals with event listeners by reference, so if you want to add a listener and then ...
user avatar
  • 20.5k
3 votes
3 answers
671 views

Clear Points and Replot a new one

Is it possible to reset or clear the map and plot new points? I have a search box that am using to query a geojson API. After the first mapped result, the second search is plotted in addition which ...
user avatar
1 vote
1 answer
730 views

Displaying results through polygon tool on Leaflet map using event listeners

I have certain documents residing on within my database. Currently i am able to display their Geojson on the map by drawing a polyogon within a certain area and then clicking on a button but i want to ...
user avatar
  • 315
2 votes
1 answer
1k views

How to detect when new markers have been added to the leaflet map?

May i ask how to I add a event listener to the map to detect when a marker has been added to the map? In the docs, it says that we can use the "add" event, but how do I actually use it? http://...
user avatar
  • 123
1 vote
0 answers
949 views

An OL3 listener seems undefined as reported by ol-debug.js [closed]

I am using ol3/3.15.1/ol-debug.js, and get the error message in the console: ol-debug.js:6326 Uncaught TypeError: Cannot read property 'call' of undefined at ol.source.Vector.ol.events....
user avatar
3 votes
1 answer
2k views

Cannot catch click event on FeatureLayer in ArcGIS API for JavaScript 4?

I've got a SceneView with a FeatureLayer, and I'm trying to catch every click on a PictureMarkerSymbol to display additional data under the map. The map works well, so do symbols and popups, but I ...
user avatar
  • 173
3 votes
2 answers
3k views

Watching for scale/zoom changes in ArcGIS API for JavaScript 4?

I am trying to add an event listener for when the scale of the map changes, that is scale or zoom level changes in order to enable or disable feature layer label text. When the user zooms in to a ...
user avatar
  • 171
1 vote
0 answers
435 views

How to bind the 'mouseover' event in a leaflet-routing route?

I'm trying to mimic the GoogleMaps behavior of creating a small white circular marker on a route when you hover on the route. My idea is to listen for the 'mouseover' event (if there is any) and then ...
user avatar
2 votes
1 answer
3k views

Getting multiple functions to work with mouseover event in Leaflet

I am making a web mapping app using leaflet and some geoJSON data for a grid. I want to be able to mouseover each grid cell and both highlight that cell AND show a popup of the coordinates. In the ...
user avatar
  • 1,641
0 votes
1 answer
75 views

Multiple Selection with OL2

I created a map with some marker which can be selected and have them name appears in an external field. But i even if i am able to select multiple marker on the map ( shift command ), only one name ...
user avatar
2 votes
1 answer
1k views

Multiple Selection

I implemented a map with markers pointing to airports, and when I click on a marker the name of the airport appears in a field. (All date included in a GEOJson external file). I just have a last ...
user avatar
1 vote
0 answers
244 views

OpenLayers 3, map.on('moveend',..): Differentiate between user interaction and map.setCenter() calling

I am implementing OpenLayers for a GIS application and want to add a 20 seconds timeout when the user scrolled the map, after which the GPS auto track function should resume. For that I am utilizing ...
user avatar
1 vote
1 answer
4k views

why can't I load a layers list to select from to the map in openLayers 3, addEventListener and attachEvent are unavailable

I've tried to incorporate this sample that shows how to switch base layers into a page I am working on: http://openlayers.org/en/v3.10.1/examples/bing-maps.html When I try to load my page with the ...
user avatar
  • 1,386