Skip to content

Commit 4279a26

Browse files
committedJun 26, 2016
Add comparison with Xamarin.Forms.Maps document(ja)
1 parent 7e0b5d2 commit 4279a26

File tree

3 files changed

+74
-2
lines changed

3 files changed

+74
-2
lines changed
 

‎COMPARISON_WITH_FORMSMAPS-ja.md

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
Xamarin.Forms.Maps との比較
2+
---
3+
4+
Xamarin.Forms.Maps と比較して、追加された機能等について解説します。特に記載がない限り、Android / iOS のみの対応です。
5+
6+
## 追加された機能
7+
8+
### Polyline, Polygon, Circle のサポート(v1.1.0より)
9+
10+
共通のインターフェースで、ポリライン・ポリゴン・円を追加できます。
11+
12+
![Polyline, Polygon, Circle supports](screenshot02.png)
13+
14+
例えば、ポリラインの追加は以下のように行います。
15+
16+
```
17+
// map as Xamarin.Forms.GoogleMaps.Map
18+
19+
var polyline = new Polyline();
20+
polyline.Positions.Add(new Position(40.77d, -73.93d));
21+
polyline.Positions.Add(new Position(40.81d, -73.91d));
22+
polyline.Positions.Add(new Position(40.83d, -73.87d));
23+
24+
polyline.StrokeColor = Color.Blue;
25+
polyline.StrokeWidth = 5f;
26+
polyline.Tag = "POLYLINE"; // Can set any object
27+
28+
polyline.IsClickable = true;
29+
polyline.Clicked += (s, e) =>
30+
{
31+
// handle click polyline
32+
};
33+
34+
map.Polylines.Add(polyline);
35+
```
36+
37+
ラインの削除は、以下のように行います。
38+
39+
```
40+
map.Polylines.Remove(polyline);
41+
```
42+
43+
ポリラインとポリゴンは、 ``IsClickable````true`` に設定すると ``Clicked`` イベントを受け取ることができます。
44+
45+
円には、 ``IsClickable`` プロパティと ``Clicked`` イベントはありません。これは、 Android ネイティブの Google Maps API がサポートしていないためです。
46+
47+
詳しくは、サンプルプログラム − [XFGoogleMapSample](https://github.com/amay077/Xamarin.Forms.GoogleMaps/tree/master/XFGoogleMapSample)[``ShapesPage.xaml.cs``](https://github.com/amay077/Xamarin.Forms.GoogleMaps/blob/v1.1.0/XFGoogleMapSample/XFGoogleMapSample/ShapesPage.xaml.cs) を参考にしてください。
48+
49+
#### 制限事項
50+
51+
* v1.1.0 では、``Pin``, ``Polyline``, ``Polygon``, ``Circle`` の各プロパティのバインディングはサポートしていません。
52+
53+
### Pin の選択状態をプログラムから設定/取得(v1.0.0より)
54+
55+
``Map.SelectedPin`` に表示済みの ``Pin`` を設定すると、そのピンを選択状態とし、情報ウィンドウ(InfoWindow)を表示します。
56+
``Map.SelectedPin````null`` を設定すると、選択状態を解除し、情報ウィンドウ(InfoWindow)を閉じます。
57+
58+
詳しくは、サンプルプログラム − [XFGoogleMapSample](https://github.com/amay077/Xamarin.Forms.GoogleMaps/tree/master/XFGoogleMapSample)[``PinsPage.xaml.cs``](https://github.com/amay077/Xamarin.Forms.GoogleMaps/blob/v1.1.0/XFGoogleMapSample/XFGoogleMapSample/PinsPage.xaml.cs) を参考にしてください。
59+
60+
## 変更された機能
61+
62+
### ``Map.MoveToRegion`` の引数に ``bool animate`` を追加(v1.1.0より)(Android / iOS / UWP 対応)
63+
64+
``animate````true`` に設定すると、移動時にアニメーションします。 ``false`` を設定するとアニメーションせずに即座に移動します。この引数は省略可能であり、省略時は ``true`` になります。
65+
66+
## 削除された機能
67+
68+
* なし(v1.1.0 現在)

‎README-ja.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ Xamarin公式の地図ライブラリ [Xamarin.Forms.Maps](https://developer.xam
1919

2020
異なる地図SDKで実現可能な最小限の機能しか持たない Xamarin.Forms.Maps に対して、 **同じ Google Maps で多くの共通機能を実現できるのが Xamarin.Forms.GoogleMaps です。**
2121

22+
### Xamarin.Forms.Maps との比較
23+
24+
[Xamarin.Forms.Maps との比較](COMPARISON_WITH_FORMSMAPS-ja.md) を見て下さい。
25+
2226
### セットアップ
2327

2428
* Available on NuGet: https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/ [![NuGet](https://img.shields.io/nuget/v/Xam.Plugin.Geolocator.svg?label=NuGet)](https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/)
@@ -77,9 +81,9 @@ public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsAppli
7781
機能要望は、 [@amay077](https://twitter.com/amay077) または、ISSUE やプルリクください!
7882
追加機能案は以下の通りです。
7983

80-
* Pin の InfoWindow の Visible プロパティ
84+
* ~~Pin の InfoWindow の Visible プロパティ~~
8185
* Pin のタップ&ホールドによる移動
82-
* Polygon, Polyline, Circle の描画サポート
86+
* ~~Polygon, Polyline, Circle の描画サポート~~
8387
* etc..
8488

8589
Windows 10 UWP 対応は「とりあえず」残しました。

‎screenshot02.png

396 KB
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.