Hi. I have shared a map HTML to my web site, the open large map in new window was not in the best place on the page so I moved that bit to a separate button. No problem and all was OK. However when I open the page in a browser the map that comes up is the World map and you have to zoom in to the location. How can I set the HTML code to open already zoomed in to the location I wish to show?
Which “map” are you referring to?
https://www.openstreetmap.org/
Add #map=10/48.0597/11.5508
where
- 10 is the zoom
- 48.xxx/11.yyy are the coordinates
OR
See the vertical menue bar on the right on https://www.openstreetmap.org/
and click on “Share” and use the " Link or HTML" section.
(http://www.openstreetmap.org).
This is the HTML but from a text editor so I have spread it out a bit to make the coordinate stuff more obvious.
LOCAL
View Larger Map
The call to view larger map = 19/51.202667/-2.677019 works OK but the coordinates for use in the window on the web site do not seem to include an altitude.
Have also noticed that in Openstreetmap if you start off zoomed in close and then use the +/- to zoom out you loose precision and when you zoom back in the map center has mover by a few miles. If you have a pointer set this same process moves the map center by over a hundred miles because center on the pointer looses even more precision.
Well that did not work. Will try and show the HTML again.
LOCAL
iframe width=“425” height=“350”
src="OpenStreetMap Embedded
-2.6792478561401367 %2C 51.20194098139094 %2C -2.6747900247573857 %2C 51.203393006907376
&layer=cyclosm
&marker= 51.20266699987065 %2C -2.677018940448761
" style=“border: 1px solid black”
/iframe
br/
small
a href=“https://www.openstreetmap.org/?
mlat=51.202667 & mlon=-2.677019 #map=19/51.202667/-2.677019
&layers=YN”>
View Larger Map
/a
/small
Hi Tony have posted a reply took me two goes as I am new to this.
Regards
Think I can close this one out myself.
The two sets of coordinates given for the map display box,
-2.6792478561401367 %2C 51.20194098139094 %2C -2.6747900247573857 %2C 51.203393006907376
Will generate a zoomed in area with the need of an altitude.
Have discovered that this is probably a browser settings problem, using Firefox I get the un-zoomed map but using Chrome, AVG, Edge or Safari it works fine.