Skip to content

Tool: OpenStreetMap embed #26

Open

Description

@AmeliaBR

This issue is for discussion of the reference tool "OpenStreetMap embeds".


OpenStreetMap allows you to create iframe embeds from their website using the Share → HTML option or by generating the URL.

I don't think they have any other direct API for web developers, although their data and generated tiles are of course integrated in many other APIs. But I'm not an expert, and their help pages are more focused on contributing to the project than on extracting data from it!

Activity

  1. added
    discussion: sample JS tool
    status: placeholder
    on May 24, 2019
  2. AmeliaBR commented on May 24, 2019

    @AmeliaBR
    MemberAuthor

    Addendum: they do have a REST API for accessing individual data files, which is relevant for the discussion on data formats, but not for map widgets or client side API.

    Edit: The link I originally posted is the reference for downloading the OSM data files (or uploading edits) on their main server. The reference for accessing individual image tiles might be more relevant for web map usage.

  3. prushforth commented on May 24, 2019

    @prushforth
    Member

    Yes, the popular mapping frameworks use a URL template for accessing tiles, plus JavaScript options for conditioning how the client interacts with the service e.g. tile sizes and other stuff.

    For example:

    L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
        attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
    }).addTo(map);
    
    

    Note that URL templates aren't URLs, and need semantic assistance from the library.

  4. added
    status: editor's draft
    section: reference tools
    and removed
    status: placeholder
    on May 25, 2019
  5. added a commit that references this issue on Jun 18, 2019
  6. nchan0154 commented on Jun 18, 2019

    @nchan0154
    Contributor

    4.3.2 Display a map using tile data from an author-specified web map service

    Not supported. You can use their data to render your own map tiles if desired, but not as a part of their embeds.

    4.3.3 Display map tiles defined in various common coordinate systems

    Not supported.

    4.3.4 Show pinpoint locations or custom markers on the map

    It is possible to show a single marker on a embed map, but to show multiple markers, you need to 'deploy your own slippy map', which is their way of saying use their map tiles with an alternate library.

    4.3.5 Draw polygons or polylines as stylable, interactive vector graphics (separate from the image tiles)

    Not possible with embedded maps.

    4.3.6 Support hyperlinks from markers or vector features

    Not possible with embedded maps.

    4.3.7 Display a basic map without JavaScript.

    Not supported, no fallbacks provided when JavaScript is not loaded.

    4.3.8 Zoom the map independently from the rest of the page

    Supported, the focus is flashing a bit oddly but it is navigable.

    4.3.9 Pan the map display

    Supported with no visible keyboard focus as mentioned

    4.3.10 Load additional map tiles when they pan into view

    Full support, experience is seamless.

    4.3.11 Wrap/duplicate data tiles when panning around the globe

    Fully supported.

    4.3.12 Maintain reasonable scale of labels and lines when zooming

    Same question as Google Maps, while there is scaling applied, the labels can be very small (around 8-9px). What level of support do you think this constitutes as, @AmeliaBR?

    4.3.13 Dynamically load different resolution map tile on zoom

    Fully supported.

    4.3.14 Hide or show (and maybe dynamically load) vector features and labels on zoom

    Full support, features that are too small to be perceived are hidden as you zoom out and vice versa.

    4.3.15 Display map data attribution and links

    Supported, attributed to OpenStreetMap contributers

    4.3.16 Apply custom styling to map markers and vector features

    Not supported, need to deploy own slippy map using a third party library.

    4.3.17 Apply custom styling to map controls

    Not supported

    4.3.18 Toggle whether default controls are displayed

    Not supported

    4.3.19 Select map view from latitude and longitude point

    Fully supported, can search by lat long and export that map.

    4.3.20 Select map view from street address or place name

    Full support.

    4.3.21 Reproject map tile data into a new projection or globe view

    No support

    4.3.22 Save the location or export to other application

    Clicking through to the larger map will allow you to export the map as a link, HTML, or just the point as a Geo URI. I think the GEO URI component constitutes as full support.

  7. AmeliaBR commented on Jun 18, 2019

    @AmeliaBR
    MemberAuthor

    Same question as Google Maps, while there is scaling applied, the labels can be very small (around 8-9px). What level of support do you think this constitutes as, @AmeliaBR?

    If the labels always stay (approximately) the same size, that counts as support for this feature. But it's definitely worth noting somewhere that the default font size is often very small & may not reflect the user's accessibility preferences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussion: sample JS toolsection: reference toolsstatus: editor's draft

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions