Comments (4)
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:
- 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.
- 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.
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.
#52 PR is made.
from angular-esri-map.
#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)
- 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
- Graphics Layer Events Not Raised HOT 4
- 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.