AnsweredAssumed Answered

Only part of layer is showing when I try to draw it on a map

Question asked by taeratrin on Oct 20, 2016
Latest reply on Oct 20, 2016 by rscheitlin

I'm pretty new to this, and I've been trying to follow the guides here. We have a simple service serving out a feature layer for parcels. When I load it up in in the ArcGIS.com map (the layer takes a minute to load), it displays fine. When I try to place it on a map in my own webpage, only a small number of the parcels display. Any help would be greatly appreciated. Below is my code:

 

<html>
<head>
<meta charset=utf-8 />
<title>Galveston GIS Testing</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<link rel="stylesheet" href="https://js.arcgis.com/4.1/esri/css/main.css">
<script src="https://js.arcgis.com/4.1/"></script>
<script>

var parcelLayer;
require([
"esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer",
"dojo/dom",
"dojo/on",
"dojo/domReady!"
], function(Map, MapView, FeatureLayer, dom, on) {

parcelLayer = new FeatureLayer({
url: "http://gis.cityofgalveston.org/arcgis/rest/services/KML_test/TEST_api/MapServer/0",
id: "parcels",
visible: true
});

var map = new Map({
basemap: "streets",
layers: [parcelLayer]
});

var view = new MapView({
container: "viewDiv", // Reference to the DOM node that will contain the view
map: map,
center: [29.25, -94.84] // References the map object created in step 3
});

parcelLayer.then(function() {
view.goTo(parcelLayer.fullExtent);
});
});
</script>
<style>
html, body, #viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
</head>
<body>
<div id="viewDiv"></div>


</body>
</html>

Here's a screenshot of the map I get:

Outcomes