thisGoogle.Maps
ナガットパッケージとサンプルチュートリアルを使用して、Xamarin Forms iOSアプリケーションでGoogleマップを実装しようとしています。私はnugetパッケージをインストールし、私のプロジェクトのiOSのセクションでusing Google.Maps
とパッケージが含まれていますが、私はGoogle.Maps
機能を無効にしようとすると、私は、これらの関数が見つからないというエラーを受信していていますXamarinフォーム - iOSで上書きするGoogle.Maps関数が見つかりません
MyCoolClass.LoadView() : no suitable method found to override
MyCoolClass.ViewWillAppear(bool) : no suitable method found to override
は私のコードです:ここでは
using System;
using System.Collections.Generic;
using System.Linq;
using CoreGraphics;
using CustomRenderer;
using CustomRenderer.iOS;
using MapKit;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Maps;
using Xamarin.Forms.Maps.iOS;
using Xamarin.Forms.Platform.iOS;
using Google.Maps;
[assembly: ExportRenderer(typeof(CustomMap), typeof(CustomMapRenderer))]
namespace CustomRenderer.iOS
{
public class CustomMapRenderer : MapRenderer
{
MapView gMapView;
public override void LoadView()
{
base.LoadView();
CameraPosition camera = CameraPosition.FromCamera(latitude: 37.797865,
longitude: -122.402526,
zoom: 6);
mapView = MapView.FromCamera(CGRect.Empty, camera);
mapView.MyLocationEnabled = true;
gMapView = mapView;
}
...
}
レンダラー内のネイティブコントロール( 'Control')はこれらのメソッドを持たないでしょう。 – SushiHangover
ありがとうSushiHangover、私はあなたも過去に私の救助に来たことを覚えています!私はXamarinの新機能で、解決策は何ですか? –
Xamarin.Forms.Mapsの上にGooge Mapsを使用しようとしているのはなぜですか? iOSで?デフォルトでは、Xamarin.Forms.Mapsは、iOSユーザーが表示すると予想されるiOSマップを使用します。 –