tillnagel / unfolding

A library to create interactive maps and geovisualizations in Processing and Java
http://unfoldingmaps.org
Other
477 stars 245 forks source link

Marker does not display in processing #142

Closed 5wimming closed 7 years ago

5wimming commented 7 years ago

there is my question:

import de.fhpotsdam.unfolding.*;
import de.fhpotsdam.unfolding.geo.*;
import de.fhpotsdam.unfolding.utils.*;
import de.fhpotsdam.unfolding.providers.*;
import de.fhpotsdam.unfolding.marker.*;
UnfoldingMap map;
void setup(){
  size(800,800);
  map=new UnfoldingMap(this);
  map.setZoomRange(2,15);
  MapUtils.createDefaultEventDispatcher(this,map);

  Location berlinLocation = new Location(52.5, 13.4);
  Location dublinLocation = new Location(53.35, -6.26);     
  // Create point markers for locations
  SimplePointMarker berlinMarker = new SimplePointMarker(berlinLocation);
  SimplePointMarker dublinMarker = new SimplePointMarker(dublinLocation);
  berlinMarker.setStrokeWeight(50);   
  // Add markers to the map
  map.addMarkers(berlinMarker, dublinMarker);//after running,it does not display,why?

}
void draw(){
  background(10);
  map.draw();//after running,it can display

  Location location=map.getLocation(mouseX,mouseY);
  fill(0);
  textSize(100);
  text(location.getLat()+","+location.getLon(),mouseX,mouseY);//after running,it does not display,why?
  text("it does not display",mouseX,mouseY);//after running,it does not display,why?
  noStroke();
  fill(200, 200, 0, 100);
  ellipse(200, 200, 40, 40);//after running,it does not display,why?
}

I use processing3.2.3. why are them not displaying? sorry,my English is very poor,wish you can understand my question, thanks.

tillnagel commented 7 years ago

Currently, Unfolding for P3 beta does not work properly with the default renderer. Simply change your

size(800,800);

to

size(800,800, P2D);

Closing this as duplicate of #118.