nickcam / FlareClusterLayer

ArcGIS javascript custom graphics layer. Create clusters...with flares.
https://flareclusterlayer.azurewebsites.net/index_v4.html
MIT License
134 stars 51 forks source link

Arcgis for js 4.9 #38

Closed JinLongy closed 5 years ago

JinLongy commented 5 years ago

Hi,nick.At first,my English is not good.I have a problem when introducing this FlareClusterLayer_v4.js to my Vue project.I received an error message,but I can't say it very clearly.So please see the attachment I uploaded for details. img001 img002 img003

nickcam commented 5 years ago

Hi @JinLongy, that error suggests that the class hasn't loaded correctly. Have you followed the esri-loader instructions here - https://github.com/Esri/esri-loader#configuring-dojo - to include the esri/extras package?

JinLongy commented 5 years ago

But I can print this js object to access. tim 20190112110828

JinLongy commented 5 years ago

I deployed the official api to the local server and placed this file in the esri directory. It stands to reason that you should be able to access this file.

nickcam commented 5 years ago

Oh yeah I see it now. In your example you need to instantiate it like this - var layer = new FlareClusterLayer.FlareClusterLayer({options});

The module imported in the loadModules() call isn't the actual class. It contains the class inside it, so you need to reference the class by using <module>.<class>, ie: since you're using FlareClusterLayer as the module name then it is - FlareClusterLayer.FlareClusterLayer.

Let me know how you go.

JinLongy commented 5 years ago

Well, it’s ok now. thank you very much.

nickcam commented 5 years ago

Ok cool.