Hi Vikash, <div><br></div><div>You could try adding the href you wanted to the attributes of the features in your WMS layer. You could then have the href embedded in a popup. You could modify the following code which just pulls attribute data in as text. Don't forget to add selectedFeature, selectControl, selectedFeature as variables before you call the function. I'm sure there's another way to implement this, but it's beyond my skillz.</div>
<div><br></div><div><div>//Popups</div><div>function onPopupClose(evt) {</div><div> selectControl.unselect(selectedFeature);</div><div> }</div><div><br></div><div>function onFeatureSelect(evt) {</div><div>
selectedFeature = evt.feature;</div><div> popup = new OpenLayers.Popup.FramedCloud("chicken", </div><div> evt.feature.geometry.getBounds().getCenterLonLat(),</div>
<div> null,</div><div> "<div style='font-size:.8em'>Site_ID: " + evt.feature.attributes.SITE_ +"<hr />Locality: " + evt.feature.attributes.location1+"<br/>Interpretation: " + evt.feature.attributes.interp+"<br/> </div>",</div>
<div> </div><div> null, true, onPopupClose);</div><div> evt.feature.popup = popup;</div><div> map.addPopup(popup);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> }</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span> function onFeatureUnselect(evt) {</div><div> map.removePopup(evt.feature.popup);</div><div> evt.feature.popup.destroy();</div><div>
evt.feature.popup = null;</div><br><div class="gmail_quote">On Sat, Jun 4, 2011 at 4:33 PM, Vikash Talanki <span dir="ltr"><<a href="mailto:vikashtalanki@gmail.com">vikashtalanki@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br>
<br>
I have a many polygons on my map serving through WMS from geoserver. I want<br>
to implement the task such that when the user clicks on a particular polygon<br>
, he should be directed to a html page about that polygon. Like if I click<br>
on my CSE Dept I should be directed to my cse dept home page.<br>
<br>
Need help in achieving this...<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Clicking-on-a-polygon-opening-a-page-link-tp6440300p6440300.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Clicking-on-a-polygon-opening-a-page-link-tp6440300p6440300.html</a><br>
Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</font></blockquote></div><br></div>