Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/shared/MapUtils.java @ 1357:4b7105e514d2
Reordered the attribute list.
flys-client/trunk@3042 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 20 Oct 2011 09:07:58 +0000 |
parents | ab93960ac2fb |
children | 661e3ae77c8a |
rev | line source |
---|---|
1328
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.client.shared; |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 public class MapUtils { |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 public static final String GET_LEGEND_GRAPHIC_TEMPLATE = |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 "${SERVER}SERVICE=WMS&VERSION=1.1.1&layer=${LAYER}" + |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 "&REQUEST=getLegendGraphic&FORMAT=image/png"; |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 private MapUtils() { |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 } |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 public static String getLegendGraphicUrl(String server, String layer) { |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 if (server == null || layer == null) { |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 return null; |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 } |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 server = server.indexOf("?") >= 0 ? server : server + "?"; |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 String url = GET_LEGEND_GRAPHIC_TEMPLATE; |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 url = url.replace("${SERVER}", server); |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 url = url.replace("${LAYER}", layer); |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 return url; |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 } |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 } |
ab93960ac2fb
Added missing MapUtils class from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |