Code is now like that but pan and zoom are still visible.
/
var map = new OpenLayers.Map(options);
// Options
var options = {
controls: [],
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
units: "m",
maxResolution: "auto",
allOverlays: false,
maxExtent: new
OpenLayers.Bounds(-75.86,44.05,-74.526,45.016).transform(new
OpenLayers.Projection("EPSG:4326"), new
OpenLayers.Projection("EPSG:900913")),
stateId: "map",
prettyStateKeys: true // for pretty permalinks
};
map.addControl(new OpenLayers.Control.ScaleLine());
map.addControl(new OpenLayers.Control.Navigation());
//map.addControl(new OpenLayers.Control.PanPanel());
//map.addControl(new OpenLayers.Control.ZoomPanel());
map.addControl(new OpenLayers.Control.Permalink('permalink'));/
Am 26.01.2011 18:49, schrieb Andrew Stewart:
Try declaring your controls empty initially - controls: []
Then just add any control you want after
map.addControl(new OpenLayers.Control.Whatever());
And I think your pan bar will not be there anymore.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of
Kai Volland
Sent: January 26, 2011 10:45 AM
To: [email protected]
Subject: Re: [Users] Fwd: How to remove/hide Openlayers PanZoomBar
I added them this way:
controls: [
new OpenLayers.Control.ScaleLine(),
new OpenLayers.Control.Navigation(),
//new OpenLayers.Control.PanPanel(),
//new OpenLayers.Control.ZoomPanel(),
new OpenLayers.Control.Permalink('permalink')
],
Am 26.01.2011 18:31, schrieb Andrew Stewart:
Are you adding your map to a mappanel? When you declare your map variable set
the controls to be
controls: []
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of
Kai Volland
Sent: January 26, 2011 10:27 AM
To: [email protected]
Subject: [Users] Fwd: How to remove/hide Openlayers PanZoomBar
Hi,
here is my very simple question:
How to remove or hide the PanZoomBar from Openlayers. It seems to be
added to the map automatically.
Removing only the zoom-buttons of this bar would be even better for me.
Kind regards
Kai
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users
[This message has been scanned for security content threats and viruses.]
[The City of Red Deer I.T. Services asks that you please consider the
environment before printing this e-mail.]
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users
[This message has been scanned for security content threats and viruses.]
[The City of Red Deer I.T. Services asks that you please consider the
environment before printing this e-mail.]
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users