AnsweredAssumed Answered

Any way to prevent generalization of features?

Question asked by evtguy on Oct 19, 2012
Latest reply on Oct 22, 2012 by evtguy
Me again. :D

I've been steadily knocking down many issues with my app and here's another one that I can't satisfactorily tackle using maxAllowableOffset.

My app loads at the full extent of my county. If I select a project from a combo box, the map will then zoom into the extent of the project's feature. The attached screenshot shows you what is returned after the zoom in. The line basically straight lines from end to end instead of following the shape of the road (note the curves at the south end of the project). As the user zooms in and out of the map, the graphic representation of the features gets better and better.

Since the feature layers I'm interested in only have ~30 records max, is there a way to specify that the features are ALWAYS drawn at the highest detail possible? I've tried adding a setMaxAllowable tied to the map's onZoomEnd event but it doesn't seem to correct the issue I see:

var maxOffset = function maxOffset(map, pixelTolerance) {   return Math.floor(map.extent.getWidth() / map.width) * pixelTolerance; }; . . .  dojo.connect(map, 'onZoomEnd', function() {       dojo.forEach(mapLayers, function(fl) {   fl.setMaxAllowableOffset(maxOffset(map,1));    });  });