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
Please post your code to show how you are attempting to access the feature service.
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);
});
Tough to see but there are 4 orange dots, may be easier to see if you turn basemap to streets.
You could also set the extent of the map from the feature layer itself, like in this example