Geojson on default ArcGIS Map

547
6
11-22-2017 12:00 AM
aishvaryvardhan
New Contributor III

How can I use geojson file data to display on default Web AppBuilder Map provided by the application.

I have used this link "GitHub - Esri/geojson-layer-js: An easy way to load GeoJSON data into your ArcGIS map "

but here the map is being created and then used in the HTML file and is standalone file.

My query is how can I implement this feature in my Default Map. ?

P.S Can I use angularJS(1.4) to code in Web AppBuilder application ?

Any help on this is highly appreciated

Thanks

Ash

Tags (1)
0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Ash,

   The Add Data widget supports adding GeoJSON as run-time.

Add Data widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers 

You can also add GeoJSON to the WebMap in AGOL/Portal which the WAB APP can use as it's basemap:

ArcGIS Online supports GeoJSON | ArcGIS Blog 

aishvaryvardhan
New Contributor III

Robert ,

This seems to be great but May i know as in How can I display in map via code..
Consider a scenario  like i have to two checkbox and two Geojson file and on click one checkBox one Geojson should be invoked and data should be displayed.
and on click of both , both geojson should be triggered displaying from both

thanks

ash

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Ash,

   Then add the GeoJson to a AGOL under your content and then you can have access to add the PortalItem using code in your widget (have never had the need for such so I have no code example). Or you follow the guide for using a third party library (the github one you refernced in your first post) and add the GeoJson at runtime from your widget.

Use other libraries—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers 

aishvaryvardhan
New Contributor III

Thanks Robert, will try this way.

Robert a general question 

I am new to this tech of ArcGIS WAB Can you please suggest the necessary technology stack require for the same and some study links which can be helpful as I move further in development

P.S I am an AngularJS developer.

Thanks

Ash

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Ash,

  You should make heavy use of the WAB Dev help site and see the guide and samples sections as well as open the source code inside WAB Dev otb widgets to see how things are done. WAB / JS API ingeneral are Dojo centric so learning dojo basics are essential:

Create a custom in-panel widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developer... 

0 Kudos
aishvaryvardhan
New Contributor III

Thanks a ton Robert

0 Kudos