SfMaps - greyscaled design
Hi there,

how can we render a greyscale map?
Have a look: https://maps.omniscale.com/de/examples/leaflet_grayscale
Have a look: https://maps.omniscale.com/de/examples/leaflet_grayscale
Google Maps or OpenStreetMap...
<SfMaps ModelType="@typeof(IDataTemplate)" Height="430px"> <MapsCenterPosition Latitude=47.0613942 Longitude=15.437373></MapsCenterPosition> <MapsZoomSettings Enable="true" ZoomFactor=12></MapsZoomSettings> <MapsLayers> <MapsLayer LayerType="ShapeLayerType.OSM" AnimationDuration=0> </MapsLayer> </MapsLayers> </SfMaps>Cheers, Volker
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
SB
Swetha Babu
Syncfusion Team
January 14, 2021 11:24 AM UTC
Hi Volker,
Thank you for contacting Syncfusion support.
We can render the grayscale OSM map using the UrlTemplate property. We need to set the LayerType property as OSM and set the URL link of the OSM map in the UrlTemplate property. The URL links provided by OSM map is available from the below documentation link. The link with gray-scale map is available from the below documentation link.
We have created a simple Blazor application with the grayscale OSM map and the same can be downloaded from the below link.
Code Snippet:
|
@using Syncfusion.Blazor.Maps
<SfMaps>
<MapsCenterPosition Latitude=47.0613942
Longitude=15.437373></MapsCenterPosition>
<MapsZoomSettings Enable="true"
ZoomFactor=12></MapsZoomSettings>
<MapsLayers>
<MapsLayer LayerType="ShapeLayerType.OSM" TValue="string" UrlTemplate="https://tiles.wmflabs.org/bw-mapnik/level/tileX/tileY.png">
</MapsLayer>
</MapsLayers>
</SfMaps> |
In the above sample, we have used the below tile link as UrlTemplate from the above documentation.
In the above tile link, we need to replace ${z}, ${x}, ${y} as level, tileX, tileY respectively when we set it in the UrlTemplate property.
Please let us know if you need any further assistance.
Regards,
Swetha Babu
Marked as answer
VO
Volker
January 14, 2021 11:52 AM UTC
Hi Swetha,
works like a charm. Thank you so much, you at Synfusion's are best!
Greetings from Graz/Austria.
Cheers,
Volker
Volker
SA
Sabari Anand Senthamarai Kannan
Syncfusion Team
January 15, 2021 04:05 AM UTC
Hi Volker,
Thank you for the update.
We are happy to hear that the provided solution meets your requirement. Please let us know if you need any further assistance.
Regards,
Sabari Anand
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
- Marked answer
-
VO Volker
- Jan 13, 2021 05:14 PM UTC
- Jan 15, 2021 04:05 AM UTC