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

How to add/remove markers dynamically? #55

Closed
rfonovicell opened this issue Jun 9, 2022 · 3 comments
Closed

How to add/remove markers dynamically? #55

rfonovicell opened this issue Jun 9, 2022 · 3 comments
Assignees

Comments

@rfonovicell
Copy link

rfonovicell commented Jun 9, 2022

Hi there, I see you were planning to update the examples/documentation with how to add/remove new markers to a map dynamically: #10

I couldn't find a way to "refresh" the map and read new markers that I add to the page, on the readme file nor on the examples. Can you help me out?

@DocDemar DocDemar assigned Gebuz and DocDemar and unassigned DocDemar Jun 9, 2022
@iamfrank
Copy link
Contributor

@rfonovicell Sorry about the late response but we are looking into making a solution for adding/removing markers dynamically at this time.

We have some different solutions in mind and would like your feedback on what would best suit your use case.

We could do something like this:

  • There could be a function like okapi.refresh().
  • When okapi.refresh() is called, all markers presently available in the HTML document will be created as map markers.
  • All old markers on the map will be overwritten with the new set of markers.

So the workflow would be:

  1. Add marker HTML
  2. okapi.refresh()
  3. Experience updated map markers

How would this work in your case?

@iamfrank iamfrank self-assigned this Nov 24, 2022
@iamfrank
Copy link
Contributor

Proposed fix has been merged into dev branch with #91
Pending next release

@iamfrank
Copy link
Contributor

iamfrank commented Dec 6, 2022

Ready for release

@iamfrank iamfrank closed this as completed Dec 6, 2022
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

No branches or pull requests

4 participants