Hi, I have the following code to accomplish a simple task, to display the geo-posiition of a mouse in a map.
import de.fhpotsdam.unfolding.*;
import de.fhpotsdam.unfolding.geo.*;
import de.fhpotsdam.unfolding.utils.*;
UnfoldingMap map;
void setup() {
size(800,800);
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);
}
I tried this out. Yet, it does not work. I mean, I click a position of the map, yet the latitude and longitude pair do not appear at all.
I was wondering, does anyone know what might be wrong in the code?