Skip to content

Google Map Bounds Coordinates #105

Closed
@mxmissile

Description

@mxmissile

The google map api we can get the bounds via these methods:

const bounds = map.getBounds();
const ne = bounds.getNorthEast();
const sw = bounds.getSouthWest();

Does this library support anything like this?

Update: I'm trying to use jsinterop to call these methods:

private async Task OnMapBoundsChanged()
{
        var _mapsJs = await _js.InvokeAsync<IJSObjectReference>("import", "./_content/Majorsoft.Blazor.Components.Maps/googleMaps.min.js");
        await _mapsJs.InvokeVoidAsync("getBounds", _map.MapId);
}

But its not working, (I'm new to js interop), its throwing:

Error: Microsoft.JSInterop.JSException: Could not find 'getBounds' ('getBounds' was undefined).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestquestionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions