Return back to map, and import js in mapcss
This commit is contained in:
parent
7d517ed1bc
commit
e353710afc
@ -1,4 +1,5 @@
|
|||||||
@import url('https://api.mapbox.com/mapbox-gl-js/v2.14.1/mapbox-gl.css');
|
@import url('https://api.mapbox.com/mapbox-gl-js/v2.14.1/mapbox-gl.css');
|
||||||
|
@import url('https://api.mapbox.com/mapbox-gl-js/v2.14.1/mapbox-gl.js');
|
||||||
@import 'styles/colours.css';
|
@import 'styles/colours.css';
|
||||||
@import 'styles/content.css';
|
@import 'styles/content.css';
|
||||||
@import 'styles/forms.css';
|
@import 'styles/forms.css';
|
||||||
|
@ -10,7 +10,7 @@ mapboxgl.accessToken = 'pk.eyJ1IjoiYWxpLWFkbGkiLCJhIjoiY2xuM2JtYjV1MGE5djJrb2d5O
|
|||||||
export function CityMap() {
|
export function CityMap() {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const map = new mapboxgl.Map({
|
const map = new mapboxgl.Map({
|
||||||
container: 'leaflet-container', // container ID
|
container: 'map', // container ID
|
||||||
style: 'mapbox://styles/mapbox/streets-v12', // style URL
|
style: 'mapbox://styles/mapbox/streets-v12', // style URL
|
||||||
center: [-73.5801403, 45.4962261], // starting position [lng, lat]
|
center: [-73.5801403, 45.4962261], // starting position [lng, lat]
|
||||||
zoom: 15, // starting zoom
|
zoom: 15, // starting zoom
|
||||||
|
Loading…
Reference in New Issue
Block a user