NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello, is possible to make preview maps when i post link on facebook ? Some map providers ( mapy.cz ) can do this. Look.

https://imgur.com/a/2JjIBhl

asked 11 May '19, 14:03

pschonmann's gravatar image

pschonmann
41336
accept rate: 0%

Can you provide a bit more information about what you'd actually like to happen? Not everyone is familiar with Facebook and I'm not sure exactly what you mean by a "preview map".

(11 May '19, 15:38) SomeoneElse ♦

When you paste link in comment field, you can see something like thumbnail, preview of your link. If you paste osm link you see only link to osm.org and big icon. Would be nice to see part of map instead.

(11 May '19, 16:45) pschonmann

Preview maps like this are indicated to Facebook by a series of 'meta tags' in the HEAD of an HTML document, for example:

<meta property='og:title' content="Charlbury-Lechlade">
<meta property='og:description' content="A 20mi cycle route planned on cycle.travel.">
<meta property='og:image' content='http://cycle.travel/generated/cards/101313.jpg'>

(The "OG" stands for "Open Graph".)

Only one image can be supplied, whereas OSM maps are actually made up of many images tiled together. We wouldn't want to get into specially rendering images just for Facebook previews, so I doubt we'd want to supply a composite image for this purpose. However, it might be an acceptable substitute to (for example) simply supply the tile corresponding to the centre point of the map, zoomed out one or two levels.

If you think this would be a worthwhile change, the place to suggest it is at https://github.com/openstreetmap/openstreetmap-website/issues , or better still, supply working code at https://github.com/openstreetmap/openstreetmap-website/pulls . I'd recommend you include a link to this question.

permanent link

answered 14 May '19, 11:18

Richard's gravatar image

Richard ♦
30.9k44279412
accept rate: 18%

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:

×31
×16

question asked: 11 May '19, 14:03

question was seen: 1,816 times

last updated: 14 May '19, 11:18

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum