The JavaScript worked just fine when I was running it in a straight HTML page on a local server. But, when I moved it to the .aspx page it no longer displays. Firebug shows no script errors and I know the map data is loading because it lists the attributes on the page properly. But, the map itself does not display. The zoom icon typically in the corner does not display either, the element is left untouched. It didn't work in IE either.
Here is the code for the initialization, it calls when the window loads.
function init() {
var map = new OpenLayers.Map('map', {
allOverlays: true
});
countries = new OpenLayers.Layer.Vector("Countries", {
protocol: new OpenLayers.Protocol.HTTP({
url: "../../Content/simplify3.geojson",
format: new OpenLayers.Format.GeoJSON({
extractAttributes: true,
visibility: true
})
}),
strategies: [new OpenLayers.Strategy.Fixed()]
});
map.addLayer(countries);
select = new OpenLayers.Control.SelectFeature(countries,
{ multiple: true, toggle: true });
countries.events.on({
"featureselected": onFeatureSelect,
"featureunselected": onFeatureUnselect,
"loadend": populateList
});
map.addControl(select);
select.activate();
map.zoomToMaxExtent();
}
The map should go here:
<div id="map" style="width: 800px; height: 400px; border: 2px solid black;">There Should Be A Map Here!</div>
Any thoughts other than shooting the damn thing?
