0.3.0 • Published 7 years ago
osagai-map v0.3.0
osagai-map
🀄️🌎Google maps web component with Osagai
Web component for using google maps implemented with Osagai
Install
npm install osagai-mapOr import from unpkg
<script type="module" src="https://unpkg.com/osagai-map/dist/osagai-map.mjs"></script>Usage
<osagai-map
api-key="<GOOGLE_MAPS_API_KEY>"
latitude="37.4029937"
longitude="-122.1811813"
zoom="13">
<osagai-map-marker latitude="37.4029937" longitude="-122.1811813">
Hello, I am a marker
</osagai-map-marker>
</osagai-map>API
Table of Contents
osagai-map
Custom element for rendering a map using Google Maps API
Parameters
api-keyString API key to be used on Google Maps. Get API Key docsversionString Version of the Google Maps API (optional, default3.34)librariesString Libraries to use on the Google Maps API, separated by "," (optional, defaultdrawing,geometry,places,visualization)latitudeNumber Latitude to show in the maplongitudeNumber Longitude to show in the mapzoomNumber Zoom to use in the map (optional, defaultundefined)no-auto-tiltBoolean Don't use a tilt (optional, defaultfalse)map-typeString Type of the map to use (roadmap|satellite|hybrid|terrain). mapTypes docsdisable-default-uiBoolean Disable default UIs (optional, defaultfalse)disable-map-type-controlBoolean Disable the map type controls (optional, defaultfalse)disable-street-view-controlBoolean Disable the street-view controls (optional, defaultfalse)disable-zoomBoolean Disable zoom capabilities (Double click and scroll whell) (optional, defaultfalse)max-zoomNumber Max zoom allowed (optional, defaultundefined)min-zoomNumber Min zoom allowed (optional, defaultundefined)
osagai-map-marker
Custom element for rendering a marker in a Google map. Marker documentation
Parameters
latitudeNumber Latitude to show in the maplongitudeNumber Longitude to show in the maptitleString Title of the marker that will appear as a tooltip (optional, defaultundefined)animationString Animation to exhibit dynamic movement to the marker. Values supported from google maps api. Animate marker docs (optional, defaultundefined)hiddenBoolean Hide the marker (optional, defaultfalse)labelString A marker label that appear inside a marker (optional, defaultundefined)