Get Lat/Lon bounds of the viewport with SfMaps

Hi there,

I need the lat/lon bounds of the visible area of an ImageryLayer (top-left, top-right, bottom-left and bottom-right). The ImageryLayer has a LatLngBounds property which would be great but its properties are all NaN (I am setting the map location by the GeoProperties property).  Can you suggest the best way to get the viewpoing geo bounds?

thanks

Martin

5 Replies 1 reply marked as answer

SS Sridevi Sivakumar Syncfusion Team March 22, 2021 10:51 AM UTC

Hi Martin,

I need the lat/lon bounds of the visible area of an ImageryLayer

We would like to inform you that we can achieve your requirement by  GeoCoordinateChanged event arguments. GeoCoordinateChanged event will be trigger while zooming and panning the maps.

GeoCoordinateChanged  event contain arguments are Center,TopLeft, TopRight, BottomLeft, BottomRight.

For more information, please refer the below link
https://help.syncfusion.com/xamarin/maps/mapsprovider#events

LatLngBounds: The SfMaps initial zoom level automatically calculated based on the
LatLngBounds(Northeast, Southwest) of the imagery layer class. It does not contain the 
TopLeft, TopRight, BottomLeft, BottomRight values of the visual screen.

For more information about LatLngBounds:
https://help.syncfusion.com/xamarin/maps/mapsprovider#geo-bounds

Let us know if you need any further assistance.

Regards,
Sridevi S. 


Marked as answer

SE Serhii April 24, 2023 05:19 AM UTC

Hi,

Is it possible to get center in [lon, lat] or bounds for MapShapeLayer of .NET MAUI SfMaps control?

Now it returns :

OldZoomLevel, NewZoomLevel for ZoomLevelChanging (but no center)

X,Y (not lon/lat but absolute) for Panning.

Thanks.



ET Eswaran Thirugnanasambandam Syncfusion Team April 25, 2023 01:28 PM UTC

Hi Serhii Selevych,


In MAUI SfMaps, the MapShapeLayer doesn’t have the support to get the center position. We are having difficulty understanding your use case clearly. Please provide additional details, including images or short videos about your use case, so we can better understand your needs and provide a solution as soon as possible.


Regards,

Eswaran



SE Serhii April 27, 2023 01:56 PM UTC

Hello, thanks for the fast reply!

My case is to update MapShapeSublayers based on the currently shown part of MapShapeLayer.

The reason is that I have multiple quite big json files for each city. I don't want to attach all that data in one goal as it is quite memory consuming and not optimal. Instead I'm trying to investigate if it is possible to use ZoomLevelChanging or Panning callbacks to attach exactly the data of area which is shown at the moment. To make it possible I need top right lon/lat and bottom left for instance as an arguments for callbacks. 



VO Vishal Omprasad Syncfusion Team May 2, 2023 01:54 PM UTC

Hi Serhii,

As of now, MAUI Maps does not have a support for "to get center position for MapShapeLayer" and we have logged a feature request for the same. We will implement this feature in any of our upcoming releases.

At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We will let you know when this feature is implemented. We appreciate your patience until then. 

Thank you for requesting this feature and helping us define it. We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts.

You can also communicate with us regarding the open features any time using our Feature Report page.

We will prioritize the features every release based on the demands and we do not have an immediate plan to implement this feature since we committed with already planned work. So, this feature will be available in any of our upcoming releases.

Please upvote this features to make this our priority. While this feature itself is important we will prioritize the features every release, based on the user demands. So, this feature will be available in any of our upcoming releases.

Feedback link:   https://www.syncfusion.com/feedback/43313/provide-support-to-get-the-mapshapelayer-center-value-in-net-maui-maps

If you have any more specification/suggestions to the feature request, you can add it as a comment in the portal and cast your vote to make it count.

Regards,

Vishal O.


Loader.
Up arrow icon