Mercurial > hg > ChinaGisRestApi
comparison gis_gui/blocks/map.js @ 69:752ce3dfd23e
working on maps
author | casties |
---|---|
date | Tue, 23 Nov 2010 12:54:22 +0100 |
parents | 49fb47bbe2e6 |
children | 9ec7e32e8ad3 |
comparison
equal
deleted
inserted
replaced
68:49fb47bbe2e6 | 69:752ce3dfd23e |
---|---|
56 return this.params; | 56 return this.params; |
57 }; | 57 }; |
58 | 58 |
59 guiBlocks.Block.prototype.showMapParams = function(elem,params) { | 59 guiBlocks.Block.prototype.showMapParams = function(elem,params) { |
60 // create html with layer parameters from params | 60 // create html with layer parameters from params |
61 var i = 0; | |
61 if (elem == null) { | 62 if (elem == null) { |
62 elem = this.element; | 63 elem = this.element; |
63 } | 64 } |
64 if (params == null) { | 65 if (params == null) { |
65 params = this.params; | 66 params = this.params; |
70 $(elem).find(".map_layer_table .layer_info").remove(); | 71 $(elem).find(".map_layer_table .layer_info").remove(); |
71 // write new info | 72 // write new info |
72 if (layers.length > 0) { | 73 if (layers.length > 0) { |
73 var tmpl = $(elem).find(".layer_info_tmpl").tmpl(layers); | 74 var tmpl = $(elem).find(".layer_info_tmpl").tmpl(layers); |
74 $(elem).find(".map_layer_header").after(tmpl); | 75 $(elem).find(".map_layer_header").after(tmpl); |
76 // arm edit and delete buttons | |
77 for (i = 0; i < layers.length; ++i) | |
78 | |
79 tmpl.find(".layer_edit_"+i).click(function() { | |
80 blocks.addLayerBlock("blocks/layer.html?table="+escape(params.table),"layer", params) | |
81 }); | |
75 } | 82 } |
76 }; | 83 }; |
77 | 84 |
78 guiBlocks.Block.prototype.readMapParams = function(elem,params) { | 85 guiBlocks.Block.prototype.readMapParams = function(elem,params) { |
79 // read layer parameters from html element and store in param | 86 // read layer parameters from html element and store in param |