I am adding a bunch of points to a custom overlay dynamically using ClientScript.GetCallbackEventReference.
MultipointShape pointContainerShape = new MultipointShape();
pointContainerShape.Points.Add(new PointShape(-94.48242, 38.75977));
InMemoryMarkerOverlay markerOverlay = new InMemoryMarkerOverlay();
markerOverlay.Features.Add(new Feature(eachPointContainerShape));
Map1.CustomOverlays.Add(markerOverlay);
Next I try to refresh map on the client side
var layerList = myMap.layers;
for (var layerCounter = 0; layerCounter < layerList.length; layerCounter++) {
var eachLayer = layerList[layerCounter];
if (eachLayer != undefined && eachLayer.name != 'StaticOverlay' && eachLayer.name != 'DynamicOverlay')
eachLayer.redraw(true);
}
The javascript code gets called and has no errors, yet the points dont show up on the map?
Thanks