comparison contrib/python/generateHTML.py @ 225:a9a3ce2625a8

Added Link to GetCapabilities
author Stephan Holl <stephan.holl@intevation.de>
date Wed, 27 Jul 2011 10:13:40 +0200
parents bef2e9522741
children 18cb0b709df8
comparison
equal deleted inserted replaced
224:bef2e9522741 225:a9a3ce2625a8
19 19
20 # adopt for you needs: 20 # adopt for you needs:
21 url = 'http://localhost/cgi-bin/mapserv.exe' 21 url = 'http://localhost/cgi-bin/mapserv.exe'
22 getmap = url + '?Request=GetMap&Service=WMS&Version=1.1.1' 22 getmap = url + '?Request=GetMap&Service=WMS&Version=1.1.1'
23 getmap += '&srs=EPSG:4326&width=800&height=600&format=image/png&styles=' 23 getmap += '&srs=EPSG:4326&width=800&height=600&format=image/png&styles='
24 getcaps = url + '?Request=GetCapabilities&Service=WMS&Version=1.1.1'
24 25
25 def writeHeader(): 26 def writeHeader():
26 print '''<html> 27 print '''<html>
27 <head> 28 <head>
28 <title>MXD2map-examples</title> 29 <title>MXD2map-examples</title>
56 urlmapfile += '&template=openlayers&mode=browse&layers=' + layers[i] 57 urlmapfile += '&template=openlayers&mode=browse&layers=' + layers[i]
57 gm = getmap + '&map=' + mapfile + '&layers=' + layers[i] 58 gm = getmap + '&map=' + mapfile + '&layers=' + layers[i]
58 if extent: 59 if extent:
59 ext = str(extent).strip('[\'\'\\r\\n]') 60 ext = str(extent).strip('[\'\'\\r\\n]')
60 gm += '&bbox='+''.join(ext) 61 gm += '&bbox='+''.join(ext)
61 print "<li><a target='_new' href='%s'>%s</a> | <a target='_getmap' href='%s'>WMS GetMap</a></li>" % (urlmapfile, layers[i], gm) 62 print "<li><a target='_new' href='%s'>%s</a> | <a target='_getmap' href='%s'>WMS GetMap</a> | <a target='_getcaps' href='%s'>WMS GetCapabilities Version 1.1.1</a></li>" % (urlmapfile, layers[i], gm, getcaps)
62 i=i+1 63 i=i+1
63 print "</ul>" 64 print "</ul>"
64 65
65 def generateArcImage(mapfile): 66 def generateArcImage(mapfile):
66 basename = os.path.basename(mapfile) 67 basename = os.path.basename(mapfile)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)