I have an example of how it works with Google Maps (see below). I want the map to be opened via OpenStreetMap. Can one of you rewrite the code?

str = "<iframe width="" 425""="" height="" 350""="" frameborder="" 0""="" scrolling="" no""="" marginheight="" 0""="" marginwidth="" 0""="" src="" http:="" maps.google.de="" maps?f="q&amp;source=s_q&amp;hl=de&amp;geocode=&amp;q="" &="" _="" strstrasse="" &="" "="" "="" &="" me!hausnummer="" &="" "+"="" &="" strort="" &="" "+"="" &="" me!plz="" &="" "&amp;sll=" &amp; strK &amp; " &amp;sspn="0.098084,0.368647&amp;ie=UTF8&amp;hq=&amp;hnear="" &="" _="" strstrasse="" &="" "="" "="" &="" me!hausnummer="" &="" ","="" &="" me!plz="" &="" "+"="" &="" strort="" &="" "&amp;z=" &amp; Me!Zoom &amp; " &amp;ll=" &amp; strK &amp; " &amp;output="embed"""></iframe>
<a"

asked 17 May '18, 10:25

silosix's gravatar image

silosix
11112
accept rate: 0%


Have a look at the embed share function on https://www.openstreetmap.org/ :

  • Share button on the right of the screen
  • Click on HTML button
  • You'll have the code of the OpenStreetMap iframe
  • You just have to replace your Google iframe by the OpenStreetMap one
permanent link

answered 17 May '18, 10:31

jbelien's gravatar image

jbelien
146129
accept rate: 16%

Thanks, I'll try it.

(17 May '18, 10:35) silosix
1

If you're putting it inside str = "" as above then you'll also need to replace every " in the generated HTML from the above steps by ""

It isn't clear why the string in the question ends with <a which seems to be an incomplete HTML tag - if that is important you might have to add that on the end as well.

(17 May '18, 11:15) EdLoach ♦
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:

×53
×1
×1

question asked: 17 May '18, 10:25

question was seen: 836 times

last updated: 17 May '18, 12:34

powered by OSQA