<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt;color:#000000;"><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">Hi,</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">I have a property grid which I use to show attributes from vector points. </div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">Due to the number of points, I have changed to a cluster strategy and would now like to populate the grid with the feature attributes in the cluster.</div><div style="color: rgb(0, 0, 0); font-family: arial,
helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">I can do this in a div outside of the popup grid, but I canīt work out how to get the attributes into the gird.</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><a href="http://maps.zgb.de/www/testing/cluster_vector.html">http://maps.zgb.de/www/testing/cluster_vector.html</a></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">Below is the code for the html div which works ok, and the popup which I canīt get to read the cluster attributes</div><div style="color: rgb(0, 0, 0); font-family: arial,
helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">Any help would be great,</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">yours,</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; ">Rob</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial,
helvetica, sans-serif; font-size: 10pt; ">Here is the code for the html element which works fine in a div</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>function on_select_feature(event){</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>//Store a reference to the element</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>//var info_div = document.getElementById('info_div');</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">        
        </span>//info_div.innerHTML = '';</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>//Store the clusters</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>var cluster = event.feature.cluster;</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>//Loop through the cluster features</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>for(var i=0; i<cluster.length; i++){</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>//Update the div with
the info of the photos</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>info_div.innerHTML += "<strong>"</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>+ cluster[i].attributes.bez</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>+ cluster[i].attributes.standort</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>+ cluster[i].attributes.mw_inner</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>+ "<br /><hr
/>";</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>}</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>}</font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">                </font></span></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>function on_unselect_feature(event){</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>//Store a reference to the element</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span
class="Apple-tab-span" style="white-space:pre">                </span>var info_div = document.getElementById('info_div');</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>//Clear out the div</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>info_div.innerHTML = '';</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>}</font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">                </font></span></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">        
        </span>vector_layer.events.register('featureselected', this, on_select_feature);</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>vector_layer.events.register('featureunselected', this, on_unselect_feature);</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>// create a control for selecting features</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> var select = new OpenLayers.Control.SelectFeature(vector_layer);</font></div><div><font
class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> mapPanel.map.addControl(select);</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> select.activate();</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Here is my popup...I would like the attributes to populate this!!</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"
size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> // register a listener for the feature selection and unselection</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> vector_layer.events.on({</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> featureselected: function(event) {</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> // create an open a popup when a feature is selected</font></div><div><font
class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> popup = new GeoExt.Popup({</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> title: "Feature Attributes",</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> feature: event.feature,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> collapsible: true,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">
layout: "fit",</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                                        </span>height: 130,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> width: 170,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> border: false,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                                                        </span>listeners: {</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">
close: function() {</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> select.unselectAll();</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> }</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> },</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> items: [</font></div><div><font class="Apple-style-span"
face="arial, helvetica, sans-serif" size="2"> new Ext.grid.PropertyGrid({</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> autoHeight: true,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> <span class="Apple-tab-span" style="white-space:pre">        </span>source: event.feature.attributes</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> })</font></div><div><font
class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> ]</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> });</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> popup.show();</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">
gridPanel.getSelectionModel().each(function(rec){</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> var feature = rec.get("feature");</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> mapPanel.map.setCenter(feature.geometry.getBounds().getCenterLonLat(), 11);})</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> },</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> featureunselected: function(event) {</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"
size="2"> // close (and destroy) the popup when the feature is unselected</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> popup.destroy();</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> }</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> });</font></div></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica,
sans-serif; font-size: 10pt; position: fixed; "></div>
</div></body></html>