Skip to content

Add support for refreshing the map data #4

Description

@gabipetrovay

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.

Activity

  1. IonicaBizau commented on Dec 4, 2014

    @IonicaBizau
    Member

    What's the usecase?

  2. gabipetrovay commented on Dec 8, 2014

    @gabipetrovay
    ContributorAuthor

    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.
  3. IonicaBizau commented on Dec 8, 2014

    @IonicaBizau
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions