Comments (4)
This is possible using this repo and we have some docs pages that can shed some light on achieving this.
If you're using Esri JSAPI v3.x: https://arcgis.github.io/angular-esri-map-site-v1/#/patterns
If you're using Esri JSAPI v4.x: https://esri.github.io/angular-esri-map/#/patterns
We'll need more information to go on if the docs don't point you in the right direction. As per the new issue guidelines for this repo:
We can only provide useful help if we're able to reproduce the behavior you describe above. Please provide:
- Steps to reproduce the behavior
- A link to an app where we can carry out those steps (either our example pages, your publicly facing app, or a Plunker, JSFiddle, JSBin, etc)
- Relevant code snippet(s) (only if not easily obtained from the above link)
We've created Plunkers that you can use as a starting point if the bug does not show in our example pages, or your app is not publicly accessible:
- Start here if using v1 (Esri JSAPI 3.x)
- Start here if using v2 (Esri JSAPI 4.x)
Be sure to save your edits and save and include the link to your live sample in this issue description.
from angular-esri-map.
@bbehling adding onto @jwasilgeo comments above, click events do work using ArcGIS JS API 4.x. What you are noticing is there are no mouse events on the 4.x GraphicsLayer
Class. Reference - esri/layers/GraphicsLayer.
The events are available on SceneView
and include things like click
and pointer-move
, but there's no mouse-over
.
To capture click events in GraphicsLayer
you'll need to roll your own custom click handler. You could even repurpose this code to work with pointer-move
as long as the number of geometries in the layer didn't degrade mouse move performance. The basics of building it include adding the on-load
event to the esri-scene-view
element:
<esri-scene-view map="vm.map" on-load="vm.onViewLoaded" view-options="{scale: 50000000, center: [0, 0]}">
And in your controller code:
self.onViewLoaded = function(view){
console.log(view);
view.on("click",function(c){
console.log(c);
})
};
Here's an example app that prototypes one approach for determining if a graphic is near a click event: http://jsbin.com/tuqagop
from angular-esri-map.
Sorry, I should have specified some more information....
I have an Angular app that is not using this repo, but using the ESRI JSAPI v3.x. In that app, we create our own Angular ESRI directives.
I contacted ESRI support about this issue and was given the information this isn't supported, so I wasn't sure where else to post this question (also posted on the geonet forum).
For a work around, I used the click event on the map. When I get some extra time, I will post a plunkr similar to what we are doing in our app.
Everything else in our custom ESRI directives is working perfectly, its just these Graphic Layer events seem to be an issue. I tested the graphic-add event, and that event is raised.
from angular-esri-map.
Hi @bbehling, hopefully things are all good now? I'll close because it has been awhile since we've had activity on this issue, but feel free to reopen if anything else related comes up. Thanks.
from angular-esri-map.
Related Issues (20)
- Cannot use popupTemplate functions HOT 4
- Bower package not working but NPM Is HOT 3
- Critical dependency: the request of a dependency is an expression HOT 5
- Access ArcGIS Online items using OAuthentication - 4.3 HOT 10
- esriLoader.require()'s promise resolve an array failed HOT 1
- Vector Tile Layer not working HOT 2
- Update README w/ status and up to date info on Angular 2(+) HOT 5
- Calcite bootstrap moved our cheese and broke gh-pages site HOT 2
- Need information on displaying routes HOT 7
- Minor: Broken CSS in the doc HOT 2
- AngularJS goes into Long Term Support on July 1, 2018 HOT 2
- Map loads only certain tiles HOT 4
- GraphisLayer extent ?? HOT 7
- Short video tutorial HOT 3
- Testing the ArcGIS online sample shows error view.then is undefined HOT 4
- This repository is retired. It will be archived soon (Q4 2020) HOT 1
- Is there a wrapper for Angular2+ HOT 1
- Local csv file upload to csv layer of esri arcgis javascript api 4.12 HOT 8
- File Uploading to csv layer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-esri-map.