Javascript API

725
14
01-08-2020 12:42 PM
DeveshKhosla
New Contributor

Can we create API locally server not on the ESRI server.

ie. i have https://tiles.arcgis.com/tiles/Ezk9fcjSUkeadg6u/arcgis/rest/services/OPCNM/VectorTileServer 

I want to create this api 

https://localhost:5272/Tiles_VectorTileServer 

Tags (2)
0 Kudos
14 Replies
ChrisSmith7
Frequent Contributor

Are you asking if you can create a tile service outside of ArcGIS Server? You mentioned the API, which can be hosted locally, but it doesn't sound like this is what you're looking to accomplish.

0 Kudos
DeveshKhosla
New Contributor

Yes. Can we create tiles service outside ArcGis Server?

0 Kudos
DeveshKhosla
New Contributor

I am looking for Tiles , feature layer, etc outside ArcGis server.

0 Kudos
ChrisSmith7
Frequent Contributor

When it comes to feature layers, you're not bound to ArcGIS Server. For example, check-out ArcGIS API for JavaScript Sandbox 

This sample uses GeoJSONLayer, but you can also create a FeatureLayer from the graphics returned by a geojson call... it's just a little more work. Let me know if GeoJSONLayer isn't something you can use and I'll supply a sample for converting GeoJSON into a FeatureLayer.

You can also create layers using CSVs - ArcGIS API for JavaScript Sandbox 

For tiles, can you use ArcGIS Online? Also, have a look at this - https://community.esri.com/thread/184269-is-it-possible-to-render-mapbox-vector-tiles-pbf-from-a-cus... 

0 Kudos
DeveshKhosla
New Contributor

Thank you so much for reply.

Firstly can you provide me sample code to convert GeoJson to Feature layer.

Second, I have mostly NDVI images they are tiff files. That's why i was using tiles to display my Tiff files.

If you have any other way we can display tiff image. Without ArcGis Server.

Thirdly,I was thinking about postGresql to save these layer.

0 Kudos
ChrisSmith7
Frequent Contributor

Here's another one of my threads that has code on how to convert GeoJSON to FeatureLayer:

Polygon renderer issue fixed in v4.13 - when's the release date? 

...let me see if I can create something for you...

0 Kudos
DeveshKhosla
New Contributor

Thank you. I want display data without using ArcGis Server. 

ArcGIS API for JavaScript Sandbox 

How I can create tiles or feature layer Api on my own server.

Do you have any sample code.

0 Kudos
Noah-Sager
Esri Regular Contributor

Are you asking how to publish and host tiled layers and feature layers on a non-ArcGIS server? Honestly, I'm not sure how to do that. The samples above show how to consume resources without using ArcGIS Enterprise. Some layers can be hosted and consumed (like VectorTileLayer, WebTileLayer, WMS, and WMTS) from a third-party server, and some cannot (e.g. MapImageLayer, FeatureLayer). For the FeatureLayer, you could still create one programmatically, but I think only ArcGIS Enterprise can host an actual FeatureLayer. Soon, the 4x version of the JS API will support WebFeatureLayer (which is currently supported at 3x).

Your best bet is to:

1) review documentation for third party servers, like GeoServer, and OGC standards

GeoServer 

Web Map Service | OGC 

2) review our API reference for how to consume such layer types

FeatureLayer | ArcGIS API for JavaScript 4.14 

VectorTileLayer | ArcGIS API for JavaScript 4.14 

WebTileLayer | ArcGIS API for JavaScript 4.14 

WMTSLayer | ArcGIS API for JavaScript 4.14 

WMSLayer | ArcGIS API for JavaScript 4.14 

0 Kudos