Select to view content in your preferred language

Refresh map after resetting maxAllowableOffset?

934
2
12-05-2012 09:44 AM
AllisonAnderson
Occasional Contributor
Is there a way to refresh the map after recalculating the maxAllowableOffset?  I'm using the renderer sample here - http://help.arcgis.com/en/webapi/javascript/arcgis/samples/renderer_generate_renderer/index.html  which recalculates the maxOffset on ZoomEnd, but if you zoom in a lot, there are big gaps in polygons and the features don't redraw with the new offset until you change the selected attribute.  See the attached images:
[ATTACH=CONFIG]19726[/ATTACH]  [ATTACH=CONFIG]19727[/ATTACH]

Is there a way to redraw the map so that the maxOffset is calculated and the map redraws?  I'm not seeing any methods, but I'm probably overlooking something. I'm just not sure why you would recalculate the offset if the map isn't using it.
0 Kudos
2 Replies
by Anonymous User
Not applicable
Original User: mattlane86

I think the problem with that sample is that the layer is added to the map as MODE_SNAPSHOT, so it's doesn't really change with the offset change. If it is loaded as MODE_ONDEMAND, then it should.
0 Kudos
AllisonAnderson
Occasional Contributor
You are correct!  That did the trick.  Thanks.
0 Kudos