Map Component created as example in GDG Hangouts Maceió using Polymer and LeafletJS.
1 - Install the element using Bower:
$ bower install --save polyfleat-map
2 - Import the component to your file:
<link rel="import" href="/bower_components/polyfleat-map/polyfleat-map.html">
3 - Call the element:
<polyfleat-map
token="YOUR MAPBOX TOKEN" <!-- REQUIRED! -->
lat="YOUR LATITUDE"
lng="YOUR LONGITUDE"
zoom="ZOOM IN MAP"
type="TYPE OF MAP">
</polyfleat-map>
token: You can get your token access here.
lat: Your latitude value. (Number)
lng: Your longitude value. (Number)
zoom: Optional, default is 12. (Number)
type: set your map type, that can pirates
, streets
, satellite
, light
and dark
. This property is optional, default is streets
.
For default, the map is 400x400 px, but, you can set the size of map, using a simple override variables, see bellow:
<style is="custom-style">
polyfleat-map {
--map-size-height-custom: 300px;
--map-size-width-custom: 600px;
}
</style>
Your are setting a height and width of map! :)
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D