Xamarin.Forms.GoogleMaps.PerSafe 3.3.1

There is a newer version of this package available.
See the version list below for details.

Requires NuGet 2.8.3 or higher.

dotnet add package Xamarin.Forms.GoogleMaps.PerSafe --version 3.3.1
NuGet\Install-Package Xamarin.Forms.GoogleMaps.PerSafe -Version 3.3.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Xamarin.Forms.GoogleMaps.PerSafe" Version="3.3.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xamarin.Forms.GoogleMaps.PerSafe --version 3.3.1
#r "nuget: Xamarin.Forms.GoogleMaps.PerSafe, 3.3.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Xamarin.Forms.GoogleMaps.PerSafe as a Cake Addin
#addin nuget:?package=Xamarin.Forms.GoogleMaps.PerSafe&version=3.3.1

// Install Xamarin.Forms.GoogleMaps.PerSafe as a Cake Tool
#tool nuget:?package=Xamarin.Forms.GoogleMaps.PerSafe&version=3.3.1

alternate text is missing from this package README image Xamarin.Forms.GoogleMaps

alternate text is missing from this package README image alternate text is missing from this package README image Build status Gitter chat donate/gumload

日本語の README はこちら!

Yet another maps library for Xamarin.Forms that optimized for Google maps.

Usage is almost the same as Xamarin.Forms.Maps, Because this is forked from Xamarin.Forms.Maps - github

DEMO Apps

You can try DEMO Apps for Android/iOS that includes all this library features. DEMO Apps source code is here.

screenshot

Motivation

The official Xamarin.Forms.Map has minumn functions only.

Especially, Bing Maps SDK is very old-fashioned because it has not vector-tile, marker's infowindow.

Android and iOS monopolize most the mobile apps market. Thus I think no need Bing maps support.

Furthermore, I am using Google Maps instead of MapKit because it is easy for define common API for Android and iOS.

Xamarin.Forms.GoogleMaps provides maximum Google maps features for Xamarin.Forms!!

Comparison with Xamarin.Forms.Maps

Feature X.F.Maps X.F.GoogleMaps
Map types Yes Yes
Traffic map - Yes
Map events - Yes
Panning with animation Yes Yes
Panning directly - Yes
Pins Yes Yes
Custom Pins - Yes
Pin drag & drop - Yes
Polygons - Yes
Lines - Yes
Circles - Yes
Custom map tiles - Yes

For more information, see Comparison with Xamarin.Forms.Maps.

Setup

Platform Support

Platform Supported
iOS Unified Yes
Android Yes
Windows 10 UWP Yes (Bing map)
Others No

Usage

Same as this

In iOS, get the API Key from Google Maps API for iOS then insert Init of AppDelegate.cs.

// AppDelegate.cs
[Register("AppDelegate")]
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
    {
        global::Xamarin.Forms.Forms.Init();
        Xamarin.FormsGoogleMaps.Init("your_google_maps_ios_api_key");
        LoadApplication(new App());

        return base.FinishedLaunching(app, options);
    }
}

In UWP, you should add Xamarin.Forms.GoogleMaps.UWP.dll to rendererAssemblies with Xamarin.Forms.Forms.Init().

// App.xaml.cs
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
    Frame rootFrame = Window.Current.Content as Frame;

    if (rootFrame == null)
    {
        rootFrame = new Frame();
        rootFrame.NavigationFailed += OnNavigationFailed;

        // Should add UWP side assembly to rendererAssemblies
        var rendererAssemblies = new []
        {
            typeof(Xamarin.Forms.GoogleMaps.UWP.MapRenderer).GetTypeInfo().Assembly
        };
        Xamarin.Forms.Forms.Init(e, rendererAssemblies);
        
        Xamarin.FormsGoogleMaps.Init("your_bing_maps_api_key");

        Window.Current.Content = rootFrame;
    }

    if (rootFrame.Content == null)
    {
        rootFrame.Navigate(typeof(MainPage), e.Arguments);
    }
    Window.Current.Activate();
}

Namespace is Xamarin.Forms.GoogleMaps instead of Xamarin.Forms.Maps.

Sample application is here.

Who uses it?

This is just a short list of apps and projects that use Xamarin.Forms.GoogleMaps. If you've used Xamarin.Forms.GoogleMaps in a apps and would like it listed on this page, Please report it.

