I'm trying to center an OpenLayers map over New Mexico (NM) and having a hard time to get it working.
Here is my code. I'm trying to use decimal values and not the pixel values OpenLayers uses by default.
var init = function () {
// create map
map = new OpenLayers.Map({
div: "map",
theme: null,
projection:"EPSG:4326",
controls: [
new OpenLayers.Control.Attribution(),
new OpenLayers.Control.TouchNavigation({
dragPanOptions: {
enableKinetic: true
}
}),
new OpenLayers.Control.Zoom()
],
layers: [
new OpenLayers.Layer.OSM()
],
center: new OpenLayers.LonLat(105.9372, 35.6869),
zoom: 5
});
};