Mercurial > mxd2map
comparison contrib/python/generateHTML.py @ 228:1cfb92731f48
Added link to the mapfile
author | Stephan Holl <stephan.holl@intevation.de> |
---|---|
date | Wed, 27 Jul 2011 13:58:15 +0200 |
parents | 58d8ac962683 |
children | 4dc2b9aa3c57 |
comparison
equal
deleted
inserted
replaced
227:58d8ac962683 | 228:1cfb92731f48 |
---|---|
44 | 44 |
45 def writeLayers(mapfile, layers, extent): | 45 def writeLayers(mapfile, layers, extent): |
46 basename = os.path.basename(mapfile) | 46 basename = os.path.basename(mapfile) |
47 png = mapfile.replace(".map", "_arcpy.png") | 47 png = mapfile.replace(".map", "_arcpy.png") |
48 gc = getcaps + '&map=' + mapfile | 48 gc = getcaps + '&map=' + mapfile |
49 print '''<li>Layer: <strong>%s</strong> | <a target='_getcaps' href='%s'>GetCapabilities</a></li> | 49 print '''<li>Layer: <strong><a target='_mapfile' href='file://%s'>%s</a></strong> | <a target='_getcaps' href='%s'>GetCapabilities</a></li> |
50 <br> | 50 <br> |
51 <a target="bild" href="file://%s"><img witdth="80" height="60" border="" src="file://%s"></a> | 51 <a target="bild" href="file://%s"><img witdth="80" height="60" border="" src="file://%s"></a> |
52 Anzahl der Layer: %s | 52 Anzahl der Layer: %s |
53 ''' % (basename, gc, png, png, len(layers)) | 53 ''' % (mapfile, basename, gc, png, png, len(layers)) |
54 i = 0 | 54 i = 0 |
55 print "<ul>" | 55 print "<ul>" |
56 while i < len(layers): | 56 while i < len(layers): |
57 urlmapfile = url + '?map=' + mapfile | 57 urlmapfile = url + '?map=' + mapfile |
58 urlmapfile += '&template=openlayers&mode=browse&layers=' + layers[i] | 58 urlmapfile += '&template=openlayers&mode=browse&layers=' + layers[i] |