Last change
on this file since 17087 was 13545, checked in by pieren, 16 years ago |
Add municipality boundary import from SVG data delivered by cadastre WMS.
|
File size:
1.0 KB
|
Line | |
---|
1 | package cadastre_fr;
|
---|
2 |
|
---|
3 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
4 |
|
---|
5 | import java.awt.event.ActionEvent;
|
---|
6 |
|
---|
7 | import javax.swing.JOptionPane;
|
---|
8 |
|
---|
9 | import org.openstreetmap.josm.Main;
|
---|
10 | import org.openstreetmap.josm.actions.JosmAction;
|
---|
11 |
|
---|
12 | public class MenuActionBoundaries extends JosmAction {
|
---|
13 |
|
---|
14 | public static String name = "Administrative boundary";
|
---|
15 |
|
---|
16 | private static final long serialVersionUID = 1L;
|
---|
17 | private WMSLayer wmsLayer = null;
|
---|
18 |
|
---|
19 | public MenuActionBoundaries() {
|
---|
20 | super(tr(name), "cadastre_small", tr("Extract commune boundary"), null, false);
|
---|
21 | }
|
---|
22 |
|
---|
23 | public void actionPerformed(ActionEvent arg0) {
|
---|
24 | wmsLayer = WMSDownloadAction.getLayer();
|
---|
25 | if (wmsLayer != null) {
|
---|
26 | if (wmsLayer.isRaster()) {
|
---|
27 | JOptionPane.showMessageDialog(Main.parent,
|
---|
28 | tr("Only on vectorized layers"), tr("Error"),
|
---|
29 | JOptionPane.ERROR_MESSAGE);
|
---|
30 | return;
|
---|
31 | }
|
---|
32 | DownloadSVGTask.download(wmsLayer);
|
---|
33 | }
|
---|
34 | }
|
---|
35 |
|
---|
36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.