Commit e2539ad4 authored by Matti Pulkkinen's avatar Matti Pulkkinen
Browse files

added field for the coordinates in MapDialog

parent 2fac1545
......@@ -114,6 +114,11 @@ public class MapDialog extends JFrame {
private Timer resizeTimer;
private int easternLongitude = -180;
private int westernLongitude = 180;
private int southernLatitude = -90;
private int northernLatitude = 90;
public MapDialog() throws Exception {
// Valmistele ikkuna ja lisää siihen komponentit
......@@ -207,7 +212,9 @@ public class MapDialog extends JFrame {
try {
// TODO: coordinate updates
url = new URL("http://demo.mapserver.org/cgi-bin/wms?SERVICE="
+ "WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=-180,-90,180,90&SRS=" + "EPSG:4326&WIDTH="
+ "WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=" + MapDialog.this.easternLongitude + ","
+ MapDialog.this.southernLatitude + "," + MapDialog.this.westernLongitude + ","
+ MapDialog.this.northernLatitude + "&SRS=" + "EPSG:4326&WIDTH="
+ (MapDialog.this.getWidth() - MapDialog.this.leftPanel.getWidth()) + "&HEIGHT="
+ MapDialog.this.getHeight() + "&LAYERS=" + ss + "&STYLES="
+ "&FORMAT=image/png&TRANSPARENT=true");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment