Hi all,
I cleaned up the code more, but I'm still not sure why the get request isn't
firing. The GML is in EPSG 32636, and I'm still trying to figure out how to
reproject the vectors over google layers. Thanks in advance.
var map, layer, selectedFeature, selectControl, selectedFeature, sites;
var utz36n = new Proj4js.Proj('EPSG:32636');
function initGis() {
map = new OpenLayers.Map ("map",
{
controls:[
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.LayerSwitcher(),
new OpenLayers.Control.Attribution(),
new OpenLayers.Control.ScaleLine()],
sphericalMercator: true,
maxExtent: new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
maxResolution: 156543.0399,
numZoomLevels: 19,
units: 'm',
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326")
}
);
var gphy = new OpenLayers.Layer.Google(
"Google Physical",
{type: google.maps.MapTypeId.TERRAIN}
);
var gsat = new OpenLayers.Layer.Google(
"Google Satellite",
{type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22}
);
var arch_s = new OpenLayers.Layer.Vector ("Archaeological Sites",
{
projection: map.displayProjection,
stategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: "data/arch_sites2.gml",
format: new OpenLayers.Format.GML()
})
});
map.addLayers([gphy, gsat, arch_s]);
//centers map on loaded data
if( ! map.getCenter() ){
if(arch_s){
arch_s.events.register('loadend', arch_s,
function(){map.zoomToExtent(arch_s.getDataExtent())});
}
map.setCenter(null, null);
};
}
--
Nicholas Efremov-Kendall
Dept. of Anthropology
Washington University in St. Louis
Campus Box 1114
St. Louis, MO, 63130
(917) 370-3489
[email protected] <[email protected]>
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users