<table> <tr> <td align="center"> <h3><a target="_blank" href="https://www.herenow.city/">HereNow</a></h3> <img src="showcase_herenow.jpg" width="200" width="200" style="max-width:100%;"> <p>by <a target="_blank" href="https://www.cinra.co.jp/">CINRA, Inc.</a></p> </td> <td align="center"> <h3><a target="_new" href="https://www.citybee.lt/">CityBee</a></h3> <img src="showcase_citybee.png" width="200" width="200" style="max-width:100%;"> <p> </p> </td> <td align="center"> <h3><a target="_new" href="https://itunes.apple.com/tr/app/rentacarss-ara%C3%A7-takip/id1276280125">Rentacarss Araç Takip</a></h3> <img src="showcase_rentacarss.jpg" width="200" width="200" style="max-width:100%;"> <p> </p> </td> <td align="center"> <h3><a target="_new" href="https://www.uspace.city/">UPSPACE</a></h3> <img src="showcase_upspace.png" width="200" width="200" style="max-width:100%;"> <p> </p> </td> </tr> <tr> <td align="center"> <h3><a target="_blank" href="https://itunes.apple.com/us/app/transantiagomaster/id541341697?mt=8">TransantiagoMaster</a></h3> <img src="https://user-images.githubusercontent.com/1848210/47026824-b3d31c00-d13c-11e8-926a-d7e68403e856.png" width="200" width="200" style="max-width:100%;"> </td> <td align="center"> <h3><a target="_blank" href="https://play.google.com/store/apps/details?id=jp.co.Shin_yosha.NowStation">NowStation</a></h3> <img src="https://user-images.githubusercontent.com/40679902/52461171-30d54600-2bb1-11e9-9568-36d4f3826815.png" width="200" width="200" style="max-width:100%;"> <p>by <a target="_blank" href="http://www.shin-yosha.co.jp/">SHIN-YOSHA corp.</a></p> </td> <td align="center"> <h3>CmsApp</h3> <a target="_blank" href="https://itunes.apple.com/us/app/cmsmobileapp/id1151248489?ls=1&mt=8">iOS</a>  / <a target="_blank" href="https://play.google.com/store/apps/details?id=net.winsir.cms.CmsMobile">Android</a> <img src="https://user-images.githubusercontent.com/20931876/64476046-8540a400-d147-11e9-9b62-22894d5e2ffd.png" width="200" width="200" style="max-width:100%;"> <p>by <a target="_blank" href="http://cms.winsir.net/">Ruben Carreon</a></p> </td> <td align="center"> <h3>UsynligO</h3> <a target="_blank" href="https://apps.apple.com/us/app/usynligo/id1306699569">iOS</a>  / <a target="_blank" href="https://play.google.com/store/apps/details?id=com.Benum.UsynligO">Android</a> <img src="https://lh3.googleusercontent.com/fqVdiOUQTz7oBwCccvmgq8z8tmV0Ip6tLBI6SCEDVHiKcVGGZWwUrEufJ-iOmUZhxu8=s180-rw" width="200" width="200" style="max-width:100%;"> <p>by <a target="_blank" href="https://play.google.com/store/apps/developer?id=Trond+Benum">Trond Benum</a></p> </td> </tr> </table>

Releases

See Releases or RELEASE_NOTES.

Future plans

I will follow Xamarin.Forms.Maps API as possible. I will add new API only when I implement Google maps original feature.

If you have proposals then send to @amay077 or submit ISSUE or Pull-request!

Latest scheduled features as follows:

  • Pin.ShowInfoWindow/HideInfoWindow method(or IsVisibleInfoWindow property) add in v1.0.0
  • Moving pin by tap and hold add in v1.5.0
  • Adding Polygon, Polyline, Circle add in v1.1.0
  • and more enhancements!

You can use in Windows 10 UWP but this support is reluctant. Because this library has been determined to optimized for Google Maps, New features will not support in UWP.

Contribution

We really appreciate your contribution.

Please read the contribution guideline.

Commmunity Chat

You can join to out gitter room!

Donation

I will continue to work hard with your support!

Donate through Gumroad.

If this project help you reduce time to develop, you can give me a 🍣 😃

License

See LICENSE .

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.0 is compatible.  netstandard1.1 was computed.  netstandard1.2 was computed.  netstandard1.3 was computed.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed.  monoandroid80 is compatible. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Windows Phone wp8 was computed.  wp81 was computed.  wpa81 was computed. 
Windows Store netcore was computed.  netcore45 was computed.  netcore451 was computed. 
Xamarin.iOS xamarinios was computed.  xamarinios10 is compatible. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.0.1 165 10/4/2023
3.3.1 151 9/13/2023
3.3.0 577 1/23/2020
3.2.1.12 552 10/29/2019
3.2.1.4 528 10/21/2019
3.2.1.3 502 10/18/2019
3.2.1.2 487 10/17/2019
3.2.1.1 533 10/16/2019

# 3.3.1

# Bug Fixes

* Fix threading issues causing crash

# 3.3.0

## New Features

* PR#643 [iOS]Make iOS MapRenderer callbacks used for MapView protected
* #654 [Android/iOS]Add ItemTemplateSelector
* #663 [iOS]Support iOS Dark mode **REQUIRES Deployment target: 9.0+**

## Bug Fixes

* #657 [Android]Java.Lang.IllegalArgumentException: 'Unmanaged descriptor'

# 3.2.1
# 3.2.1.5

# Bug Fixes
* Several checks are added to see if map is already disposed

# 3.2.1.4

# Bug Fixes
* Added OnGlobalLayoutListener

# 3.2.1.3

# Bug Fixes
* OnMapReady optimalizations + TransformXamarinViewToAndroidBitmap optimalizations

#  3.2.1.2

# Bug Fixes
* Crash in OnMapReady

#  3.2.1.1

# Bug Fixes
* Make iOS MapRenderer callbacks used for MapView protected
* Check that marker is on map before setting the icon