How to set my country to be default location when openning openlayer
Hello,
I am refering this site
http://openlayers.org/en/latest/examples/localized-openstreetmap.html and its working fine with my internal tiles only for one country.
I would like to understand 2 things
a)
when i will type http://192.168.1.32/index.html , how Can I make my country to be default on the screen ? I tryed to use this " center: [23.75936, 90.37787]," but dont think thats the right place .
b) How can I make my map callable like "http://192.168.1.32/#map=4/22.39/74.44&layers=T", ( I mean same web interface like https://www.openstreetmap.org ?
Bellow are the changed Code
var openSeaMapLayer = new ol.layer.Tile({
source: new ol.source.OSM({
attributions: [
'All maps © <a href="http://www.openseamap.org/">OpenSeaMap</a>',
ol.source.OSM.ATTRIBUTION
],
opaque: false,
url: 'http://192.168.1.32/hot/{z}/{x}/{y}.png'
})
});
var map = new ol.Map({
layers: [
openCycleMapLayer,
openSeaMapLayer
],
target: 'map',
controls: ol.control.defaults({
attributionOptions: {
collapsible: false
}
}),
view: new ol.View({
maxZoom: 25,
center: [23.75936, 90.37787],
zoom: 9
})
});