How do you put ModestMap into a set area in a sketch???
in
Contributed Library Questions
•
1 month ago
Hello,
After working with processing for a bit and hacking my way through many examples I have a problem I can not figure out that should be easy to solve, (I hope...) In my project I need to place a map on the screen but not the whole screen. I am using ModestMaps for my map application. I have created a sample sketch as an example, as the project sketch is far to large. My goal is to get the map where the rectangle is and have the rest of the screen for other uses.
See Sketch:
Also, how would you place multiple maps on the screen?
- import processing.opengl.*;
- import com.modestmaps.*;
- import com.modestmaps.core.*;
- import com.modestmaps.geo.*;
- import com.modestmaps.providers.*;
- InteractiveMap map;
- void setup() {
- size(1600, 900, OPENGL);
- String template = "http://{S}.mqcdn.com/tiles/1.0.0/osm/{Z}/{X}/{Y}.png";
- map = new InteractiveMap(this, new Microsoft.HybridProvider());
- map.setCenterZoom(new Location(33.127812, -117.147779),12);
- }
- void draw() {
- background(0);
- map.draw();
- // Added for example only.
- // Instead of map being full screen, I would like it here.
- rect(1000,20,500,300);
- }
1