Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create street-geo wrapper component #515

Closed
kfarr opened this issue May 15, 2024 · 1 comment
Closed

create street-geo wrapper component #515

kfarr opened this issue May 15, 2024 · 1 comment
Assignees

Comments

@kfarr
Copy link
Collaborator

kfarr commented May 15, 2024

the component will accept longitude, latitude, elevation and perhaps an array to indicate which child maps to spawn
"mapbox2d" "google3d" are the first 2 options

the component is responsible for spawning the appropriate map component

  • for 3d tiles component, it will inject the key

  • the child entities are not saved -- any child entities created should have a class autocreated that we can use in the future for automated blacklisting (do not save)

  • we can add this component to the "reference layer" entity https://github.com/3DStreet/3dstreet/blob/main/index.html#L95C1-L96C1

  • the component data will be saved

Example properties:

  • longitude (number)
  • latitude (number)
  • elevation (number)
  • maps (array of strings)

Suggested process:

  • For a v1 just focus on spawn of children based on the array values
  • For v2 ensure that if array is changed, the children are updated correctly
  • For v3 integrate into editor

Other notes from chat:

  • for v2, if the array is changed at runtime, ensure that the children are created / destroyed to reflect the updated array
  • ie if {"mapbox2d", "google3d"} at start of session but google3d is removed from array, then remove that child google3d entity that it had created
  • or if no maps are defined at the start of session, but "google3d" is added at runtime as an array entry, then add google3d child (essentially on an update component lifecycle method) https://aframe.io/docs/1.5.0/core/component.html#definition_lifecycle_handler_methods_update

What does elevation value mean?

you can ignore it for now, start with long/lat

I also need to add dynamically to this component corresponding libraries aframe-mapbox-component, aframe-loader-3dtiles, am I right?

we should assume the libraries are already loaded, do not need to do script injection

how to only show these for pro users?

the wrapper will eventually be responsible for providing API keys for their children map components, but for now you can just hardcode the api key in the 3dtiles child / mapbox child it creates

@kfarr
Copy link
Collaborator Author

kfarr commented May 21, 2024

closed with #516

@kfarr kfarr closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants