Xamarin.CustomMapView.Droid 1.0.0

A Xamarin wrapper around Google Map APIs for Droid

Install-Package Xamarin.CustomMapView.Droid -Version 1.0.0
dotnet add package Xamarin.CustomMapView.Droid --version 1.0.0
<PackageReference Include="Xamarin.CustomMapView.Droid" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xamarin.CustomMapView.Droid --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

NetworkManageriOS

A Xamarin wrapper around Google Map APIs for Droid

Usage:

using System;
using System.Collections.Generic;
using Android.App;
using Android.Support.V4.App;
using Android.Widget;
using Android.OS;
using Android.Gms.Maps;
using Android.Gms.Maps.Model;
using Subsystems.CustomMapViewDroid.External;

......
......

private CMPMapViewProxy _mapViewProxy;

Initialize

var cameraPostion = new CameraPosition.Builder()
                                              .Target(new LatLng(22.6789, 88.4567))
                                              .Zoom(12)
                                              .Build();

var mapOptions = new GoogleMapOptions()
    .InvokeMapType(GoogleMap.MapTypeNormal)
                    .InvokeZoomControlsEnabled(false)
                    .InvokeCompassEnabled(true)
                    .InvokeCamera(cameraPostion);
_mapViewProxy = new CMPMapViewProxy("AIzaSyB9V7YYORxaF4nfSHEZIBaPUwXk8uDkJos",
                                    this, Resource.Id.map, mapOptions,
                                    () =>
{




});
    

FitMarkers

public void FitMarkers(List<Marker> markersList, int padding);
    

AddMarkers

var mar = new Marker();
mar.Position = new CLLocationCoordinate2D(22.6789, 88.4567);
mar.Title = "Home";

var mar1 = new Marker();
mar1.Position = new CLLocationCoordinate2D(22.6218, 88.4180);
mar1.Title = "Old Home";

_mapViewProxy.AddMarkers(new List<Marker>()
{
   mar, mar1

});
    

AddMarkersForPlacesAsync

_mapViewProxy.AddMarkersForPlacesAsync(new List<string>()
{

    "<Place_1>", "<Place_2>", "<Place_3>"

});

DrawRoutePolylinesAsync

_mapViewProxy.DrawRoutePolylinesAsync("<Place_1>", "<Place_2>", null, null);

FindDistancesAsync - signature

public async Task<JArray> FindDistancesAsync(List<string> startLocationsList,
                                             List<string> endLocationsList,
                                             Dictionary<string, string>
                                             additionalParametersDictionary);

GetPlaceDetailsAsync - signature

public async Task<Dictionary<string, object>> GetPlaceDetailsAsync(
                                                string placeIDString,
                                                Dictionary<string, string>
                                                additionalParametersDictionary);

GetPlacePhotoAsync - signature

public async Task GetPlacePhotoAsync(string placeIdString,
                                     PlacePhotoCallback
                                     photoCallback);

SearchForNearByPlaces - signature

public async Task SearchForNearByPlaces(string placeString,
                                        string typeString,
                                        CLLocationCoordinate2D location,
                                        double radius,
                                        Dictionary<string, string>
                                        additionalParametersDictionary,
                                        PlaceSearchCallback searchCallback);

NetworkManageriOS

A Xamarin wrapper around Google Map APIs for Droid

Usage:

using System;
using System.Collections.Generic;
using Android.App;
using Android.Support.V4.App;
using Android.Widget;
using Android.OS;
using Android.Gms.Maps;
using Android.Gms.Maps.Model;
using Subsystems.CustomMapViewDroid.External;

......
......

private CMPMapViewProxy _mapViewProxy;

Initialize

var cameraPostion = new CameraPosition.Builder()
                                              .Target(new LatLng(22.6789, 88.4567))
                                              .Zoom(12)
                                              .Build();

var mapOptions = new GoogleMapOptions()
    .InvokeMapType(GoogleMap.MapTypeNormal)
                    .InvokeZoomControlsEnabled(false)
                    .InvokeCompassEnabled(true)
                    .InvokeCamera(cameraPostion);
_mapViewProxy = new CMPMapViewProxy("AIzaSyB9V7YYORxaF4nfSHEZIBaPUwXk8uDkJos",
                                    this, Resource.Id.map, mapOptions,
                                    () =>
{




});
    

FitMarkers

public void FitMarkers(List<Marker> markersList, int padding);
    

AddMarkers

var mar = new Marker();
mar.Position = new CLLocationCoordinate2D(22.6789, 88.4567);
mar.Title = "Home";

var mar1 = new Marker();
mar1.Position = new CLLocationCoordinate2D(22.6218, 88.4180);
mar1.Title = "Old Home";

_mapViewProxy.AddMarkers(new List<Marker>()
{
   mar, mar1

});
    

AddMarkersForPlacesAsync

_mapViewProxy.AddMarkersForPlacesAsync(new List<string>()
{

    "<Place_1>", "<Place_2>", "<Place_3>"

});

DrawRoutePolylinesAsync

_mapViewProxy.DrawRoutePolylinesAsync("<Place_1>", "<Place_2>", null, null);

FindDistancesAsync - signature

public async Task<JArray> FindDistancesAsync(List<string> startLocationsList,
                                             List<string> endLocationsList,
                                             Dictionary<string, string>
                                             additionalParametersDictionary);

GetPlaceDetailsAsync - signature

public async Task<Dictionary<string, object>> GetPlaceDetailsAsync(
                                                string placeIDString,
                                                Dictionary<string, string>
                                                additionalParametersDictionary);

GetPlacePhotoAsync - signature

public async Task GetPlacePhotoAsync(string placeIdString,
                                     PlacePhotoCallback
                                     photoCallback);

SearchForNearByPlaces - signature

public async Task SearchForNearByPlaces(string placeString,
                                        string typeString,
                                        CLLocationCoordinate2D location,
                                        double radius,
                                        Dictionary<string, string>
                                        additionalParametersDictionary,
                                        PlaceSearchCallback searchCallback);

Release Notes

1. Initial release for MapView omponent for Droid
2. Wraps Google Map view sdk
3. Not fully Thread safe

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 149 10/25/2018