Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How can add panzoombar in openlayer map?
Im trying to develop an openlayer map in html. i want to add a zoom bar panel.
please give me a solution and code for that.
Posted

1 solution

C#
var options = {
            Extent: extent, 'tileSize': new OpenLayers.Size(256, 256),
            controls: [new OpenLayers.Control.TouchNavigation({
                dragPanOptions: {
                    enableKinetic: true
                }
            }),
            new OpenLayers.Control.Navigation(),
            new OpenLayers.Control.PanZoomBar(),
            new OpenLayers.Control.Attribution(), new OpenLayers.Control.ScaleLine({ geodesic: true })
           ]
};
map = new OpenLayers.Map("map", options);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900