Changeset 22042 in osm for applications/editors
- Timestamp:
- 2010-06-27T21:30:20+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/Address.java
r22041 r22042 119 119 MapView mv = Main.map.mapView; 120 120 Point mousePos = e.getPoint(); 121 // Node mouseOnExistingNode = null;122 121 List<Way> mouseOnExistingWays = new ArrayList<Way>(); 123 122 mouseOnExistingWays = new ArrayList<Way>(); 124 // mouseOnExistingNode = Main.map.mapView.getNearestNode(mousePos, OsmPrimitive.isSelectablePredicate);125 123 Node currentMouseNode = mv.getNearestNode(mousePos, OsmPrimitive.isSelectablePredicate); 126 124 if(currentMouseNode != null) { … … 164 162 } 165 163 if (mouseOnExistingWays.size() == 1) { 164 // clicked on existing highway => set new street name 166 165 inputStreet.setText(mouseOnExistingWays.get(0).get(tagHighwayName)); 166 } else if (mouseOnExistingWays.size() == 0) { 167 // clicked a non highway and not a node => add the new address 168 Node n = Main.map.mapView.getNearestNode(mousePos, OsmPrimitive.isSelectablePredicate); 169 if (n != null) 170 if (!n.hasKey(tagHouseNumber)) 171 addAddrToNode(n); 172 else 173 createNewNode(mousePos); 167 174 } 168 175 } 169 176 177 } 178 179 private void addAddrToNode(Node n) { 180 // node exists : just add the tag addr:housenumber and member in relation 181 } 182 183 private void createNewNode(Point mousePos) { 184 170 185 } 171 186
Note:
See TracChangeset
for help on using the changeset viewer.