[OpenLayers-Users] Hyperlinked Features
palewire
ben.welsh at gmail.com
Tue Feb 3 16:33:41 EST 2009
I'm finding some success by adding the destroy() command like so.
function click_feature(feature) {
var selectedFeature = feature;
var url = '/feature/' + selectedFeature.data.slug;
index_map.destroy();
window.location.href = url;
return false;
}
But I honestly do not understand why. That nukes the map before jumping
pages, which seems to avoid some error. But it's a total hack, and I am
struggling to understand why things like the back button and opening new
windows are affecting my map behavior, but they seem to be.
palewire wrote:
>
> I gave this a try and it worked great in FF, but, again, crashed in IE6.
> What happens is that it throws a "Failed" error as you jump from the first
> page to the next. Again, working the first time, but screwing up the page
> if you hit the back button and return or otherwise reload it.
>
> I ran the routine while in Visual Web Developers JavaScript debugging mode
> -- and it seems the exception happens in a destroy geometry function that
> is passed in my selected feature for some reason.
>
> Not knowing anything about how OL properly closes when it leaves a page,
> I'm not sure exactly what's up, but I wonder if there might be a tidy way
> to prevent this type of error. Can anyone clue me in?
>
--
View this message in context: http://n2.nabble.com/Hyperlinked-Features-tp1824437p2265717.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list