Select to view content in your preferred language

API JS for Arcgis 4 and D3.js Javascript Library

351
1
06-11-2023 03:52 PM
Med-Karim-Rouissi
Emerging Contributor

Hello, I am trying to use the D3.js library with the JS for Arcgis 4 API without success, there are examples on Github with the JS for Arcgis 3 API, my attempts to upgrade them to version 4.11 or 4.24 have failed.
here is the Github link: https://github.com/chelm/esri-d3
If anyone has had success using the JS for Arcgis 4 API with D3.js, thank you in advance for posting a solution.

Karim

0 Kudos
1 Reply
Med-Karim-Rouissi
Emerging Contributor

I am using JS API for Arcgis 4.11 and D3.js version 3,
I changed the following module:
"esri/geometry/webMercatorUtils",
by:
"esri/geometry/support/webMercatorUtils"

the error I get is: "Uncaught TypeError: Cannot read properties of undefined (reading 'properties')"
it always crashes when reading 'new d3Layer' regardless of the example chosen:
const layer = new d3Layer(...

0 Kudos