[Mapbender-commits] r6030 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Apr 27 04:24:20 EDT 2010


Author: kmq
Date: 2010-04-27 04:24:19 -0400 (Tue, 27 Apr 2010)
New Revision: 6030

Modified:
   trunk/mapbender/http/plugins/mb_loadkmlgeorss.js
Log:
added element vars

Modified: trunk/mapbender/http/plugins/mb_loadkmlgeorss.js
===================================================================
--- trunk/mapbender/http/plugins/mb_loadkmlgeorss.js	2010-04-26 15:02:11 UTC (rev 6029)
+++ trunk/mapbender/http/plugins/mb_loadkmlgeorss.js	2010-04-27 08:24:19 UTC (rev 6030)
@@ -1,4 +1,11 @@
 
+options.buffer = options.buffer || 0.10;
+options.position = options.position || 'center';
+var originalI18nObject = {
+	"labelLoadError" : "Could not load Document"
+}
+
+
 var that = this;
 
 $('<div id="'+ options.id +'_dialog"><label>GeoRSS <input type="radio" name="type" value="GeoRSS" checked="checked"/></label>\
@@ -26,7 +33,7 @@
 							success: function(data,textStatus,xhr){
 						
 							if(data.errorMessage){
-								$("<div>Could not load Document</div>").dialog({ buttons: {"OK":function(){ $(this).dialog("close");  }} });
+								$("<div>Could not load Document<div>").dialog({ buttons: {"OK":function(){ $(this).dialog("close");  }} });
 								return;
 							}
 
@@ -35,7 +42,7 @@
 							$("table", $dialog).remove();
 							var $table = $("<table><thead><tr><th>Name</th></tr></thead><tbody></tbody></table>");
 							if(data.features){
-								var markeroptions = {};
+								var markeroptions = {width: "19px", height: "34px"};
 								for(var i in data.features){
 									if(data.features[i].properties.title){
 										$("tbody",$table).append("<tr><td>"+ data.features[i].properties.title  +"</td></tr>");
@@ -48,12 +55,13 @@
 									
 									var x = data.features[i].geometry.coordinates[0];	
 									var y = data.features[i].geometry.coordinates[1];	
+									
 									point = new Mapbender.Point(x,y);
 									
 									$("tr:last-child",$table).css("cursor","pointer");
 									$("tr:last-child", $table).click((function(x,y){	
 										return function(){
-											var buffer =  new Mapbender.Point(0.10,0.10);
+											var buffer =  new Mapbender.Point(options.buffer,options.buffer);
 											var a = new Mapbender.Point(x,y);
 											a = a.minus(buffer);
 
@@ -71,6 +79,7 @@
 							var $tableDialog = $("<div></div>").dialog({
 								width: "450",
 								height: "500",
+								position: options.position,
 								beforeclose: function(){
 									for(var i in markers){
 										markers[i].remove();
@@ -99,6 +108,7 @@
 					}
 				}
 });
+
 Mapbender.events.init.register(function () {
 	$(that).click(function(){
 		$('#'+options.id+'_dialog').dialog('open');



More information about the Mapbender_commits mailing list