Skip to content

Conversation

Kocal
Copy link
Member

@Kocal Kocal commented Sep 11, 2024

Q A
Bug fix? no
New feature? yes
Issues Fix #...
License MIT

A lighter alternative to #2117.

Note that this PR is not 100% complete, it's a POC, it's missing some runtime-checks and options to build a map.

With the following code:

{{ ux_map(
    center=[51.5074, 0.1278],
    fit_bounds_to_markers=true,
    zoom=10,
    markers= [
        { position: [51.5074, 0.1278], title: 'London' },
        { position: [48.8566, 2.3522], title: 'Paris' },
        {
            position: [40.7128, -74.0060], 
            title: 'New York',
            infoWindow: { content: 'Welcom to <b>New York</b>', opened: true }
        },
    ],
    attributes={
        class: 'foo',
        style: 'height: 400px; width: 100%;',
    }
) }}

I'm able to render this map:
image

WDYT @smnandre?

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

Successfully merging this pull request may close these issues.

1 participant