Custom viewCell render problem on first time but items exist

I have problem with the custom item viewCell render. I created a custom cell to display pin on map. On the first time pins doesn't show on the map, but itemSource is initialize and collection are not empty. I found the same problem on forum and the resolve of this problem was a definition of heigh and weight object Issue. Doesn't work for me. After refresh the view, pins was appearing on the map. I paste the fragment of my code and screen.

<datatemplate x:key="markerTemplate">

                <stacklayout padding="-12,-12,0,0" isclippedtobounds="false" horizontaloptions="StartAndExpand" verticaloptions="Center" heightrequest="60">

                    <ffimageloadingsvg:svgcachedimage aspect="AspectFit" source="{Binding MarkerImageSource}" scale="1" horizontaloptions="StartAndExpand" verticaloptions="Center" heightrequest="15" widthrequest="23">

                </ffimageloadingsvg:svgcachedimage></stacklayout>

            </datatemplate>


<sfMap:SfMaps.Layers>

                                <sfMap:ImageryLayer x:Name="layerMap" LayerType="OSM" MarkerItemsSource="{Binding Markers}" MarkerTemplate="{StaticResource Key=markerTemplate}" ResetOnDoubleTap="False">

                                </sfMap:ImageryLayer>

                            </sfMap:SfMaps.Layers>

mapa.png


1 Reply

ET Eswaran Thirugnanasambandam Syncfusion Team June 29, 2022 04:54 PM UTC

We prepared a simple sample based on the provided code snippet and checked the reported problem “Custom viewCell render problem on first time loading”. But we were unable to replicate the problem from our side. Please get the tested sample from the below attachment.


If you still face any problem, can you revert us by modifying the sample based on your scenario along with the replication steps. It will help us provide an appropriate solution at the earliest.


Attachment: GMaps_5300de69.zip

Loader.
Up arrow icon