Select to view content in your preferred language

Using a local service with the Cluster Layer JS GitHub code?

1187
1
08-31-2016 12:30 PM
MetralAlexis
Regular Contributor

Hi,

I’m trying to use my own layer with the Layer JS GitHub code with no success. That’s a local layer published by ArcGIS Server 10.3.1 which contains only points and I need to keep it private.

Below you can see how I've replaced the original layer by my local one.

// Add cluster renderer
clusterLayer = new ClusterFeatureLayer({
     //"url": "https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/World_Cities/FeatureServer/0",
     "url": "https://rtftwebarcgis.ae.riotinto.org/arcgis/rest/services/test/test/FeatureServer/0",
     etc ...

However, it works if I use the same data and create a new service shared as public in ArcGIS Online. Therefore, I guess that the service itself is fine and that should be a network or security issue. For some reasons, it doesn't like my local service and prefer a  https://services.arcgis.com/etc ... one.  

Any ideas about how to make it work with my local service ?

Thanks.

Tags (1)
0 Kudos
1 Reply
MetralAlexis
Regular Contributor

I see that the only thing which is not pointing locally is the reference to the ArcGIS API for JavaScript (https://js.arcgis.com/3.15compact). Could it be because we don't host it in our web server ?

0 Kudos