I have one hosted feature service on ArcGIS Online organizational account and it is shared with everyone. When I am trying to access this featurelayer from a javascript api the layer is not visible. Kindly help
You could also set the extent of the map from the feature layer itself, like in this example
JS Bin - Collaborative JavaScript Debugging
Hi It is working after changing to https:// from http://
Tough to see but there are 4 orange dots, may be easier to see if you turn basemap to streets.
I think your center coordinates are off. Try center: [76.641536,12.316173],
This worked for me:
require([ "esri/map", "esri/layers/FeatureLayer", "dojo/domReady!" ], function( Map, FeatureLayer ) {
var map = new Map("map", { basemap: "hybrid", center: [76.641536,12.316173], zoom: 10 });
/**************************************************************** * Add feature layer - A FeatureLayer at minimum should point * to a URL to a feature service or point to a feature collection * object. ***************************************************************/
// Carbon storage of trees in Warren Wilson College. var featureLayer = new FeatureLayer("http://services1.arcgis.com/ECFqcT5baCSej64y/ArcGIS/rest/services/mysore1/FeatureServer/0");
map.addLayer(featureLayer);
});
Please post your code to show how you are attempting to access the feature service.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.