Skip to content

Conversation

@amyfromandi
Copy link
Contributor

@amyfromandi amyfromandi commented Dec 18, 2024

Updates:

  • Added saved locations list to leftside panel
  • Created clickable location names
  • When location names are selected, mapmarker repositions to the lat/lng on the map. Mapview also pans and zooms to that location on the map (at a default of 7 right now).

TODO:

  • Save zoom/orientation config within the database
  • render geojson as spots or clusters onto the map
  • Render the zoom and orientation that is stored in the database
  • Allow postgrest to return geojson

@amyfromandi amyfromandi changed the title User features User features - saved locations Dec 18, 2024
@davenquinn
Copy link
Member

This is linked to UW-Macrostrat/macrostrat#105

Copy link
Member

@davenquinn davenquinn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks broadly good, but there are some improvements that could be made.

@@ -129,6 +131,13 @@ function useMapLocationManager(): [MapPosition, PositionBuilder] {
(position: mapboxgl.LngLat | null, map: mapboxgl.Map | undefined) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should try using the map location management hooks/components from the @macrostrat/mapbox-react module.

mapboxToken: mapboxAccessToken,
mapPosition: inspectPosition,
bounds: [-125, 24, -66, 49],
onMapLoaded: (map) => setMapInstance(map),
Copy link
Member

@davenquinn davenquinn Dec 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be necessary: if you make the panels that require a map reference into separate components, you can get a reference to the map using the useMapRef hook from @macrostrat/mapbox-react. This will only work if it's a separate component within the one that contains the MapAreaContainer.

@@ -41,7 +41,7 @@
max-width: 180px

select
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try using BlueprintJS form components to blend in with the style of the rest of the application

@amyfromandi amyfromandi merged commit 7565df9 into main Feb 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants