ncssar / sartopo_python

Python calls for the caltopo / sartopo API
GNU General Public License v3.0
14 stars 2 forks source link

add line followed by crop fails, because no new since request is performed #28

Closed caver456 closed 2 years ago

caver456 commented 3 years ago

crop calls editObject, which only reads .mapData rather than doing a new since request.

What's the best way to handle this? Adding an argument to editObject to force a new since request is an option, but, finding the correct times to call that argument would not be great - having every crop operation do a new since request is pretty slow. For now, just deal with it in the caller by doing sts.doSync(once=True) before the crop operation(s), until we can think of a better way to automate it.

caver456 commented 2 years ago

Changed addLine, addMarker, addPolygon to immediately add the new object to .mapData. Combined with recent cache and sync overhaul this seems to have resolved the problem.