unable to bind tooltip on map

Hi,

I am using sfmap


 I have a pin with price and had customisze tool tip in which I have text images but I am unable to bing images and text
Firstly I thought I might issue of my binding so I added handed image ie. also not visible
2,.Question on loading map I have zoom level 15 but map is not zoomed 
I have paid service of Syncfusion.

below is my code
       <maps:SfMaps  x:Name="sfmaps"                
                  >

                    <maps:SfMaps.Layers>
                        <maps:ImageryLayer
                        x:Name="layer"
                            GeoCoordinates="{Binding GeoCoordinate}"
                            
                            Markers="{Binding CustomMarkers}"
                            RequestTileUri="ImageryLayer_RequestTileUri"
                       
                           >

                            
                            <maps:ImageryLayer.MarkerTemplate>
                                <DataTemplate>

                                    <Grid WidthRequest="50" HeightRequest="30">
                                        <ImageButton Source="Tooltip.png"  Grid.Column="0" WidthRequest="200" HeightRequest="200" ></ImageButton>
                                       <Label Text="{Binding Label}"  TextColor="White" Grid.Column="0"  HorizontalOptions="Center" VerticalOptions="Center" FontSize="Micro"/>
                          
                                        
                                         
                                    </Grid>
                               
                                </DataTemplate>
                            </maps:ImageryLayer.MarkerTemplate>
                             
                     <maps:ImageryLayer.MarkerSettings>
                    <maps:MapMarkerSetting MarkerIcon="Image" ImageSource="Tooltip.png" IconSize="15">
                        <maps:MapMarkerSetting.TooltipSettings>
                            <maps:TooltipSetting ShowTooltip="True"  TextColor="Black" ValuePath="Label"
                                                 Margin="10" BackgroundColor="White"
                                                 StrokeColor="Black" StrokeWidth="2" Duration="5000" >
                            <maps:TooltipSetting.TooltipTemplate>
                            <DataTemplate>
                                 <Frame  x:Name ="frame"  Padding="30" Margin="0" BackgroundColor="#FFFFFF" CornerRadius="4" HeightRequest="100"  WidthRequest="200" Grid.Column="0" HorizontalOptions="EndAndExpand" VerticalOptions="EndAndExpand" IsVisible="False">
                                        <Grid RowSpacing="5" WidthRequest="500" >
                                            <Grid.RowDefinitions>
                                                  <RowDefinition Height="5*"/>
                                        <RowDefinition Height="5*"/>
                                            </Grid.RowDefinitions>
                                           <Image  Source="pin.png"  ></Image>
                                                <Label Text="Text" Grid.Row="1" Margin="10"  FontSize="16" TextColor="Black" FontAttributes="Bold"></Label>
                                             <rating:SfRating Value="{Binding Star}" ItemSize="14" Margin="15,35,10,0" Grid.Row="1" ReadOnly="True">
                                                                                        <rating:SfRating.RatingSettings>
                                              <rating:SfRatingSettings UnRatedFill="Transparent" RatedFill="#fdb915" RatedStroke="Transparent" UnRatedStroke="Transparent"  />
                                                                                        </rating:SfRating.RatingSettings>
                                                                  </rating:SfRating>
                                                                 <Label HorizontalOptions="FillAndExpand" Text="{Binding Ara}" TextColor="#666666"  Margin="15,45,0,0" Grid.Row="1"  FontSize="Medium" />

                                                                <Label Text="........................................................." TextColor="Gray" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Margin="10,55,0,30" Grid.Row="1"></Label>

                                            <Label Text="{Binding SlashPrice}" FontSize="12"  TextColor="#999999" Grid.Row="1" Margin="15,70,0,0" />
                                             <Label Text="{Binding Label}" TextColor="#ff0062" Grid.Row="1" Margin="150,70,0,40" FontAttributes="Bold" FontSize="14"/>
                                </Grid>
           
                                  </Frame>
             
                            </DataTemplate>
                        </maps:TooltipSetting.TooltipTemplate>
                                 </maps:TooltipSetting>
                        </maps:MapMarkerSetting.TooltipSettings>

                    </maps:MapMarkerSetting>
                </maps:ImageryLayer.MarkerSettings>
                        </maps:ImageryLayer>
                    </maps:SfMaps.Layers>
                </maps:SfMaps>
Regards

5 Replies

RS Ramya Soundar Rajan Syncfusion Team April 8, 2020 07:50 PM UTC

Hi Yogita, 
  
 Greetings from Syncfusion. 
  
Query 1:  I have a pin with price and had customize tool tip in which I have text images, but I am unable to bind images and text. Firstly, I thought I might issue of my binding, so I added handed image ie. also, not visible 
  
 We have checked the reported query with provided code snippet. We suggest you enable the frame IsVisible property in tooltip template to show label and image to resolve the reported issue as like below code snippet. 
 
… 
<maps:TooltipSetting.TooltipTemplate> 
                                        <DataTemplate> 
                                            <Frame  x:Name ="frame"  Padding="30" Margin="0" BackgroundColor="#FFFFFF" CornerRadius="4" HeightRequest="100"  WidthRequest="200" Grid.Column="0" HorizontalOptions="EndAndExpand" VerticalOptions="EndAndExpand" IsVisible="True"> 
… 
 
 
Query 2: on loading map I have zoom level 15 but map is not zoomed  
 
Can you please confirm, setting the zoom level as 15 in google map uri? 
 
        private void ImageryLayer_RequestTileUri(object sender, TileUriArgs e) 
       
            var link = "http://mt1.google.com/vt/lyrs=y&x=" + e.X.ToString() + "&y=" + e.Y.ToString() + "&z=" + e.ZoomLevel.ToString(); 
            e.Uri = link; 
       
 
 
Regards, 
Ramya S 



YO Yogita April 9, 2020 02:18 AM UTC

Hi Ramya ,

Query 2 
yes the zoomlevel is 15 at uri
please help 

Regards,
Renu Singh


RS Ramya Soundar Rajan Syncfusion Team April 9, 2020 01:53 PM UTC

Hi Yogita, 

Query 2: On loading map I have zoom level 15 but map is not zoomed 

We have checked the reported issue by creating sample with the ZoomLevel property value as 15. But were unable to reproduce the issue. We would like to inform that to use the ZoomLevel property of SfMaps to zoom the map as like below code snippet.    
 
… 
 
maps:SfMaps  x:Name="sfmaps" ZoomLevel="15"> 
 
            <maps:SfMaps.Layers> 
                <maps:ImageryLayer 
                        x:Name="layer"  
                            GeoCoordinates="{Binding GeoPointValue}"                             
                            Markers="{Binding CustomMarkers}"    
                     RequestTileUri="Layer_RequestTileUri" 
                          
… 

We have created sample based on your code snippet and the zoom level property. Please find the sample from below location. 

https://www.syncfusion.com/downloads/support/directtrac/general/ze/MapsZoomTestedSample2137256152

Screenshot:  
 


So, could you please check the issue with the attached sample and let us know whether it is resolved or not? Still if you are facing issue, please revert us by modifying the sample based on your application along with replication procedure or provide the sample. This will be helpful for us to investigate further and provide you a better solution at the earliest.  
 
Regards, 
Ramya S 



YO Yogita April 14, 2020 06:09 AM UTC

Hi Ramya ,

Need ur help I want  use Marker Selected as binnacle is it possible?


Regards, 


RS Ramya Soundar Rajan Syncfusion Team April 15, 2020 12:08 PM UTC

Hi Yogita, 
  
Can you please provide more information about your requirement like picture or video? This will be helpful for us to investigate further and provide you a better solution at the earliest  
  
Regards, 
Ramya S 


Loader.
Up arrow icon