Collect: Non closed polygons

Created on 9 Sep 2016  路  6Comments  路  Source: getodk/collect

If you complete a geoshape using the google map then the resulting polygon is not properly closed.

  • odkCollect Version: 1.4.10 (1061)
  • Source File: GeoShapeGoogleMapActivity.java
  • Lines: 311
  • Issue: The 2nd point in the polygon is used to close it rather than the first

I think it should be markerArray.get(0) in the code fragment reproduce below:

if (markerArray.size() > 1 ){ markerArray.add(markerArray.get(1)); for (int i = 0 ; i < markerArray.size();i++){ String lat = Double.toString(markerArray.get(i).getPosition().latitude); String lng = Double.toString(markerArray.get(i).getPosition().longitude); String alt ="0.0"; String acu = "0.0"; temp_string = temp_string+lat+" "+lng +" "+alt+" "+acu+";"; } }

bug help wanted

All 6 comments

Hey @jnordling. Can you take a look at this and submit a fix?

Ill take a look and see what the issue and submit a fix.

@jnordling Did you make any progress on this?

Thanks @nap2000 for finding this. I have put in a PR to resolve the issue. @yanokwa can confirm and bring it in.

See PR https://github.com/opendatakit/collect/pull/250

@nap2000, don't hesitate to skip right to submitting a PR for something like this where you've identified the fix! 馃槉

Fixed #250.

Was this page helpful?
0 / 5 - 0 ratings