Skip to content

SN-F-QR/google-map-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Map Generator

GitHub Super-Linter CI Check dist/ CodeQL Coverage

This action generates a custom-styled static map image using the Google Maps Static API and save it to repository as .png.

generated images

It supports:

  • generating a map with best quality that the API allows
  • Map style customization through src/map-style.json

Tip

Find more styles in SNAZZY

Usage

Prerequisite

  1. Apply a Google Maps Static API Key
  2. Set it as an Action Secret named MAP_API_KEY in your GitHub repository's Settings > Secrets and variables > Actions

Inputs

  1. google_static_map_api_key
  2. address: the detail address of the map center, check here for validation
  3. zoom: The zoom level of the map. Typically ranges from 0 (world view) to 20+ (building level).
  4. output: output path and filename for the generated map image

Usage Example

- name: Generate google static map
  uses: sn-f-qr/google-map-generator@v1
  with:
    google_static_map_api_key: ${{ secrets.MAP_API_KEY }}
    address: 'Shinjuku, Tokyo'
    zoom: '8'
    output: 'public/generated-map.png'

See actual usage

About

A Github Action to generate Google Map static image

Resources

License

Stars

Watchers

Forks

Packages

No packages published