- Timestamp:
- 2017-04-29T22:43:41+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
r11908 r12026 184 184 * This method does multipolygon handling. 185 185 * 186 * There are different tagging styles for multipolygons, that have to be respected:187 * - tags on the relation188 * - tags on the outer way (deprecated)189 *190 186 * If the primitive is a way, look for multipolygon parents. In case it 191 187 * is indeed member of some multipolygon as role "outer", all area styles … … 217 213 Color wayColor = null; 218 214 215 // FIXME: Maybe in the future outer way styles apply to outers ignoring the multipolygon? 219 216 for (OsmPrimitive referrer : osm.getReferrers()) { 220 217 Relation r = (Relation) referrer; … … 320 317 return p; 321 318 } else if (osm instanceof Relation) { 322 Pair<StyleElementList, Range> p = generateStyles(osm, scale, true); 323 if (drawMultipolygon && ((Relation) osm).isMultipolygon() 324 && !Utils.exists(p.a, AreaElement.class) && Main.pref.getBoolean("multipolygon.deprecated.outerstyle", false)) { 325 // look at outer ways to find area style 326 Multipolygon multipolygon = MultipolygonCache.getInstance().get((Relation) osm); 327 for (Way w : multipolygon.getOuterWays()) { 328 Pair<StyleElementList, Range> wayStyles = generateStyles(w, scale, false); 329 p.b = Range.cut(p.b, wayStyles.b); 330 StyleElement area = Utils.find(wayStyles.a, AreaElement.class); 331 if (area != null) { 332 p.a = new StyleElementList(p.a, area); 333 break; 334 } 335 } 336 } 337 return p; 319 return generateStyles(osm, scale, true); 338 320 } 339 321 return null;
Note:
See TracChangeset
for help on using the changeset viewer.