ItemIndex is wrong

Assuming 2 polygons on a map, when using DeleteMapPolygon, any further calls made to UpdateMapPolygon will fail because ItemIndex then becomes wrong. 

ItemIndex is populated when creating the Polygon (TPolygonCount which btw, isn't the best name for a variable as T normally is used for classes). If you delete Polygon 0, the ItemIndex of the remaining polygon (1) remains 1 (although we now only have 1 polygon and it should now be zero). 

UpdateMapPolygon uses the ItemIndex to access AllPolygons (in Javascript). This causes a Javascript error because the Index is now out of bounds. 

I was going to hack it and change it on the fly but we can't change ItemIndex (as it is a read-only property). 

What can I do?


This issue has now been fixed.
The update will be available with the next release of the TMS WebGMaps.