Skip to content

sfomuseum/www-sfomuseum-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

www-sfomuseum-map

This is a standalone HTML/JavaScript reference application implementing a map element common to all SFO Museum websites.

Important

  • This is not a "drop-in" widget to be used other websites but rather a place where all the necessary code, dependencies and choices surrounding map elements for SFO Museum websites can be reviewed and cloned as necessary.

Tools

$> make cli
go build -mod vendor -o bin/server cmd/server/main.go

server

server is a command-line tool (written in Go) to serve the web application in the www directory. It updates data- attributes on the body element of HTML pages with map provider and provider-specific details provided by flags.

$> ./bin/server -h
  -map-provider string
    	Valid options are: nextzen, protomaps, rasterzen.
  -nextzen-apikey string
    	A valid Nextzen API key.
  -protomaps-apikey string
    	A valid Protomaps API key.
  -server-uri string
    	A valid aaronland/go-http-server URI. (default "http://localhost:8080")

For examples, see the "Map providers" section.

Notes

The server tool is primarily meant for local testing and debugging. If we ever deploy this to production the code should be updated to read -nextzen-apikey, -protomaps-apikey and other sensitive values using the sfomuseum/runtimevar package.

Map providers

Nextzen ("rasterzen")

$> go run -mod vendor cmd/server/main.go \
	-map-provider rasterzen \
	-nextzen-apikey {NEXTZEN_APIKEY}

Protomaps

$> go run -mod vendor cmd/server/main.go \
	-map-provider protomaps \
	-nextzen-apikey {PROTOMAPS_APIKEY}

Coastline

$> go run -mod vendor cmd/server/main.go \
	-map-provider coastline

The coastline provider is bounded to the San Francisco Bay Area. It provides a basemap consisting only of the coastline of Bay Area derived from a GeoJSON file.

Coastline (Protomaps)

$> go run -mod vendor cmd/server/main.go \
	-map-provider coastline-protomaps

The coastline-protomaps provider is bounded to the San Francisco Bay Area. It provides a basemap consisting only of the coastline of Bay Area derived from a Protomaps tile database.

Data

Documentation for data files is incomplete at this time.

Campus

$> make campus

See also:

Complex

$> make complex

See also:

sfomuseum.maps.data.js

$> make data-js

sfomuseum.maps.catalog.js

TBW

See also:

See also

Tiles

Leaflet

Tools

Data

Theory

About

Standalone HTML/JavaScript reference application implementing a map element common to all SFO Museum websites.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published