Unfolding library - SimpleLinesMarker class

edited February 2014 in Library Questions

I've been using this amazing library!, but having some problems with the 'draw' function inside the marker class I've created, extending the SimpleLinesMarker built in class. As far as I could find in the existing documentation, the draw function should appear within the class in the following way: public void draw(PGraphics pg, ArrayList mapPositions) { }

but when I draw the map (map.draw () ) this function is not being called. My guess is the the object type 'MapPosition' is not recognized by processing, or that the function should be called in a different way. Anyone has any idea?...

thanks!

Answers

  • Answer ✓

    (We solved this via e-mail in between. But for others... )

    The problem was that the super class uses List and not ArrayList, so in order to implement the draw method correctly it has to be like this:

    public void draw(PGraphics pg, List mapPositions)

    You can now find two examples (for extending SimpleLinesMarker and SimplePolygonMarker) in the Marker tutorial under "Create your own marker".

Sign In or Register to comment.