We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, no matter what co-ordinates i put in the x and y position of the map does not change. The height and width of the map is also wrong but can be changed...any help would be much appreciated!
import de.fhpotsdam.unfolding.UnfoldingMap;
import de.fhpotsdam.unfolding.geo.Location;
import de.fhpotsdam.unfolding.marker.SimplePointMarker;
import de.fhpotsdam.unfolding.providers.Google;
import processing.core.PApplet;
public class Main extends PApplet{
UnfoldingMap map;
Location location;
public static void main(String[] args) {
PApplet.main("Main");
}
public void settings() {
size(1000,1000);
}
public void setup() {
location = new Location(53.370471, -6.294091);
map = new UnfoldingMap(this, 1000,1000,1,1,new Google.GoogleMapProvider());
// no matter what i set for X and Y it appears at 0,0 also height and width dont work correctly either
location = new Location(53.370471, -6.294091);
map.zoomAndPanTo(location, 15);
SimplePointMarker marker = new SimplePointMarker(location);
map.addMarker(marker);
}
public void draw() {
background(255);
//System.out.println(map.getHeight());
stroke(50);
fill(15);
map.draw();
}
}
Answers
This is a known bug (see https://github.com/tillnagel/unfolding/issues/88)
You need to switch your renderer, i.e. use
size(1000, 1000, P2D)
in your settings method.