1

We've got a polygon feature class of parcels around a lake boundary that is incredibly accurate. The editor did a really thorough job of following all the inlets and meanders along the edge. From just a cartographic perspective, it's a great set of polygons.

Unfortunately, the result is an incredibly slow layer when we need to add it to a map service. Even at a fairly close zoom scale, it takes up to half a minute to load some of the more complex areas.

The obvious solution is to simplify the geometry. Unfortunately, the data owner doesn't really want to do that on his original layer (he's concerned about losing complexity when making static maps). There is department reluctance to make a new simplified copy because of recent pushes to reduce duplication of data.

Is there a way to simplify geometry on the fly when displaying highly complex polygons in an ArcGIS JavaScript API map viewer?

1

It looks like maxAllowableOffset is the answer. You can tell the server to generalize on demand using that parameter. There is a demo of this at https://developers.arcgis.com/javascript/jssamples/fl_generalize.html.

You can set it by calling FeatureLayer.setMaxAllowableOffset().

This may not help enough though. I used it with a ZIP code layer and ended up only really solving my performance problem by adding a query to the feature layer and modifying the query on the fly.

  • I can imagine there is still a performance trade-off since it has to calculate and filter based on that parameter. However, this is an exciting option to explore! – Erica Mar 11 '16 at 8:54
  • You're right; I had to index the field I used in the query. – Zian Mar 12 '17 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.