Changeset 20390 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionBuildings.java
- Timestamp:
- 2010-03-09T22:02:00+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionBuildings.java
r18544 r20390 13 13 public class MenuActionBuildings extends JosmAction { 14 14 15 public static String name = " Buildingfootprints";15 public static String name = "Grab buildings only"; 16 16 17 17 private static final long serialVersionUID = 1L; 18 private WMSLayer wmsLayer = null;19 18 20 19 public MenuActionBuildings() { 21 super(tr(name), "cadastre_small", tr(" Extractbuildingfootprints"), null, false);20 super(tr(name), "cadastre_small", tr("Grab building layer only"), null, false); 22 21 } 23 22 24 public void actionPerformed(ActionEvent arg0) { 25 wmsLayer = WMSDownloadAction.getLayer(); 26 if (wmsLayer != null) { 27 if (wmsLayer.isRaster()) { 23 public void actionPerformed(ActionEvent e) { 24 if (Main.map != null) { 25 if (CadastrePlugin.isCadastreProjection()) { 26 WMSLayer wmsLayer = WMSDownloadAction.getLayer(); 27 if (wmsLayer != null) 28 DownloadWMSVectorImage.download(wmsLayer, true); 29 } else { 28 30 JOptionPane.showMessageDialog(Main.parent, 29 tr(" Only on vectorized layers"), tr("Error"),30 JOptionPane.ERROR_MESSAGE);31 return;31 tr("To enable the cadastre WMS plugin, change\n" 32 + "the current projection to one of the cadastre\n" 33 + "projections and retry")); 32 34 } 33 DownloadSVGBuilding.download(wmsLayer);34 }35 } else 36 new MenuActionNewLocation().actionPerformed(e); 35 37 } 36 38
Note:
See TracChangeset
for help on using the changeset viewer.