forked from jmpas/phonegap-googlemaps-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.xml
More file actions
244 lines (210 loc) · 14.1 KB
/
Copy pathplugin.xml
File metadata and controls
244 lines (210 loc) · 14.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<?xml version='1.0' encoding='utf-8'?>
<plugin id="fz-google-maps-plugin" version="1.2.5" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>fz-google-maps-plugin</name>
<js-module name="phonegap-googlemaps-plugin" src="www/googlemaps-cdv-plugin.js">
<clobbers target="fz-google-maps-plugin" />
</js-module>
<description>Google Maps native SDK for Android and iOS</description>
<repo>https://github.com/wf9a5m75/phonegap-googlemaps-plugin/</repo>
<issue>https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues</issue>
<license>Apache 2.0</license>
<keywords>google,maps,geo</keywords>
<engines>
<engine name="cordova" version=">=3.5.0" />
</engines>
<!-- Cableo el URL xq no existe más este plugin en el registry. OJO que en versiones más modernas lo sacaron directamente -->
<!-- VER https://github.com/mapsplugin/cordova-plugin-googlemaps/commit/5a3ca39baaf6eef48bcf0c48c2eb3936617b6f0d -->
<dependency id="plugin.http.request" url="https://github.com/wf9a5m75/phonegap-http-request" />
<!-- android -->
<platform name="android">
<preference name="API_KEY_FOR_ANDROID" />
<info>
In order to run this plugin, you need to obtain Google Maps API key for Android.
Visit to https://github.com/wf9a5m75/phonegap-googlemaps-plugin/wiki/Installation
Please confirm that this version is updated at
https://github.com/wf9a5m75/phonegap-googlemaps-plugin/wiki/Release-Notes
</info>
<config-file target="res/xml/config.xml" parent="/*">
<feature name="GoogleMaps">
<param name="android-package" value="plugin.google.maps.GoogleMaps" />
</feature>
<feature name="External">
<param name="android-package" value="plugin.google.maps.External" />
</feature>
<feature name="Geocoder">
<param name="android-package" value="plugin.google.maps.MyGeocoder" />
</feature>
</config-file>
<!--
Estaba comentado se rompe en cordova android 5 ( SDK 23 ). Si se carga así da un error como:
$ cordova plugin add https://github.com/snoopconsulting/phonegap-googlemaps-plugin.git plin plin plin
Fetching plugin "https://github.com/snoopconsulting/phonegap-googlemaps-plugin.git" via git clone
Repository "https://github.com/snoopconsulting/phonegap-googlemaps-plugin.git" checked out to git ref "master".
Installing "fz-google-maps-plugin" for android
Dependent plugin "plugin.http.request" already installed on android.
Notice: com.google.playservices has been automatically converted to cordova-plugin-googleplayservices and fetched from npm. This is due to our old plugins registry shutting down.
Fetching plugin "https://github.com/wf9a5m75/google-play-services" via git clone
Repository "https://github.com/wf9a5m75/google-play-services" checked out to git ref "v23".
Failed to install 'fz-google-maps-plugin':Error: Expected plugin to have ID "cordova-plugin-googleplayservices" but got "com.google.playservices".
at checkID (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:181:15)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:166:9
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-common/node_modules/q/q.js:796:13)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-common/node_modules/q/q.js:604:44
at runSingle (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-common/node_modules/q/q.js:137:13)
at flush (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-common/node_modules/q/q.js:125:13)
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)
Error: Expected plugin to have ID "cordova-plugin-googleplayservices" but got "com.google.playservices".
La dependency esta es un fork de https://github.com/MobileChromeApps/google-play-services
este dice que en realidad tengo que usar el tag framework.
<dependency id="com.google.playservices" url="https://github.com/wf9a5m75/google-play-services#v23" />
OJO OJO
que tira
Error: Expected plugin to have ID "cordova-plugin-googleplayservices" but got "com.google.playservices".
el id es este "nuevo"
Esto lo necesitamos cuando usamos cordova android 5+ ( sdk 23 ), para el 4.1.1 ( sdk 22 ) va bien con el dependency de arriba
Así que cuando migramos a cordova android 5, revisar lo que cambió upstream del plugin y seguro hay que poner estas deps como framework
<framework src="com.google.android.gms:play-services:5+" />
o
<framework src="com.google.android.gms:play-services-maps:8.3.0" />
<framework src="com.google.android.gms:play-services-location:8.3.0" />
-->
<dependency id="cordova-plugin-googleplayservices" url="https://github.com/snoopconsulting/google-play-services#v23" />
<!-- plugin src files -->
<source-file src="src/android/plugin/google/maps/AsyncLicenseInfo.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/AsyncKmlParser.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/AsyncLoadImage.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/AsyncLoadImageInterface.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/GoogleMaps.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/MyPlugin.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/MyPluginLayout.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/MyPluginInterface.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/PluginCircle.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/External.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/MyGeocoder.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/PluginGroundOverlay.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/PluginKmlOverlay.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/PluginMap.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/PluginMarker.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/PluginPolygon.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/PluginPolyline.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/PluginTileOverlay.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/PluginTileProvider.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/PluginUtil.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/PluginAsyncInterface.java" target-dir="src/plugin/google/maps" />
<source-file src="src/android/plugin/google/maps/GeoJSONTileProvider.java" target-dir="src/plugin/google/maps" />
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="$API_KEY_FOR_ANDROID" />
<!-- Google Play Services SDK -->
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- The following two permissions are not required to use
Google Maps Android API v2, but are recommended. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!-- OpenGL ES version 2 -->
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
</config-file>
<framework src="build-extras.gradle" custom="true" type="gradleReference" />
</platform>
<!-- ios -->
<platform name="ios">
<preference name="API_KEY_FOR_IOS" />
<info>
In order to run this plugin, you need to obtain Google Maps API key for iOS.
Visit to https://github.com/wf9a5m75/phonegap-googlemaps-plugin/wiki/Installation
Please confirm that this version is updated at
https://github.com/wf9a5m75/phonegap-googlemaps-plugin/wiki/Release-Notes
</info>
<config-file target="config.xml" parent="/*">
<feature name="GoogleMaps">
<param name="ios-package" value="GoogleMaps" />
</feature>
<feature name="External">
<param name="ios-package" value="External" />
</feature>
<feature name="Geocoder">
<param name="ios-package" value="Geocoder" />
</feature>
</config-file>
<header-file src="src/ios/GoogleMaps/Circle.h" />
<source-file src="src/ios/GoogleMaps/Circle.m" />
<header-file src="src/ios/GoogleMaps/External.h" />
<source-file src="src/ios/GoogleMaps/External.m" />
<header-file src="src/ios/GoogleMaps/Geocoder.h" />
<source-file src="src/ios/GoogleMaps/Geocoder.m" />
<header-file src="src/ios/GoogleMaps/GoogleMaps.h" />
<source-file src="src/ios/GoogleMaps/GoogleMaps.m" />
<header-file src="src/ios/GoogleMaps/GoogleMapsViewController.h" />
<source-file src="src/ios/GoogleMaps/GoogleMapsViewController.m" />
<header-file src="src/ios/GoogleMaps/GroundOverlay.h" />
<source-file src="src/ios/GoogleMaps/GroundOverlay.m" />
<header-file src="src/ios/GoogleMaps/KmlOverlay.h" />
<source-file src="src/ios/GoogleMaps/KmlOverlay.m" />
<header-file src="src/ios/GoogleMaps/Map.h" />
<source-file src="src/ios/GoogleMaps/Map.m" />
<header-file src="src/ios/GoogleMaps/Marker.h" />
<source-file src="src/ios/GoogleMaps/Marker.m" />
<header-file src="src/ios/GoogleMaps/MyPlgunProtocol.h" />
<header-file src="src/ios/GoogleMaps/PluginUtil.h" />
<source-file src="src/ios/GoogleMaps/PluginUtil.m" />
<header-file src="src/ios/GoogleMaps/Polygon.h" />
<source-file src="src/ios/GoogleMaps/Polygon.m" />
<header-file src="src/ios/GoogleMaps/Polyline.h" />
<source-file src="src/ios/GoogleMaps/Polyline.m" />
<header-file src="src/ios/GoogleMaps/TBXML.h" />
<source-file src="src/ios/GoogleMaps/TBXML.m" />
<header-file src="src/ios/GoogleMaps/TileOverlay.h" />
<source-file src="src/ios/GoogleMaps/TileOverlay.m" />
<header-file src="src/ios/GoogleMaps/NSData-Base64/NSData+Base64.h" />
<header-file src="src/ios/GoogleMaps/NSData-Base64/NSData+Base64.podspec" />
<source-file src="src/ios/GoogleMaps/NSData-Base64/NSData+Base64.m" />
<header-file src="src/ios/GoogleMaps/MyPluginLayer.h" />
<source-file src="src/ios/GoogleMaps/MyPluginLayer.m" />
<header-file src="src/ios/GoogleMaps/MyReachability.h" />
<source-file src="src/ios/GoogleMaps/MyReachability.m" />
<header-file src="src/ios/GoogleMaps/MyPluginLayerDebugView.h" />
<source-file src="src/ios/GoogleMaps/MyPluginLayerDebugView.m" />
<header-file src="src/ios/GoogleMaps/MyPluginScrollView.h" />
<source-file src="src/ios/GoogleMaps/MyPluginScrollView.m" />
<source-file src="src/ios/GoogleMaps/GeoJSONTileProvider.m" />
<header-file src="src/ios/GoogleMaps/GeoJSONTileProvider.h" />
<config-file target="*-Info.plist" parent="Google Maps API Key">
<string>$API_KEY_FOR_IOS</string>
</config-file>
<config-file target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
<string>Show your location on the map</string>
</config-file>
<config-file target="*-Info.plist" parent="NSLocationAlwaysUsageDescription">
<string>Trace your location on the map</string>
</config-file>
<config-file target="*-Info.plist" parent="NSLocationAlwaysUsageDescription">
<string>Trace your location on the map</string>
</config-file>
<config-file target="*-Info.plist" parent="CFBundleURLTypes">
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>$PACKAGE_NAME</string>
<key>CFBundleURLSchemes</key>
<array>
<string>$PACKAGE_NAME</string>
</array>
</dict>
</array>
</config-file>
<dependency id="com.googlemaps.ios" url="https://github.com/wf9a5m75/googlemaps-ios-sdk-for-phonegap" commit="master" />
</platform>
</plugin>