Skip to content

Commit 9daa2f7

Browse files
committed
initial commit
1 parent 00828c1 commit 9daa2f7

38 files changed

+5867
-1
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ gen/
1414

1515
# Local configuration file (sdk path, etc)
1616
local.properties
17+
18+
# maps
19+
res/layout/maps.xml

AndroidManifest.xml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="io.cordova"
4+
android:versionCode="1"
5+
android:versionName="1.0" >
6+
7+
<uses-sdk
8+
android:minSdkVersion="8"
9+
android:targetSdkVersion="10" />
10+
11+
<uses-permission android:name="android.permission.VIBRATE" />
12+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
13+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
14+
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
15+
<uses-permission android:name="android.permission.INTERNET" />
16+
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
17+
<uses-permission android:name="android.permission.RECEIVE_SMS" />
18+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
19+
<uses-permission android:name="android.permission.RECORD_VIDEO" />
20+
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
21+
<uses-permission android:name="android.permission.READ_CONTACTS" />
22+
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
23+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
24+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
25+
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
26+
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
27+
28+
<application
29+
android:icon="@drawable/ic_launcher"
30+
android:label="@string/app_name" >
31+
32+
<uses-library android:name="com.google.android.maps" />
33+
<activity
34+
android:name="io.cordova.CordovaActivity"
35+
android:label="@string/app_name" >
36+
<intent-filter>
37+
<action android:name="android.intent.action.MAIN" />
38+
39+
<category android:name="android.intent.category.LAUNCHER" />
40+
</intent-filter>
41+
</activity>
42+
<activity
43+
android:name="com.phonegap.plugin.GMActivity"
44+
android:configChanges="orientation"
45+
android:label="@string/app_name"
46+
android:theme="@android:style/Theme.NoTitleBar" >
47+
</activity>
48+
</application>
49+
50+
</manifest>

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
MapsPluginExample
22
=================
33

4-
Maps plugin example for Cordova/Android
4+
Maps plugin example for Cordova/Android
5+
6+
Setup
7+
-----
8+
9+
* Update your project to a Google API's SDK target with _android update project_
10+
* Get a Google Maps [API key](https://developers.google.com/maps/documentation/android/mapkey) and set it in res/layout/map.xml (use the example file).
11+
* Build&Run!

ant.properties

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file is used to override default values used by the Ant build system.
2+
#
3+
# This file must be checked in Version Control Systems, as it is
4+
# integral to the build system of your project.
5+
6+
# This file is only used by the Ant script.
7+
8+
# You can use this to override default values such as
9+
# 'source.dir' for the location of your java source folder and
10+
# 'out.dir' for the location of your output folder.
11+
12+
# You can also use it define how the release builds are signed by declaring
13+
# the following properties:
14+
# 'key.store' for the location of your keystore and
15+
# 'key.alias' for the name of the key to use.
16+
# The password will be asked during the build when you use the 'release' target.
17+

assets/www/GMPlugin.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var GMPlugin = {
2+
startGM: function(success, fail, params) {
3+
if(success !== "function" || error !== "function") {
4+
console.log("Please provide success & failure callbacks");
5+
}
6+
// you can imagine passing some data here in params like
7+
// {label: 'label', latitude: "46.62754", longitude: '-123.34535'}
8+
// and show them on the map
9+
// right now it just shows the wikipedia point of interests near the current location
10+
// this can be tweaked in the plugin
11+
Cordova.exec(success, fail, "GMPlugin", "startGM", [params]);
12+
},
13+
14+
};

0 commit comments

Comments
 (0)