Unfolding Maps Example Not Working - Why?

edited March 2017 in Library Questions

The example that I am using is listed below. Its the second example in learning Unfolding Maps. The program compiles (Processing 3.2.3) without error and loads with the following messages: Unfolding Map v0.9.6 No OpenGL renderer, Using Java2MapDisplay

the code is:

import de.fhpotsdam.unfolding.*; import de.fhpotsdam.unfolding.core.*; import de.fhpotsdam.unfolding.data.*; import de.fhpotsdam.unfolding.events.*; import de.fhpotsdam.unfolding.geo.*; import de.fhpotsdam.unfolding.interactions.*; import de.fhpotsdam.unfolding.mapdisplay.*; import de.fhpotsdam.unfolding.mapdisplay.shaders.*; import de.fhpotsdam.unfolding.marker.*; import de.fhpotsdam.unfolding.providers.*; import de.fhpotsdam.unfolding.texture.*; import de.fhpotsdam.unfolding.tiles.*; import de.fhpotsdam.unfolding.ui.*; import de.fhpotsdam.unfolding.utils.*; import de.fhpotsdam.utils.*;

UnfoldingMap map;

void setup() { size(800, 600); map = new UnfoldingMap(this); MapUtils.createDefaultEventDispatcher(this, map); }

void draw() { map.draw(); Location location = map.getLocation(mouseX, mouseY); fill(0); text(location.getLat() + ", " + location.getLon(), mouseX, mouseY); }

Answers

  • My apologies: I realized that the "Not Working" is really a poor way to start. The problem (and therefore my question) is that the map seems to be produced correctly but the lat/lon is not appearing on the screen. Why?

  • Answer ✓

    Please edit your post, select your code and hit ctrl+o to format your code. Make sure there is an empty line above and below your code.

    What version of unfolding map are you using?

    The error you get is an actual error or a warning? I am guessing your display stops executing or are you getting a black non-interactive/unresponsive screen?

    Also, can you provide a link to the example you are referring to? I notice you did not specify any location when your started your object. I am guessing the application is defaulting to the zero latitude zero longitude coordinate. Have any other example worked for you? You can acces the examples if you click on the github icon: http://unfoldingmaps.org/examples/

    Kf

  • Answer ✓

    You are using Unfolding Maps 0.9.6, which is not working with Processing 3.

    Since an awful long time, we do provide beta versions of Unfolding Map for people to try it out. Send us an e-mail if you want to get access.

  • Thank you for your response. I had to go on to other projects and Unfolding Map will remain on the shelf for now but I will get back to it.

Sign In or Register to comment.