Skip to content

Displays a static map (using OpenStreetMap) of a provided address or a set of geographic coordinates

License

Notifications You must be signed in to change notification settings

warpech/static-openstreetmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<static-openstreetmap>

<static-openstreetmap> is a Polymer Element that displays a static map (using OpenStreetMap) of a provided address or a set of geographic coordinates.

The actual rendering of the map is provided by staticmap.openstreetmap.de REST API.

Maintained by Marcin Warpechowski, Tomek Wytrębowicz.

Usage Policy

Please note that by default we use OpenStreetMap API at donated servers. So you should consider API usage policy, and Nominatim usage policy.

Demo

Check it live.

Usage

  1. Import Web Components' polyfill:

    <script src="//cdnjs.cloudflare.com/ajax/libs/polymer/0.2.0/platform.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/polymer/0.2.0/polymer.js"></script>
  2. Import Custom Element:

    <link rel="import" href="src/static-openstreetmap.html">
  3. Start using it!

    <static-openstreetmap></static-openstreetmap>

Options

query or lat,lng set is required.

Attribute Options Default Description
query string Address to search for.
width int 500 Image width in px
height int 355 Image height in px
zoom int 1 Zoom
lat int 0 Latitude
lng int 0 Longitude

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

For detailed changelog, check Releases.

License

Cusom Element is distributed under MIT style LICENSE. Maps are provideded under Open Database License

About

Displays a static map (using OpenStreetMap) of a provided address or a set of geographic coordinates

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages