Git Product home page Git Product logo

Comments (4)

jwasilgeo avatar jwasilgeo commented on June 24, 2024

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:

  1. Steps to reproduce the behavior
  2. 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)
  3. 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:

Be sure to save your edits and save and include the link to your live sample in this issue description.

from angular-esri-map.

andygup avatar andygup commented on June 24, 2024

@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.

bbehling avatar bbehling commented on June 24, 2024

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.

jwasilgeo avatar jwasilgeo commented on June 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.