ThinkGeo.com    |     Blog    |     Wiki    |     Support

Delete vertex causes null pointer excection

Deleting 2nd to last point causes a null pointer exception to be thrown. I also duplicated this issue using https://github.com/ThinkGeo/DrawEditFeaturesSample-ForAndroid with the latest 10.5.x android code. Using the sample above a placed a line with 2 points and then went to edit mode and attempted to delete one of the points

I have not verified this but I was told that this issue also occurs in the iOS version as well.

Hi Richard,

Thanks to let us know it.

I download the sample also, upgrade each package to the latest version. Because my installed android version is 9.0(pie), so I just upgrade the version of project.

Then I draw a line first:

Go back to Edit mode:

Double click the 2nd vertex:

It looks exception not been thrown there.

Then I back to pan mode and application still works.

If I missed any step please let me know.

Regards,

Ethan

I am not very accurate when trying to do double taps.


The circled vertex that is under that image is the one I am trying to delete and I am double tapping in that area – when I see that I didn’t actually delete the vertex I immediately try again. Sometime it does behave exactly as I would expect, but I can very reliably make it happen. I am using android version 8.1

Hi Richard,

Thanks to let us know how to reproduce it, in fact I don’t know what’s the control point there, it looks resize, move and rotate control point is in other position, I think if a vertex is covered by control point you should want to handle it by other way, because the control point will block your operation to vertex.

And MapSuite 8 had stopped to get support, so even we reproduce it we cannot fix it.

Could you please upgrade your version to 9 or 10? Version 9 is nearly the same and version 10 have big changes in dll references.

Regards,

Ethan

Sorry for clarification I am on Thinkgeo android version 10.5.x . My Android os version is 8.1

Hi Richard,

Thanks to point that.

But it looks I hadn’t found the operation button so I cannot reproduce it:

I had set like this:
androidMap.EditOverlay.CanAddVertex = true;
androidMap.EditOverlay.CanDrag = true;
androidMap.EditOverlay.CanRemoveVertex = true;
androidMap.EditOverlay.CanReshape = true;
androidMap.EditOverlay.CanResize = true;
androidMap.EditOverlay.CanRotate = true;

Regards,

Ethan