How to make a SfMap full screen with a scale of 1 so heights get determined automatically?
I'm trying to add a map to my blazor page which needs to be full screen width and display the entire world ONCE, the height of the component will be automatically determined. Right now I got the width set to 100% but its showing the world map 3 times because height is still the same. How can I achieve something like this? See attachment for what i got right now.
Thanks in advance
Attachment: worldmap3times_54633470.7z
Attachment: MapExample_3ed48e3b.zip
Thank you for your update.
We have checked the provided screenshot. The map component gets the height and width from its parent element when height and width is set as 100%. So, we need to remove the styles that restrict the full page size from the application. However, we are getting the white space at the side of the maps. We are analyzing on the styles and we will update you with further details on 8th September, 2020. We have created the simple Blazor application to demonstrate the same and it can be downloaded from the following link.
https://www.syncfusion.com/downloads/support/forum/155192/ze/MapFullSize1774026147
In the above sample, we have rendered the map component to the full size by removing the styles that restrict the style for full-page size.
Please let us know if you need any further assistance.
Regards,
Swetha Babu
Sorry for the inconvenience caused.
|
<div class="main">
<div class="top-row px-4">
<a rel='nofollow' href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
</div>
<div class="content px-4">
@Body
</div>
</div> |
Please find the below code snippet after removing the styles from the MainLayout.razor file.
|
<div class="main">
@Body
</div> |
In the above code snippet, the main class denotes the full page size. Since the maps component gets rendered based on the parent element, we have removed the style that restricts the full page size. We have created a simple sample to demonstrate the same and it can be downloaded from the below link.
https://www.syncfusion.com/downloads/support/forum/155192/ze/OSMMap-9096217
Please let us know if the above sample meets your requirement. If not, please provide us more details about your requirement. It will be helpful for us to analyze further and assist you better.
Regards,
Swetha Babu
Thank you for your update.
Please let us know if you need any further assistance.
Regards,
Swetha Babu
Hello @Swetha Babu,
I'm trying to follow your sample, and works perfectly with the original nuget package version, but after upgrade to the last version (20.1.0.55), the map don't render/resize properly when the browser resizes. See on the attachment your sample updated with the latest package.
Thanks in advance
Miquel
Attachment: OSMMap9096217_with_latest_393fdf0b.zip
Hi Miquel,
Sorry for the inconvenience.
We have already fixed the reported issue internally. However, the fix will be included in our weekly patch release which is expected to be available on May 24, 2022. Please follow the below feedback link to keep track of the reported issue.
https://www.syncfusion.com/feedback/34637
Regards,
Indumathi R.
Hello Indumathi,
Thank you very much for the prompt reply.
Regards,
Miquel
Hi Miquel,
We have fixed the reported issue “Maps component is not rendering in full screen height” and included the fix in our weekly patch release(v20.1.56). Please update the latest “Syncfusion.Blazor.Maps” package in your application to resolve the reported issue. Please find the package link below.
https://www.nuget.org/packages/Syncfusion.Blazor.Maps/
Please let us know if you need any further assistance.
Regards,
Indumathi R.
- 13 Replies
- 5 Participants
- Marked answer
-
NS Niels Schutte
- Jun 15, 2020 07:29 AM UTC
- May 19, 2022 03:36 PM UTC