ng-popups | Alert , confirm and prompt dialogs | Frontend Framework library
kandi X-RAY | ng-popups Summary
kandi X-RAY | ng-popups Summary
Alert, confirm and prompt dialogs for Angular. Simple as that.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ng-popups
ng-popups Key Features
ng-popups Examples and Code Snippets
Community Discussions
Trending Discussions on ng-popups
QUESTION
I'm aware of binding a pop-up to ESRI's L.esri.DynamicMapLayer
here. The following code below is successful.
ANSWER
Answered 2021-Jan-25 at 04:43Serendipitously, I have been working on a different problem, and one of the byproducts of that problem may come in handy for you.
Your primary issue is the asynchronous nature of the click event. If you open up your map (the first jsfiddle in your comment), open your dev tools network tab, and start clicking around, you will see a new network request made for every click. That's how a lot of esri query functions work - they need to query the server and check the database for the value you want at the given latlng
. If you tried to attach that same behavior to a mousemove
event, you'll trigger a huge number of network requests and you'll overload the browser - bad news.
One solution of what you can do, and its a lot more work, is to read the pixel data under the cursor of the image returned from the esri image service. If you know the exact rgb value of the pixel under the cursor, and you know what value that rgb value corresponds to in the map legend, you can achieve your result.
Here is a working exampleAnd Here is the codesandbox source code. Don't be afraid to hit refresh, CSB is little wonky in the way it transpiles the modules.
What is happening here? Let's look step by step:
- On map events like
load
,zoomend
,moveend
, a specialized function is fetching the same image that L.esri.dynamicMapLayer does, using something calledEsriImageRequest
, which is a class I wrote that reuses a lot of esri-leaflet's internal logic:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ng-popups
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page