Mercurial > hg > ChinaGisRestApi
diff gis_gui/blocks/map.js @ 268:f25ee0424ce6
Open Map in new Window
author | fknauft |
---|---|
date | Fri, 27 Jan 2012 09:43:40 +0100 |
parents | 52b1247140b7 |
children | 3a5d51c60e40 |
line wrap: on
line diff
--- a/gis_gui/blocks/map.js Wed Jan 25 20:45:13 2012 +0100 +++ b/gis_gui/blocks/map.js Fri Jan 27 09:43:40 2012 +0100 @@ -53,13 +53,14 @@ }); // new window button - /* $(be).find(".map_newwindow_button").click(function () { + $(be).find(".map_newwindow_button").click(function () { console.debug("map in new window"); params = block.readMapParams(); - var newWindow = window.open("blocks/map_newwindow.html"); - map=block.updateMap(newWindow.document.getElementById("map_box"),params); + paramsString=JSON.stringify(params); + var newWindow = window.open("blocks/map_newwindow.html?map_params="+paramsString); + //map=block.updateMap(newWindow.document.getElementById("map_box"),params); }); - */ + // reload button $(be).find(".map_reload_button").click(function () { console.debug("reload map"); @@ -173,6 +174,22 @@ }; +guiBlocks.Block.prototype.updateMapId = function(id) { + + //************ + console.debug("updateMap:", id); + //************* + data2= blocks.loadListOfItems("test1","map",data); + var params = jQuery.grep(data, function(x){return (x.key == mapname);})[0].val; + if (elem == null) { + elem = this.element; + } + if (map_params == null) { + map_params = params; + } + var map = block.updateMap(elem, params); +}; + guiBlocks.Block.prototype.updateMap = function(elem,map_params) { //************