Closed RoDuth closed 11 months ago
I seem to have worked it out. Correct approach is:
poly = osmgpsmap.MapPolygon.new()
track = poly.get_track()
track.add_point(osmgpsmap.MapPoint.new_radians(1.25663706, -0.488692191))
track.add_point(osmgpsmap.MapPoint.new_radians(1.06465084, -0.750491578))
track.add_point(osmgpsmap.MapPoint.new_radians(1.064650849, -0.191986218))
self.osm.polygon_add(poly)
Looking at the examples polygon.c and trying to add a similar polygon to mapviewer.py I tried this:
The example crashes with:
TypeError: could not convert value for property `track' from MapTrack to gpointer
or when using one of the alternatives methods of setting the track as commented out aboveAm I missing something?