37 |
EPSG_DEPRECATED_PROJ_FILE |
EPSG_DEPRECATED_PROJ_FILE |
38 |
from Thuban.UI.command import registry, Command |
from Thuban.UI.command import registry, Command |
39 |
import Thuban.UI.mainwindow |
import Thuban.UI.mainwindow |
40 |
|
from Thuban.UI.common import ThubanBeginBusyCursor, ThubanEndBusyCursor |
41 |
from Thuban import _ |
from Thuban import _ |
42 |
import Thuban.UI.baserenderer |
import Thuban.UI.baserenderer |
43 |
|
|
84 |
self.capabilities = None |
self.capabilities = None |
85 |
|
|
86 |
# Change the cursor to demonstrate that we're busy but working |
# Change the cursor to demonstrate that we're busy but working |
87 |
wxBeginBusyCursor() |
ThubanBeginBusyCursor() |
88 |
self.capabilities = WMSCapabilities(url) |
self.capabilities = WMSCapabilities(url) |
89 |
wxEndBusyCursor() |
ThubanEndBusyCursor() |
90 |
|
|
91 |
# name of the top layer of the remote map |
# name of the top layer of the remote map |
92 |
foo = self.capabilities.getLayers() |
foo = self.capabilities.getLayers() |
131 |
self.error_msg = _('EPSG projection code %s not found!\n'\ |
self.error_msg = _('EPSG projection code %s not found!\n'\ |
132 |
'Setting projection to "None".\n'\ |
'Setting projection to "None".\n'\ |
133 |
'Please set an appropriate projection yourself.'\ |
'Please set an appropriate projection yourself.'\ |
134 |
% epsg_id) |
% top_srs) |
135 |
|
|
136 |
# pre-determine the used format |
# pre-determine the used format |
137 |
self.wmsformat, self.format = \ |
self.wmsformat, self.format = \ |
201 |
image/wbmp or WBMP which refers to WAP bitmap format and is |
image/wbmp or WBMP which refers to WAP bitmap format and is |
202 |
not supported by the included render engine. |
not supported by the included render engine. |
203 |
""" |
""" |
204 |
prio = ['png', 'jpeg', 'jpg', 'tif', 'gif', 'bmp'] |
prio = ['jpeg', 'bmp'] |
205 |
for p in prio: |
for p in prio: |
206 |
for f in formats: |
for f in formats: |
207 |
if f.lower().find(p) > -1: |
if f.lower().find(p) > -1: |
215 |
'maxx': bbox[2], 'maxy': bbox[3] } |
'maxx': bbox[2], 'maxy': bbox[3] } |
216 |
|
|
217 |
# Change the cursor to demonstrate that we're busy but working |
# Change the cursor to demonstrate that we're busy but working |
218 |
wxBeginBusyCursor() |
ThubanBeginBusyCursor() |
219 |
|
|
220 |
wmsclient = WMSClient() |
wmsclient = WMSClient() |
221 |
|
|
224 |
wms_response = wmsclient.getMap(self.url, self.wmsformat, width, height, |
wms_response = wmsclient.getMap(self.url, self.wmsformat, width, height, |
225 |
epsg_id, bbox_dict, |
epsg_id, bbox_dict, |
226 |
[self.layer_name], version = self.capabilities.getVersion()) |
[self.layer_name], version = self.capabilities.getVersion()) |
227 |
wxEndBusyCursor() |
ThubanEndBusyCursor() |
228 |
return wms_response, self.format |
return wms_response, self.format |
229 |
|
|
230 |
|
|