<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.
Please note that by default we use OpenStreetMap API at donated servers. So you should consider API usage policy, and Nominatim usage policy.
-
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>
-
Import Custom Element:
<link rel="import" href="src/static-openstreetmap.html">
-
Start using it!
<static-openstreetmap></static-openstreetmap>
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 |
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
For detailed changelog, check Releases.
Cusom Element is distributed under MIT style LICENSE. Maps are provideded under Open Database License