use of uk.me.parabola.imgfmt.app.trergn.PolylineOverview in project mkgmap by openstreetmap.
the class MakeTestLangMap method drawStreetnames.
private void drawStreetnames(Map map, Subdivision div, double slat, double slon) {
char[] hexChars = "0123456789ABCDEF".toCharArray();
double lat = slat + 0.004;
double lon = slon + 0.002;
div.startLines();
map.setLabelCharset("simple8", true);
double space = 0.002;
double size = 0.006;
for (int y = 0; y < 16; y++) {
int start = 128 + 8 * y;
char[] out = new char[19];
out[0] = hexChars[(start & 0xf0) >> 4];
out[1] = hexChars[(start & 0x0f)];
out[2] = ' ';
for (int i = 0; i < 8; i++) {
out[3 + 2 * i] = (char) ('A' + i);
out[3 + 2 * i + 1] = (char) (start + i);
}
String name = new String(out);
Polyline l = div.createLine(new String[] { name, null, null, null });
double baseLat = lat + y * space;
Coord co = new Coord(baseLat, lon);
l.addCoord(co);
co = new Coord(baseLat, lon + size);
l.addCoord(co);
l.setType(6);
map.addMapObject(l);
}
map.addPolylineOverview(new PolylineOverview(0x600, 10));
}
use of uk.me.parabola.imgfmt.app.trergn.PolylineOverview in project mkgmap by openstreetmap.
the class MapDetails method getOverviews.
/**
* Get the overviews. We construct them at this point from the information
* that we have built up.
* Perhaps this could be a separate class rather than a list.
*
* @return A list of overviews.
*/
public List<Overview> getOverviews() {
List<Overview> ovlist = new ArrayList<Overview>();
for (Map.Entry<Integer, Integer> ent : pointOverviews.entrySet()) {
Overview ov = new PointOverview(ent.getKey(), ent.getValue());
ovlist.add(ov);
}
for (Map.Entry<Integer, Integer> ent : lineOverviews.entrySet()) {
Overview ov = new PolylineOverview(ent.getKey(), ent.getValue());
ovlist.add(ov);
}
for (Map.Entry<Integer, Integer> ent : shapeOverviews.entrySet()) {
Overview ov = new PolygonOverview(ent.getKey(), ent.getValue());
ovlist.add(ov);
}
return ovlist;
}
Aggregations