Changeset 7378 in josm
- Timestamp:
- 2014-08-12T11:36:47+02:00 (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r7109 r7378 70 70 import org.openstreetmap.josm.gui.mappaint.StyleCache.StyleList; 71 71 import org.openstreetmap.josm.gui.mappaint.TextElement; 72 import org.openstreetmap.josm.gui.mappaint.mapcss.Selector; 72 73 import org.openstreetmap.josm.tools.CompositeList; 73 74 import org.openstreetmap.josm.tools.ImageProvider; … … 1244 1245 Main.pref.getBoolean("mappaint.use-antialiasing", true) ? 1245 1246 RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF); 1246 1247 1247 1248 highlightLineWidth = Main.pref.getInteger("mappaint.highlight.width", 4); 1248 1249 highlightPointRadius = Main.pref.getInteger("mappaint.highlight.radius", 7); … … 1488 1489 List<Way> ways = data.searchWays(bbox); 1489 1490 List<Relation> relations = data.searchRelations(bbox); 1490 1491 1491 1492 final List<StyleRecord> allStyleElems = new ArrayList<>(nodes.size()+ways.size()+relations.size()); 1492 1493 1493 1494 ConcurrentTasksHelper helper = new ConcurrentTasksHelper(allStyleElems, data); 1494 1495 … … 1506 1507 } 1507 1508 1508 Collections.sort(allStyleElems); 1509 Collections.sort(allStyleElems); // TODO: try parallel sort when switching to Java 8 1509 1510 1510 1511 for (StyleRecord r : allStyleElems) { … … 1517 1518 ); 1518 1519 } 1519 1520 1520 1521 if (Main.isTraceEnabled()) { 1521 1522 timeFinished = System.currentTimeMillis(); 1522 System.err.println("; phase 2 (draw): " + (timeFinished - timePhase1) + " ms; total: " + (timeFinished - timeStart) + " ms"); 1523 } 1524 1523 System.err.println("; phase 2 (draw): " + (timeFinished - timePhase1) + " ms; total: " + (timeFinished - timeStart) + " ms" + 1524 " (scale: " + circum + " zoom level: " + Selector.GeneralSelector.scale2level(circum) + ")"); 1525 } 1526 1525 1527 drawVirtualNodes(data, bbox); 1526 1528 } finally { -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Instruction.java
r7069 r7378 36 36 this.key = key; 37 37 this.isSetInstruction = isSetInstruction; 38 if (val instanceof LiteralExpression) { 38 if (val instanceof Keyword) { 39 if ("none".equals(((Keyword) val).val)) { 40 this.val = null; 41 } else { 42 this.val = val; 43 } 44 } else if (val instanceof LiteralExpression) { 39 45 Object litValue = ((LiteralExpression) val).evaluate(null); 40 46 if (key.equals(TEXT)) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r7285 r7378 596 596 return 2.0 * Math.PI * R / Math.pow(2.0, lvl) / 2.56; 597 597 } 598 599 public static int scale2level(double scale) { 600 if (scale < 0) 601 throw new IllegalArgumentException(); 602 return (int) Math.floor(Math.log(2 * Math.PI * R / 2.56 / scale) / Math.log(2)); 603 } 598 604 599 605 @Override -
trunk/styles/standard/elemstyles.mapcss
r7377 r7378 12 12 meta { 13 13 icon: "dialogs/mappaint/josm_small.png"; 14 } 15 16 canvas { 17 default-points: false; 14 18 } 15 19 … … 26 30 object-z-index: 10; 27 31 icon-image: "misc/note-annotation.png"; 32 } 33 34 /* special display of unreviewed tiger data (USA) */ 35 way["tiger:reviewed"=no]::core_tiger { 36 major-z-index: -10; 37 width: 11; 38 color: tiger_data#808000; 39 opacity: 0.6; 28 40 } 29 41 … … 270 282 node[toll] { 271 283 icon-image: "misc/no_icon.png"; 272 }273 274 /**************/275 /* place tags */276 /**************/277 278 /* lot's of "openGeoDB:..." tags can be found in germany */279 node["openGeoDB:type"=Stadt],280 node["openGeoDB:type"=Kreis],281 node["openGeoDB:type"=Gemeinde],282 node["openGeoDB:type"=Ort],283 node["openGeoDB:type"=District],284 node["openGeoDB:location"=locality] {285 icon-image: "place/settlement/town.png";286 text: auto;287 }288 area[place=continent],289 area[place=country],290 area[place=state],291 area[place=region],292 area[place=county],293 area[place=city],294 area[place=town],295 area[place=village],296 area[place=hamlet],297 area[place=isolated_dwelling],298 area[place=neighbourhood],299 area[place=suburb],300 area[place=locality],301 area[place=island],302 area[place=islet] {303 fill-color: place#8de3cb;304 }305 node[place=continent],306 node[place=country],307 node[place=state],308 node[place=region],309 node[place=county] {310 icon-image: "place/settlement/capital.png";311 text: auto;312 }313 node[place=city] {314 icon-image: "place/settlement/city.png";315 text: auto;316 }317 node[place=town],318 node[place=village],319 node[place=hamlet],320 node[place=isolated_dwelling],321 node[place=neighbourhood],322 node[place=suburb] {323 icon-image: "place/settlement/town.png";324 text: auto;325 }326 node[place=locality] {327 icon-image: "place/locality.png";328 text: auto;329 }330 node[place=island] {331 icon-image: "place/island.png";332 text: auto;333 }334 node[place=islet] {335 icon-image: "place/islet.png";336 text: auto;337 }338 /* special display of unreviewed tiger data (USA) */339 way["tiger:reviewed"=no]::core_tiger {340 major-z-index: -10;341 width: 11;342 color: tiger_data#808000;343 opacity: 0.6;344 284 } 345 285 … … 3610 3550 /***************/ 3611 3551 3612 canvas {3613 default-points: false;3614 }3615 3552 node { 3616 3553 text: auto; … … 3625 3562 } 3626 3563 node|z16-:tagged { 3627 symbol-stroke-color: node_tagged#ccffff; 3564 symbol-stroke-color: none; 3565 symbol-fill-color: node_tagged#00ffff; 3628 3566 } 3629 3567 … … 3655 3593 node|z21,area|z21 { font-size: 10; } 3656 3594 node|z22-,area|z22- { font-size: 11; } 3595 3596 /**************/ 3597 /* place tags */ 3598 /**************/ 3599 3600 /* lot's of "openGeoDB:..." tags can be found in germany */ 3601 node|z11-["openGeoDB:type"=Stadt], 3602 node|z11-["openGeoDB:type"=Kreis], 3603 node|z11-["openGeoDB:type"=Gemeinde], 3604 node|z11-["openGeoDB:type"=Ort], 3605 node|z11-["openGeoDB:type"=District], 3606 node|z11-["openGeoDB:location"=locality] { 3607 icon-image: "place/settlement/town.png"; 3608 text: auto; 3609 } 3610 area[place=continent], 3611 area[place=country], 3612 area[place=state], 3613 area[place=region], 3614 area[place=county], 3615 area[place=city], 3616 area[place=town], 3617 area[place=village], 3618 area[place=hamlet], 3619 area[place=isolated_dwelling], 3620 area[place=neighbourhood], 3621 area[place=suburb], 3622 area[place=locality], 3623 area[place=island], 3624 area[place=islet] { 3625 fill-color: place#8de3cb; 3626 } 3627 node|z11-[place=continent], 3628 node|z11-[place=country], 3629 node|z11-[place=state], 3630 node|z11-[place=region], 3631 node|z11-[place=county] { 3632 icon-image: "place/settlement/capital.png"; 3633 text: auto; 3634 } 3635 node|z11-[place=city] { 3636 icon-image: "place/settlement/city.png"; 3637 text: auto; 3638 } 3639 node|z11-[place=town], 3640 node|z11-[place=village], 3641 node|z11-[place=hamlet], 3642 node|z11-[place=isolated_dwelling], 3643 node|z11-[place=neighbourhood], 3644 node|z11-[place=suburb] { 3645 icon-image: "place/settlement/town.png"; 3646 text: auto; 3647 } 3648 node|z11-[place=locality] { 3649 icon-image: "place/locality.png"; 3650 text: auto; 3651 } 3652 node|z11-[place=island] { 3653 icon-image: "place/island.png"; 3654 text: auto; 3655 } 3656 node|z11-[place=islet] { 3657 icon-image: "place/islet.png"; 3658 text: auto; 3659 } 3657 3660 3658 3661 /* "deprecated" tags
Note:
See TracChangeset
for help on using the changeset viewer.