Hi, is it possible to show maps without the openstreet banner? It kind of hide a large portion of the upper part of the window?

Thanks olof

asked 07 Sep, 11:09

olofk48's gravatar image

olofk48
264
accept rate: 0%


Which banner?

In any case you can imbed a view of the map in an iframe with the HTML code generated via the "share" functionality (share button on the right hand side).

Note that any such use has to follow the tile AUP.

permanent link

answered 07 Sep, 12:33

SimonPoole's gravatar image

SimonPoole ♦
30.1k13236480
accept rate: 17%

1

I guess he asked about the banner on the top of our main website. On (very) small screen sizes it will hide a significant part of the map. A collapsible banner would be nice.

(07 Sep, 14:12) scai ♦

Thanks scai, thats what i mean. I have tried the iframe, and I get the zoom in and out and pan functionality (which is all I need), but I loose the new center coordinates and scale level, which is normally returned in the URL after a map move. Is there a way to get those parameters with the iframe technique?

Thanks Olof

(08 Sep, 17:39) olofk48
2

If you just want a map, then I wouldn't use the OpenStreetMap website, I'd just use Leaflet directly. http://leafletjs.com/examples/quick-start/ has some really simple examples - just look at the source of http://leafletjs.com/examples/quick-start/example.html and change that to point at OpenStreetMap rather than Mapbox.

(08 Sep, 17:49) SomeoneElse ♦

Thanks SomeoneElse, my application is actually a VB6 (I am a old man), with an embedded web browser so I need to programatically transfer values from VB6 to the HTML page (and the opposite). I am not so good in such techniques. When using the OpenStreetMap website, the center coordinates and zoomlevel is given in the URL string, which makes it very simple. Do you have any suggestions or tutorials for learning interactions between VB6 and the Leaflet code?

Thanks Olof

(09 Sep, 10:48) olofk48
1

Hi Olof, the OpenStreetMap website uses Leaflet, so yes it is. You'll probably want to use the Leaflet "Permalink" plugin. Here's a map I created that does that: https://map.atownsend.org.uk/maps/map/map.html#zoom=13&lat=53.0783&lon=-0.8153 , which you can see at https://github.com/SomeoneElseOSM/SomeoneElse-map , although that's probably overcomplicated for what you want (you probably wouldn't want the 5 buttons at the top of the screen and the javascript that they invoke).

(09 Sep, 11:06) SomeoneElse ♦

Thanks again,

can I make it to return the position and zoom level through the URL as in OpenStreetMap website?

Also, do I need my own web server to load the page from?

Thanks Olof

(09 Sep, 15:59) olofk48

Probably, although I've not done it. Perhaps have a look at the examples at http://leafletjs.com/examples/quick-start/ or the questions at https://gis.stackexchange.com/questions/tagged/leaflet ?

(12 Sep, 13:19) SomeoneElse ♦
showing 5 of 7 show 2 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×2

question asked: 07 Sep, 11:09

question was seen: 186 times

last updated: 12 Sep, 13:19

powered by OSQA