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

Add support for refreshing the map data #4

Open
gabipetrovay opened this issue Dec 4, 2014 · 3 comments
Open

Add support for refreshing the map data #4

gabipetrovay opened this issue Dec 4, 2014 · 3 comments

Comments

@gabipetrovay
Copy link
Contributor

It would be nice to be able to post a message to the map to change map properties or marker sources without refreshing the iframe where the map is hosted.

@IonicaBizau
Copy link
Member

What's the usecase?

@gabipetrovay
Copy link
Contributor Author

Imagine a map that you load with no delay of data marker requests. Then, just sending a message to it to load a certain map from a remote source. Now you can have different scenarios:

  • Make a directory of maps and switch between without reloading the map or changing pan, zoom, or position.
  • Make a map where you display multiple data sources (together in the same time). This means an extra parameter to clear the previous markers or not.

@IonicaBizau
Copy link
Member

This is a good idea. There are two related issues:

We could get the map object and do what we need with it in custom code:

message

Data to be sent to the other window. The data is serialized using the structured clone algorithm. This means you can pass a broad variety of data objects safely to the destination window without having to serialize them yourself. Source: Window.postMessage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants