how to resize map in unfolding?

edited March 2016 in Library Questions

I am currently using the unfolding library to do a map visualization of crime data. However, I don't want the map to be the same size as my size() in setup(). Is there a way to resize the map? I can't seem to figure out how to do it.

Tagged:

Answers

  • Answer ✓

    If you want to set the size of a map, simply use

    UnfoldingMap map = new UnfoldingMap(this, 0, 0, 600, 400);

    If you want to resize the map while running your app, you can use

    map.mapDisplay.resize(mouseX, mouseY);

  • Thanks that did the trick!

  • The markers seem to draw out of the map when I scroll around. Is there a way around this with the resized map? Do I have to add the radius of the marker or something? Also, is there a way to make the marker interactive like show information when the mouse is over it? Thank you!

Sign In or Register to comment.