Porównaj commity

...

4 Commity

Autor SHA1 Wiadomość Data
Jake Coppinger 728ed63765 Adjust start location 2023-01-15 22:32:49 +11:00
Jake Coppinger 9f12a7ce10 Adjust max/min zoom 2023-01-15 22:28:50 +11:00
Jake Coppinger 4e61372e26 Add deploy script and clean up 2023-01-15 22:18:39 +11:00
Jake Coppinger 71641eeaeb Add server url 2023-01-15 22:18:28 +11:00
4 zmienionych plików z 12 dodań i 8 usunięć

Wyświetl plik

@ -64,7 +64,8 @@
"scripts": {
"start": "PORT=5000 node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js"
"test": "node scripts/test.js",
"deploy": "npm run build && rsync -r --progress build/ ../deploy-safe-cycling-map/"
},
"eslintConfig": {
"extends": "react-app"

1
public/CNAME 100644
Wyświetl plik

@ -0,0 +1 @@
safecyclingmap.com

Wyświetl plik

@ -70,9 +70,11 @@ export const mapOnLoad = (map: maplibregl.Map) => () => {
// Add a new vector tile source with ID 'mapillary'.
map.addSource("osm2streets-vector-tileserver", {
type: "vector",
tiles: ["http://localhost:3000/tile/{z}/{x}/{y}"],
minzoom: 15,
maxzoom: 20,
tiles: ["https://api.safecyclingmap.com/tile/{z}/{x}/{y}"],
// tiles: ["http://localhost:3000/tile/{z}/{x}/{y}"],
minzoom: 16,
maxzoom: 19,
});
// addLayer(map, "LightRail", {

Wyświetl plik

@ -8,9 +8,9 @@ export function Map() {
const mapContainer = React.useRef<HTMLDivElement>(null);
const mapRef = React.useRef<maplibregl.Map | null>(null);
const [lng, setLng] = useState(151.21084276742022);
const [lat, setLat] = useState(-33.8720286260115);
const [zoom, setZoom] = useState(17);
const [lng, setLng] = useState(151.2160755932166);
const [lat, setLat] = useState(-33.88056647217827);
const [zoom, setZoom] = useState(17.504322191852786);
useEffect(() => {
// This is called on every pan
@ -61,7 +61,7 @@ export function Map() {
<div>
<div className="sidebar">
<label>
A work in progrss side project by{" "}
A work in progress side project by{" "}
<a
target="_blank"
rel="noopener noreferrer"