How to integrate another API into App?

552
1
11-08-2018 11:12 AM
HimalPatel
New Contributor

Suppose, there is already an internal REST API in place that returns geoJSON. 

Is there a way to replace the ArcGIS rest service with an internal API?

Example:

var featureLayer = new FeatureLayer({ url: "https://arc.gis/arcgis/rest/services/Random/Randomservice/Map/0" });

to

// This is the issue in question

var featureLayer = new FeatureLayer({ url: "https://internal/rest/services/Random/Randomservice/Map/0" });

The question may need to be updated. 

Thank you.

0 Kudos
1 Reply
Noah-Sager
Esri Regular Contributor

Himal Patel the FeatureLayer will only work when the resources come from ArcGIS Server, ArcGIS Online, ArcGIS Enterprise, or client side graphics. The last bit might be the most interesting for you, here is an example:

Create a FeatureLayer with client side graphics | ArcGIS API for JavaScript 4.10 

However, there are a couple of layers that the ArcGIS API for JavaScript offer that work with non-ArcGIS resources: 

KMLLayer | API Reference | ArcGIS API for JavaScript 4.10 

WebTileLayer | API Reference | ArcGIS API for JavaScript 4.10 

WMSLayer | API Reference | ArcGIS API for JavaScript 4.10 

Hope this helps.

0 Kudos