Showing posts with label html. Show all posts
Showing posts with label html. Show all posts

Thursday, 21 October 2021

Adding markers to google maps

Adding stuff to google maps

Demo code:

const coordinates = // array of lat, lng
const flightPath = new google.maps.Polyline({
path: coordinates,
geodesic: true,
strokeColor: '#73B9FF',
strokeOpacity: 1.0,
strokeWeight: 4,
icons: [{
icon: {
path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW
},
offset: '100%'
}],
map: this.theMap,

Useful links

Google maps doc on custom symbols


Post on custom google maps markers


Doing lots of things on google maps

Flexbox & centering stuff



Flexbox 

  • Css to use:
    • display: flex;

  • Vertical align bottom:
    • align-items: flex-end;

  • Horizontal align middle:  
    •   justify-content: center;