Skip to content

Commit

Permalink
quick interactivity for Craig
Browse files Browse the repository at this point in the history
  • Loading branch information
gvarnavi committed May 17, 2024
1 parent f06c2c9 commit 1fb2f28
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/onemit2024.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const fly_duration = 20000;
const access_token = "pk.eyJ1IjoiZ3Zhcm5hdmlkZXMiLCJhIjoiY2pxZTVicmY2NGJyYTQ4cHBpMHF1MnQ0cCJ9.DuX_gamAs2uXdmq8Gio90Q";
const mapbox_style = "mapbox://styles/gvarnavides/clvmxvwcy01bb01rj7q509sg6";
const server_prefix = "https://onemitdata.mit.edu/tiles/";
const mouse_lng_lat = Mutable([]);

const hilbert_source = {
'type': 'geojson',
Expand Down Expand Up @@ -103,6 +104,7 @@ var bounding_box_geojson = {
]
};


const bounding_box_source = {
'type': 'geojson',
'data': bounding_box_geojson
Expand Down Expand Up @@ -366,6 +368,11 @@ map.on("load", () => {
map.addControl(new mapboxgl.NavigationControl(),'bottom-right');
});

map.on("click", (e) => {
mouse_lng_lat.push(e.lngLat);
console.log(mouse_lng_lat);
});

const map_inset = new mapboxgl.Map({
container: 'map_inset',
accessToken: access_token,
Expand Down

0 comments on commit 1fb2f28

Please sign in to comment.