# Share a link

When you open https://facilmap.org/, the URL in the address bar of your browser will change to something like https://facilmap.org/#8/52.462/13.491/MSfR. The part starting with the # is called the location hash and is continuously updated by FacilMap to represent your current view of the map.

This means that if you want to share a link to a specific view of the map, you can simply copy the URL from the address bar of your browser. Alternatively, you can use the share dialog.

The following information is stored in the location hash:

# Share dialog

To create a link pointing to a particular map view on FacilMap, click on “Tools” and then “Share” in the toolbox.

The following options are available:

  • “Include current map view” defines whether the generated link should point to the current view (map position, active map object, ...) of the map. If this option is disabled, the link will point to the default view (saved default view for collaborative maps, otherwise the rough geographical location of the user).
  • “Show toolbox”: If this is disabled, the toolbox will be hidden when opening the link.
  • “Show search box”: If this is disabled, the search box will be hidden when opening the link.
  • “Show legend” (only for collaborative maps with a legend): If this is disabled, the legend will be hidden when opening the link.
  • “Link type” (only for collaborative maps): The permissions that users will have when opening the link.

Click on “Copy” to copy the link to the clipboard.

Under the “Embed” tab you can generate HTML code to embed FacilMap into a web page. Find out more in the developer documentation.

# Technical details

The location can have one of the following formats:

  • Short format: #q=<search term>
  • Long format: #<zoom>/<latitude>/<longitude>/<layers>/<search term>/<filter>. If the filter and/or search term is empty, the trailing slashes are omitted.

The short format is used if the current map view equals the default view for the search. This means that the map is currently zoomed to the exact location where it would zoom to when opening the result of the search term, and no additional layers or filters are active.

The different components of the long format have the following meaning:

  • zoom: The zoom level of the map, minimum 0, maximum 18 (might be higher or lower depending on the layers)
  • latitude: The latitude of the center of the map, minimum -90, maximum 90
  • longitude: The longitude of the center of the map
  • layers: Each layer is identified by a four-character key. If overlays are enabled, they are appended with a -. For example Mpnk for only Mapnik or Mpnk-Rlie-grid for Mapnik, Relief and Graticule. If any POIs are enabled, they are added to the overlay list with a dynamic key starting with o_ (presets) or O_ (custom query), for example Mpnk-Rlie-grid-o_parking_recycling for Mapnik, Relief, Graticule, parking places and recycling bins.
  • search term: Can be one of the following:
    • The name of a place. Will show all results for this search term.
    • The ID of a specific search result in the form n123, w123, r123 (representing its corresponding OpenStreetMap node, way or relation ID)
    • A route query, for example Berlin to Hamburg
    • Coordinates, for example 52.51704,13.38886 or geo:52.51704,13.38886?z=11
    • The URL of a geographic file
    • The ID of a marker or line in the form m123 or l123 (on collaborative maps)
    • The ID of a view in the form v123 (on collaborative maps). This only works in the short format of the location hash.
    • The ID of an OpenStreetMap object in the form node 123, way 123, relation 123 or trace 123.
    • Anything else that can be typed into the search form.
  • filter: The currently applied filter (on collaborative maps)