Hi Again,
I've sloppily worked around the issue by just creating another div with the
id 'map,' which at least loads my data into the right place. However, now my
controls are missing (zoom etc) and the permalink, scale, and coordinates
have all been moved to the top left corner. I assume this is a fairly simple
gotcha that I'm over looking...any help and your patience is appreciated.
1) what happened to the controls?
2) why is my scale bar displaying NaM/NaFt (I know this must have to do with
the projection or the lack of one in my gml)
3) why did the permalink, scale, and mouseposition get moved to the topleft
corner?
here's my code
var lon = 675833.7195;
var lat = 3740782.6657;
var zoom = 2;
var map, layer;
var options = {
maxResolution: 'auto',
maxExtent: new OpenLayers.Bounds(568446.75, 3565307.25, 813860.25,
3781736.25),
projection: new OpenLayers.Projection("EPSG:22332"),
units: "meters"
};
//Map Creation
function init(){
map = new OpenLayers.Map('map', options);
var topo = new OpenLayers.Layer.GML("Jerba Topography", "topo.gml",
{isBaseLayer: true, styleMap: new OpenLayers.StyleMap({strokeWidth: 1,
strokeColor: "#000000"}) });
map.addLayer(topo);
var sites = new OpenLayers.Layer.GML("Sites", "sites.gml",
{styleMap: new OpenLayers.StyleMap({pointRadius: 2.5, fillColor: "#CCCCCC"},
{projection: new OpenLayers.Projection("EPSG:22332 ")})
});
map.addLayer(sites);
map.addControl( new OpenLayers.Control.LayerSwitcher());
map.addControl( new OpenLayers.Control.MousePosition());
map.addControl( new OpenLayers.Control.OverviewMap());
map.addControl( new OpenLayers.Control.ScaleLine());
map.addControl(new OpenLayers.Control.Permalink());
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users