[OpenLayers-Users] Inconsistent IE6 results that seem to depend on how page is loaded

palewire ben.welsh at gmail.com
Mon Feb 2 22:29:28 EST 2009


Of course, now I'm encountering another IE6 problem. When my features are
selected, they change color and can be clicked to drill down a detail page.
(So, the idea is that the main map serves as an index featuring all the
polygons). 

What's happening is that the page works great on its initial load and when I
navigate between the maps using other parts of the HTML, but if I click on
one of the map links and then navigate back using the back button the map
will not reload correctly. 

Do you think this might also be a caching problem? Here is what the select
code looks like.

function show_feature(feature) {
	var selectedFeature = feature;
	var feature_name = selectedFeature.data.name;
	var hed = document.getElementById('feature-header');
	hed.innerHTML = 'Click to visit ' + feature_name;
}

function hide_feature() {
	var hed = document.getElementById('feature-header');
	hed.innerHTML = "Select a feature";
}

function click_feature(feature) {
	var selectedFeature = feature;
	var url = '/feature/' + selectedFeature.data.slug;
	window.location = url;
}

var select = new OpenLayers.Control.SelectFeature(feature_vector, {
	hover: true,
	onSelect: show_feature,
	onUnselect: hide_feature,
	clickFeature: click_feature
});

index_map.addControl(select);
select.activate();
-- 
View this message in context: http://n2.nabble.com/Inconsistent-IE6-results-that-seem-to-depend-on-how-page-is-loaded-tp2260954p2261563.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list