Skip to content

Change the size of the map through variables #66

Description

@rfarkv

Hi!
I'm using variables to set height and weight, something like this:

string mapaHeight = "100vh";
string mapaWidth = "100vw";

       <RealTimeMap @ref="realTimeMap"  OnMouseUpMap="onMouseUpMap" OnClickMap="onClickMap" OnAfterMapLoaded="@AfterMapLoaded" OnZoomLevelEndChange="@OnZoomLevel" Parameters="parameters" height=@mapaHeight width=@mapaWidth ></RealTimeMap>

Then i have a method that do some stuff and calculate the new site of the map, i then change the value of the variables:

public void string ChangeMapSize()
{
        ...
        mapaWidth = "50vw";
        mapaHeight = 50vh";

       StateHasChanged();
}

The problem is the map is not changing, at all.
I change both variables, and call StateHasChanged, nothing happens. Am i missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions