Skip to content
This repository has been archived by the owner on Jan 12, 2018. It is now read-only.

How to register a plugin? #9

Closed
coreyog opened this issue May 25, 2016 · 6 comments
Closed

How to register a plugin? #9

coreyog opened this issue May 25, 2016 · 6 comments

Comments

@coreyog
Copy link

coreyog commented May 25, 2016

I want to require a third party plugin: http://www.arcgis.com/home/item.html?id=a8f78cc6adea48cb8e962d7e36b9d010

Their examples use old non-Angular, non-esriSystem ways to import the custom layer by using djConfig.

How can esriSystem let me configure for the import of this layer?

@jwasilgeo
Copy link
Contributor

@coreyog I am working on a plnkr to try to illustrate how this can be done. I'll update this thread when I have a working example.

@jwasilgeo
Copy link
Contributor

jwasilgeo commented Jun 1, 2016

Check out this plnkr using the "Esri/cluster-layer-js" repo on a map:
http://plnkr.co/edit/bZNzdI?p=preview

The way that I've put this together, @coreyog, is that one can register plugins / packages to inform Dojo how to load external resources (see index.html dojoConfig). Then, in esri-system-js, you can register these packages just like any other module in the Esri JSAPI (see app/esriLoad.js).

@jwasilgeo
Copy link
Contributor

Does anyone else have other possible solutions in mind or feedback on the above?

@tomwayson
Copy link
Member

Nice work @jwasilgeo. That's exactly how I would have done it.

@coreyog
Copy link
Author

coreyog commented Jun 1, 2016

It seems to be working. Now I'm getting an error about dojo.provide not existing but that may be the plugin to blame.

EDIT: By "seems to be working" I mean that it is requesting the plugin and running it or else I wouldn't be getting the dojo.provide error. I'm also not getting any other errors which is why I think it's just an out of date plugin.

@tomwayson
Copy link
Member

Thanks @coreyog. Based on your comment, I'm closing this issue for now. Feel free to re-open if needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants