locked
How to show SVG image in Google Map PIN using FFImageLoading RRS feed

  • Question

  • User234709 posted

    Hi

    I want to use multiple SVG images to show different Pins on google map in Xamarin.Forms Shell. Can anyone suggest how to achieve it?

    Rakesh

    Friday, March 6, 2020 11:30 AM

All replies

  • User371688 posted

    If you want to customize a Map Pin, you can refer to this document: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/custom-renderer/map/customized-pin

    For using FFImageLoading to show SVG images, you can check the code of FFImageLoading sample:

    SvgReplacePageModel.cs

       ImageSource = SvgImageSource.FromResource("FFImageLoading.Forms.Sample.Resources.replace.svg",
                        replaceStringMap: ReplaceMap);
    

    and SvgReplacePage.xaml

        <ffimageloadingsvg:SvgCachedImage WidthRequest="200" HeightRequest="200" 
                        ReplaceStringMap="{Binding ReplaceMap}"
                        Source="resource://FFImageLoading.Forms.Sample.Resources.replace.svg" />
    
    Monday, March 9, 2020 8:21 AM
  • User371688 posted

    @RakeshKumarKhandelwal

    Have you resolved you question?

    Friday, March 20, 2020 2:33 AM
  • User234709 posted

    @jezh said: If you want to customize a Map Pin, you can refer to this document: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/custom-renderer/map/customized-pin

    For using FFImageLoading to show SVG images, you can check the code of FFImageLoading sample:

    SvgReplacePageModel.cs

       ImageSource = SvgImageSource.FromResource("FFImageLoading.Forms.Sample.Resources.replace.svg",
                      replaceStringMap: ReplaceMap);
    

    and SvgReplacePage.xaml

        <ffimageloadingsvg:SvgCachedImage WidthRequest="200" HeightRequest="200" 
                        ReplaceStringMap="{Binding ReplaceMap}"
                        Source="resource://FFImageLoading.Forms.Sample.Resources.replace.svg" />
    

    Thanks for the information, I will try it.

    Friday, March 20, 2020 10:52 AM
  • User371688 posted

    Hi @RakeshKumarKhandelwal Have you resolved your question?

    Tuesday, March 24, 2020 8:29 AM