Mercurial > hg > ChinaGisRestApi
changeset 139:c570e374935e
polygon-Layers
author | fknauft |
---|---|
date | Thu, 03 Feb 2011 11:46:43 +0100 |
parents | 771e7b3af615 |
children | c0551ecb0509 |
files | gis_gui/blocks/layer.js |
diffstat | 1 files changed, 31 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/gis_gui/blocks/layer.js Thu Feb 03 11:02:24 2011 +0100 +++ b/gis_gui/blocks/layer.js Thu Feb 03 11:46:43 2011 +0100 @@ -36,16 +36,37 @@ } $(this).find("option").filter(function(){return $(this).text() == params.size_field;}).attr("selected","true"); }); - $(be).find(".layer_geom_select"); - $(be).find(".layer_color_select"); - // $(be).find(".layer_color_select").load("../db/RESTdb/db/public/"+tablename+"?format=HTML&type=schema_table_rows&layout=select&element_id=rows #rows *", - // function() { - // $(this).find("option:first").before('<option>Default</option>'); - // if (!params.color_field) { - // params.color_field = "Default"; - // } - // $(this).find("option").filter(function(){return $(this).text() == params.color_field;}).attr("selected","true"); - // }); + + aaaatest.load("../db/RESTdb/db/public/"+tablename+"?format=HTML&type=schema_table_rows&layout=select&element_id=rows #rows *", + function() { + $(this).find("option:first").before('<option>Default</option>'); + if (!params.size_field) { + params.size_field = "Default"; + } + $(this).find("option").filter(function(){return $(this).text() == params.size_field;}).attr("selected","true"); + }); + + + + + $(be).find(".layer_geom_select").load(['point','poly','line'], + function() { + $(this).find("option:first").before('<option>Default</option>'); + if (!params.geom_field) { + params.geom_field = "Default"; + } + $(this).find("option").filter(function(){return $(this).text() == params.geom_field;}).attr("selected","true"); + }); + + $(be).find(".layer_color_select").load(['red','blue','black','green','violett'], + function() { + $(this).find("option:first").before('<option>Default</option>'); + if (!params.color_field) { + params.color_field = "Default"; + } + $(this).find("option").filter(function(){return $(this).text() == params.color_field;}).attr("selected","true"); + }); + $(be).find(".layer_shape_select").load("../db/RESTdb/db/public/"+tablename+"?format=HTML&type=schema_table_rows&layout=select&element_id=rows #rows *", function() { $(this).find("option:first").before('<option>Default</option>');