Giter VIP home page Giter VIP logo

maui.googlemaps's Introduction

Logo Maui.GoogleMaps

NuGet

Maps library for MAUI that uses Google maps on both mobile platforms - Android and iOS.

Usage is almost the same as Xamarin.Forms.GoogleMaps - github because it was forked from it. More information about library capabilities can be found there. Please note that after the migration to MAUI some properties, events or commands may have been omitted. Also, the namespace is Maui.GoogleMaps instead of Xamarin.Forms.GoogleMaps.

Platform Support

Platform Supported
iOS Yes
Android Yes
Windows 10/11 No
Others No

Setup

  • Target .NET 8 for best experience
  • Install into your MAUI project by downloading the library from nuget: NuGet
  • Finish the Google Cloud Console setup
  • Get your API Keys from Google, then in Platforms/Android:
// MainApplication.cs
 [Application]
 [MetaData("com.google.android.maps.v2.API_KEY",
            Value = Variables.GOOGLE_MAPS_ANDROID_API_KEY)]
 public class MainApplication : MauiApplication
 {
    public MainApplication(IntPtr handle, JniHandleOwnership ownership) 
    : base(handle, ownership)
    { }
    
    protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
  }

And in the MauiProgram.cs file

// MauiProgram.cs
using Maui.GoogleMaps.Hosting;
...
public static MauiApp CreateMauiApp()
{
        var builder = MauiApp.CreateBuilder();
        builder.UseMauiApp<App>();
            
#if ANDROID
        builder.UseGoogleMaps();
#elif IOS
        builder.UseGoogleMaps(Variables.GOOGLE_MAPS_IOS_API_KEY);
#endif
        return builder.Build();	
}

Sample application is here.

Contribution

I really appreciate your contribution. If u have spotted a bug you want to fix or have a feature/enhancement you would like to implement please open a pull request targeting the maui branch. If u have any questions you are free to reach out to me - all contact info is available in my profile.

License

See LICENSE .

maui.googlemaps's People

Contributors

amay077 avatar michalpaukert avatar gadzair avatar themronion avatar jkennedy24 avatar kochizufan avatar hofmanix avatar pavlolukianets avatar paulwagener avatar fumiya-kume avatar mierzynskim avatar tabamotch avatar matiszak avatar brakonier946 avatar yamachu avatar danielkatz avatar exomode avatar simonemarra avatar atsushieno avatar dansiegel avatar jeancollas avatar kageshiron avatar kekyo avatar codingcontraption avatar samirkhatri avatar samirbittar avatar yanc35 avatar coredeveloper avatar mwgarwood avatar uitmaurik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.