Skip to content

Conversation

ahmadayubi
Copy link
Member

@ahmadayubi ahmadayubi commented Jan 5, 2021

Link emits 'tile' events which have x, y, zoom and a callback in details that allows the user to append to the tile on the map at a given coordinate.

For example:

let tileEventSource = document.querySelector("body > mapml-viewer > layer- > extent > link");
tileEventSource.addEventListener("tile", (e) => {
    let cusTile = document.createElement("IFRAME");
    cusTile .src = "https://www.youtube.com/embed/yI2oS2hoL0k?autoplay=1&mute=1";
    cusTile .width = 256;
    cusTile .height = 256;
    e.detail.appendTile(cusTile );
});

There's a full example in debug/clientTile.html

Closes #219

@ahmadayubi ahmadayubi marked this pull request as ready for review January 7, 2021 14:25
@prushforth prushforth merged commit 5bc36bf into Maps4HTML:master Jan 15, 2021
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.

Custom Rendering API
2 participants