Skip to content

Commit

Permalink
feat: add home button
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Apr 15, 2022
1 parent 5d9233f commit d73b240
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Map from '@arcgis/core/Map';
import MapView from '@arcgis/core/views/MapView';
import Home from '@arcgis/core/widgets/Home';
import React from 'react';
import 'typeface-montserrat';
import './App.scss';
Expand All @@ -13,7 +14,10 @@ function App() {
const map = new Map({
basemap: 'streets-vector',
});
setMapView(new MapView({ map, container: 'mapDiv', ...config.DEFAULT_EXTENT }));
const view = new MapView({ map, container: 'mapDiv', ...config.DEFAULT_EXTENT });
view.ui.add(new Home({ view }), 'top-left');

setMapView(view);
}, []);

return (
Expand Down

0 comments on commit d73b240

Please sign in to comment.