[OpenLayers-Users] Re: Clicking on a polygon-opening a page/link

Nicholas Efremov-Kendall n.e.kendall at gmail.com
Sat Jun 4 18:01:48 EDT 2011


Hi Vikash,

Like I said in my response to you, I don't know enough about it to be able
to propose anything functional beyond the work-around I proposed. However, a
little googling leads me to believe that you could probably modify the
onFeatureSelect command with the redirect, but I don't know enough about it
but maybe something like calling the window.location function with a link to
the page you want to redirec them to...

function onFeatureSelect(evt) {
            selectedFeature = evt.feature;
// this is where you'll have to figure it out but something like
evt.feature.click = window.location = #href to your page

This is not the correct syntax, but I think this will point you in the right
direction.
http://www.tizag.com/javascriptT/javascriptredirect.php is useful

On Sat, Jun 4, 2011 at 4:46 PM, Vikash Talanki <vikashtalanki at gmail.com>wrote:

> Hi Nizzok,
>
>  Thanks for the reply but as you said "You could then have the href
> embedded
> in a popup"...... but i want to be redirected to a web page instead of
> getting the popup
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Clicking-on-a-polygon-opening-a-page-link-tp6440300p6440336.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110604/0b3f1498/attachment.html


More information about the Users mailing list