AnsweredAssumed Answered

Feature Layer will not show

Question asked by U29130765_usflibrary on May 1, 2020
Latest reply on May 2, 2020 by joaovcoelho

Hi, I currently cannot get the feature layer to load at the moment. Any help is appreciated. 

 

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>Intro to MapView - Create a 2D map</title>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.15/esri/themes/light/main.css" />
<script src="https://js.arcgis.com/4.15/"></script>
<script>
require(["esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer",
], function(Map, MapView, FeatureLayer) {

var map = new Map({
basemap: "streets"
});
var view = new MapView({
container: "viewDiv", // Reference to the scene div created in step 5
map: map, // Reference to the map object created before the scene
zoom: 11, // Sets zoom level based on level of detail (LOD)
center: [282.9, 38.9] // Sets center point of view using longitude,latitude
});

var publicschoolsLayer = new FeatureLayer({
url: "https://services1.arcgis.com/MiBZ4u97DWldovjI/arcgis/rest/services/schools_services/FeatureServer/0/query?outFields=*&where=1%3D1"
});


});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>

Outcomes