GithubHelp home page GithubHelp logo

Identify example? about angular-esri-map HOT 4 CLOSED

esri avatar esri commented on May 26, 2024
Identify example?

from angular-esri-map.

Comments (4)

tomwayson avatar tomwayson commented on May 26, 2024

If you want to create a generic, reusable directive, the legend directive might be a better example in this case. You should be able to get a reference to the map in your directive by calling mapController.getMap(). Then you have a reference to the map which you can use to bind the identify task to a click event handler. You should probably include something like this block at the end of your directive's controller to remove your handler.

If you go that route, we'll welcome a PR here, however, if you're not really trying to create something that is reusable and generic, and instead are trying to handle more application specific logic, I'd suggest some other options:

  1. You could just handle the map's load event in your application's controller (see the map events example) and then use the esriLoader to load the identify task and then bind it to the map's click event right in your controller (or in a service) at the application level - this should be much simpler.
  2. If you have a lot of custom interaction w/ the map, you may want to roll your own directive following my parcel map sample.

from angular-esri-map.

Kollibri avatar Kollibri commented on May 26, 2024

I got it working. I'm not real familiar with git though. I will work on trying to get a sample uploaded properly so you can see how I implemented it.

from angular-esri-map.

Kollibri avatar Kollibri commented on May 26, 2024

#52 PR is made.

from angular-esri-map.

tomwayson avatar tomwayson commented on May 26, 2024

#52 adds the ability to set an info window for a dynamic service layer, which handles binding the map click to performing identify and displaying the pop up for the configured layers.

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.