Skip to content
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
354 commits
Select commit Hold shift + click to select a range
1c906e2
Added toString method
juliawong Dec 31, 2014
e8d3730
Removed old GeoJson utility library
juliawong Dec 31, 2014
fa49934
Updated demo for new GeoJson utility
juliawong Dec 31, 2014
82f120d
Added toString methods
juliawong Dec 31, 2014
024a477
:tada: Support for GeometryCollection. Now parses Geometry, Feature a…
juliawong Dec 31, 2014
b498f08
Implemented multigeometry
lchans Dec 31, 2014
a5f1d71
Implemented multigeometry
lchans Dec 31, 2014
6b7c6d9
:earth_asia: Added more demo classes. Fixed markers in Spain file. Up…
juliawong Dec 31, 2014
c291f46
Implemented iterators for Collection and Feature classes
juliawong Jan 1, 2015
86be7c5
Removed old tests. Added skeleton for new tests.
juliawong Jan 1, 2015
c5f9143
Added the assigning of default styles in the GeoJsonParser
juliawong Jan 2, 2015
2aa59de
Refactored Style classes and added Javadoc
juliawong Jan 2, 2015
ca3f980
Added Javadoc summary to all files in GeoJsonLayer
juliawong Jan 2, 2015
681e643
Added constructors to initialise the Options objects
juliawong Jan 2, 2015
c5b7a1f
Added exceptions
juliawong Jan 2, 2015
71bcf9b
Added testing for types and coordinates
juliawong Jan 2, 2015
888e313
Added JavaDoc for existing classes
lchans Jan 5, 2015
2f4a4cb
Implemented ability to add GeoJSON features and geometries onto the map
juliawong Jan 5, 2015
1c4f0c9
Added testing of ID
juliawong Jan 5, 2015
1bd6191
Updating comments
lchans Jan 5, 2015
529b223
Added new KML file with markers
juliawong Jan 5, 2015
1b8fc50
Renamed demo file
juliawong Jan 5, 2015
c239186
Performed minor refactoring on KML files. Allowed Style class to crea…
juliawong Jan 5, 2015
aa17643
Minor modifications to demo layouts. New demo file added.
juliawong Jan 6, 2015
45bab0f
Refactored code. Started implementation of IconStyle
juliawong Jan 6, 2015
8e0546a
GeoJson adds GeometryCollections to the map, also modified some API f…
lchans Jan 6, 2015
ad98f6f
Implemented IconStyle. Updated demo.
juliawong Jan 7, 2015
eb09a5b
Added a MultiGeometry class. Reallowed for adding to map.
juliawong Jan 7, 2015
dd24732
Objects are redrawn when styles are set
lchans Jan 8, 2015
83efafc
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans Jan 8, 2015
4f4e286
Renamed files to be prefixed with Kml. Added more support for recursi…
juliawong Jan 8, 2015
8c5201e
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Jan 8, 2015
e62c468
Added more kml files for demos
juliawong Jan 8, 2015
264198e
:cookie: Points, LineStrings and Polygons are successfully being draw…
juliawong Jan 8, 2015
f41699b
Geometry collections can be added and removed from the map - Nested g…
lchans Jan 8, 2015
1172068
:cow2: MultiGeometry adding to the map
juliawong Jan 8, 2015
3de0e63
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Jan 8, 2015
20bd9d7
Added test skeleton files
juliawong Jan 9, 2015
9d33d56
Added tests for features
lchans Jan 9, 2015
021b267
Added support for the normal style tag in StyleMap
juliawong Jan 9, 2015
cc8853e
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Jan 9, 2015
b27b7fe
Added public methods remove, set z index and get placemarks
juliawong Jan 9, 2015
f0df9d1
Fixed minor syntax error and removed old code
juliawong Jan 9, 2015
465afde
Added additional tests for GeoJsonParser
lchans Jan 12, 2015
d0609c2
Modified KmlLayer to download icons once and add to many markers
juliawong Jan 12, 2015
e1e5ac4
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Jan 12, 2015
2454853
Minor refactor of KmlLayer to utilise LruCache
juliawong Jan 12, 2015
294af51
Refactored code to not store Marker objects twice, uses LruCache more…
juliawong Jan 12, 2015
c554c8b
Reformatted code, added TODO
juliawong Jan 12, 2015
a3bfd6a
Added exceptions for null coordinates. Renamed KmlGeometry method
juliawong Jan 12, 2015
05502be
Added tests for getType
juliawong Jan 12, 2015
61b7c0e
Updated demo files and grade files
juliawong Jan 12, 2015
ed2700f
Added comments
lchans Jan 12, 2015
7465a8d
Changed GeoJsonGeometry to an interface
juliawong Jan 12, 2015
06eeae7
Minor syntax correction
juliawong Jan 12, 2015
e58442a
Seperated KMLParser into KMLStyleParser and KMLPlacemarkParser
lchans Jan 12, 2015
afe1843
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Jan 12, 2015
ec5b764
Refactored code, ran reformatter and added some JavaDoc
juliawong Jan 12, 2015
47a2aaf
Renamed tests
juliawong Jan 12, 2015
77563f4
Added support for bbox in FeatureCollection
juliawong Jan 13, 2015
eb913a8
Implemented addFeature, removeFeature methods
juliawong Jan 13, 2015
a44f601
Refactored rendering of GeometryCollection
juliawong Jan 13, 2015
e6328bc
Implemented Folders, however need to also create a Document class so …
lchans Jan 14, 2015
8878a74
:balloon: Added and redid Javadoc. Minor refactor of code.
juliawong Jan 14, 2015
9b5896e
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Jan 14, 2015
5bcc1d3
Modified methods to add and remove data to allow developers to call a…
juliawong Jan 14, 2015
8abab35
Prevented feature redrawing if different type style was set
juliawong Jan 14, 2015
b420ec9
Features are redrawn when styles are updated
juliawong Jan 15, 2015
6d65e06
Can handle nested folders and overriding styles in KML
lchans Jan 15, 2015
ad48265
Added tests for style classes
juliawong Jan 15, 2015
63751cc
Minor clean ups
juliawong Jan 15, 2015
0bb7de2
Can fetch a url for a marker in folders
lchans Jan 16, 2015
06e1198
Caught exceptions and logging when GeoJSON could not be parsed.
juliawong Jan 16, 2015
0169eec
Reformatting tests and minor clean ups
juliawong Jan 16, 2015
d539b74
Implemented API methods for Folders
lchans Jan 16, 2015
16b9021
Added more tests for null coordinates
juliawong Jan 16, 2015
0107258
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Jan 16, 2015
6da5a38
Implement public API methods for KMLLayer
lchans Jan 16, 2015
254ca40
KmlGeometry is now typed
juliawong Jan 18, 2015
cec65f8
Added comments to code
lchans Jan 18, 2015
f3fafa3
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans Jan 18, 2015
8c35de6
BoundingBox stored as a LatLngBounds object
juliawong Jan 19, 2015
c91a39c
Renamed package to geojson
juliawong Jan 19, 2015
97fef89
Made Documents a KmlContainer (Can now have nested Documents, however…
lchans Jan 19, 2015
6d65b96
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans Jan 19, 2015
933a031
Refactor to store map objects in GeoJsonRenderer and make methods sta…
juliawong Jan 19, 2015
1c2490c
Made geometry arrays and coordinates final
juliawong Jan 19, 2015
4e9b038
Added constants for geometries
juliawong Jan 19, 2015
d9dd85e
Minor refactor of GeoJsonRenderer
juliawong Jan 19, 2015
0beb8fb
Renamed the GeoJsonMultiLineStringTest and added tests/
juliawong Jan 19, 2015
44f0b6a
Renamed GeoJsonMultiPolygonTest and added tests
juliawong Jan 19, 2015
058f49f
Started on implementation for GroundOverlay
lchans Jan 20, 2015
5b7b049
Merge conflict
lchans Jan 20, 2015
d7e7933
GeoJsonParser and GeoJsonRenderer are now package protected. Ran refo…
juliawong Jan 20, 2015
a58e528
Fixed tests failing due to IBitmapDescriptorFactory
juliawong Jan 20, 2015
90f456d
Cleaned up comments
lchans Jan 20, 2015
479fae4
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans Jan 20, 2015
7a6438f
Added more GeoJsonFeature tests
juliawong Jan 20, 2015
91d6fce
Removed TODO
juliawong Jan 20, 2015
a9c3d1b
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Jan 20, 2015
624efa7
Modified exception throwing in the parser. Added tests.
juliawong Jan 20, 2015
7be2a93
getFeatures returns an Iterable
juliawong Jan 20, 2015
4273c58
Reformat and minor refactor of code. Changed all iterators to iterabl…
juliawong Jan 21, 2015
045a09e
Fixed error preventing inner containers from being created.
juliawong Jan 21, 2015
1f01fd7
Implemented parsing of extended data in features
juliawong Jan 21, 2015
8d76802
Implemented parsing of extended data in containers
juliawong Jan 21, 2015
8557c02
Implemented parsing and adding GroundOverlay onto the map
juliawong Jan 23, 2015
a4a6df2
Added toString methods
juliawong Jan 23, 2015
e2d3d87
Throws an error if the image could not be retrieved
lchans Jan 26, 2015
02222a7
Throwing error if no text found in BalloonStyle
lchans Jan 26, 2015
9a564d1
Added Polygon tests, fixed error where not existent inner boundaries …
lchans Jan 27, 2015
1b91a53
Added tests for KML geometry objects and basic KML style functions
lchans Jan 27, 2015
3bfb5da
Added more tests for styles
lchans Jan 27, 2015
cb2dd27
Added tests for container parser, changed visibility of containers to…
lchans Jan 27, 2015
278c2d3
Support for inline styles in placemarks
juliawong Jan 27, 2015
486ccee
Updated demo files
juliawong Jan 27, 2015
fe716d6
Removed KmlContainerInterface and updated references to it
juliawong Jan 27, 2015
2facf23
Added tests for KmlContainerParser, focusing mainly on nested containers
lchans Jan 27, 2015
29850b8
Inline styles stored for containers. Separated from shared styles.
juliawong Jan 27, 2015
2135e3f
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Jan 27, 2015
4445420
One LruCache being used for marker icons and ground overlays
juliawong Jan 27, 2015
529de63
Added additional tests for nested folders
lchans Jan 27, 2015
b50c743
Removed inline styles for containers, not supported in KML
juliawong Jan 27, 2015
c9f293a
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Jan 27, 2015
8d6142f
Added seperate method for creating a latlngbound for better readability
lchans Jan 27, 2015
d1cc4df
Changed FeatureParser from if to else if statements
lchans Jan 27, 2015
c5da7be
Added testing for feature, now fetches test files from a raw resource…
lchans Jan 27, 2015
dfb8b3c
Refactored part of KmlLayer into KmlRenderer
juliawong Jan 27, 2015
6bae8b8
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Jan 27, 2015
62bfa59
Added tests for multigeometry and added a hasProperties method
lchans Jan 28, 2015
747f165
Fixed up a few javadoc commments and also deleted code so that it is …
lchans Jan 28, 2015
d123cf7
Added tests for multiple features in a container
lchans Jan 28, 2015
e1ae3fa
Implemented inline styles
juliawong Jan 28, 2015
8ee262d
Added extended data test
lchans Jan 28, 2015
492c2ae
Color mode working for markers
lchans Jan 28, 2015
1e085cf
Seperated methods, now has inlinestyle methods
lchans Jan 28, 2015
23933d2
Refractored variable names
lchans Jan 28, 2015
67f84a0
Added style map tests
lchans Jan 29, 2015
4fbce85
Support for inline icon URLs and scale
juliawong Jan 29, 2015
536b868
Refractored variable names
lchans Jan 29, 2015
6760590
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans Jan 29, 2015
e664ca2
Added more ground overlay tests
lchans Jan 29, 2015
fe3c5d5
Added testing for cdata entities
lchans Jan 29, 2015
08510fd
Changed to nextToken
lchans Jan 29, 2015
1d54a89
Changed implemented of createGroundOverlay to be seperate create and …
lchans Jan 29, 2015
1158331
Ground Overlay stores color
lchans Jan 29, 2015
09d300f
Removal of GroundOverlays, parse objects once, download images once
juliawong Jan 29, 2015
e56c9ce
Added more javadoc
lchans Jan 29, 2015
0e83a3a
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans Jan 29, 2015
fb20a66
Point displays an info window even if balloonstyle is not set (it dis…
lchans Jan 30, 2015
0052fce
Closed the stream
juliawong Jan 30, 2015
fffb80d
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Jan 30, 2015
ea8ccbc
Using additional hashmap to assign styles
juliawong Jan 30, 2015
2d797bb
Changed javadoc comments
lchans Jan 30, 2015
5cb9103
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans Jan 30, 2015
96729b0
Minor modification to allow for style maps to be updated only when re…
juliawong Jan 30, 2015
9e4e915
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Jan 30, 2015
5c4c618
Reformat parser
juliawong Jan 30, 2015
59e69be
Add images to the cache regardless of layer visibility
juliawong Jan 30, 2015
158ad5b
Updated Javadoc for KmlLayer
juliawong Jan 30, 2015
64171d3
Added more JavaDoc
lchans Jan 30, 2015
6a0e7b8
Small change from getFolders to getContainers
lchans Feb 1, 2015
d92649a
New KML file with incorrect balloons
juliawong Feb 2, 2015
ba42830
Fixed bug where info windows had the same text
lchans Feb 2, 2015
ebcbc74
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans Feb 2, 2015
f157c3f
Removed unnecessary javadoc comments, also refractored START_TAG
lchans Feb 2, 2015
e9ee72a
Cleaned up minor errors
lchans Feb 2, 2015
2cbd6a5
Added more tests for invalid features
juliawong Feb 2, 2015
5bc9c40
Added skeleton for renderer
juliawong Feb 2, 2015
2dcbc90
Parser classes take in the parser through the method not the construc…
lchans Feb 2, 2015
b2604cb
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Feb 2, 2015
8ae1483
Added tests for valid features, minor clean up
juliawong Feb 2, 2015
5278496
Changed constructors of KmlContainer to take all properties, eliminat…
lchans Feb 2, 2015
3781da1
Changed featureparser methods to static
lchans Feb 2, 2015
02287e0
Removed constructor in KmlFeatureParser, now has all static methods
lchans Feb 2, 2015
b6e8167
Minor editng of primative types
lchans Feb 2, 2015
4b3a82b
Features can be accessed when not added to the map
juliawong Feb 2, 2015
0039f97
Minor refactor
juliawong Feb 2, 2015
d93103f
Add tests for the layer
juliawong Feb 2, 2015
dd7f050
createGroundOverlay is now static, removed set methods for KmlGroundO…
juliawong Feb 2, 2015
8f81f53
Started implementing static methods for style
juliawong Feb 2, 2015
581273e
Fixed calling of static method
juliawong Feb 2, 2015
5094e8a
Added a demo for GeoJson
lchans Feb 2, 2015
4ad6f51
Added a demo for GeoJson
lchans Feb 2, 2015
a3ce6ca
Added a GeoJson demo
lchans Feb 2, 2015
718f849
Parsing methods are now static, minor refactor of code.
juliawong Feb 2, 2015
00c844e
Updated test
juliawong Feb 2, 2015
9a2aeb2
Features are now read from the renderer when adding and removing
juliawong Feb 3, 2015
bce41d9
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans Feb 3, 2015
0c154b7
Added get, set, has and remove methods for the properties
juliawong Feb 3, 2015
ab819b8
Made Style interface local
juliawong Feb 3, 2015
faa3c25
More descriptive addDataToLayer Javadoc
juliawong Feb 3, 2015
df6fa24
Rotation working for GroundOverlay
lchans Feb 3, 2015
624ef01
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans Feb 3, 2015
f9396cd
Created a shorter way of implementing GroundOverlay - Values now stor…
lchans Feb 3, 2015
ac773ef
Modified tests to use new property methods. Added an iterable to get all
juliawong Feb 3, 2015
4a87434
Added javadoc for groundoverlay, also changed methods from public to …
lchans Feb 3, 2015
3b564f1
Always remove previous map objects before adding new ones
juliawong Feb 3, 2015
6b8fd78
Reverted ground overlay methods to public, color stored in proprties …
juliawong Feb 3, 2015
967462a
Minor refactor of putting color in properties hashmap
juliawong Feb 3, 2015
7fea8cc
KML reads color in the reverse order, reversed the string storing the…
lchans Feb 3, 2015
40bf540
Cleaned up code in KmlRenderer
lchans Feb 3, 2015
50da4fd
Reverted renderer, added demo files and demo classes
juliawong Feb 3, 2015
1bdf284
Visibility not working
lchans Feb 4, 2015
a1023be
Fixed visibility, germany.kml was setting initial visibility to 0
lchans Feb 4, 2015
eedf8fe
:cow: Demo files
juliawong Feb 4, 2015
1c47eaf
Revert ":cow: Demo files"
juliawong Feb 4, 2015
d050f82
Redo Javadoc
juliawong Feb 4, 2015
7d63284
Fixed visibility of ground overlay - now inherits visibility of the c…
lchans Feb 4, 2015
2404538
Refractored code
lchans Feb 4, 2015
687ebf6
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Feb 4, 2015
070856d
Log error when URL cannot be found
juliawong Feb 4, 2015
6458f63
Cleaned up code when scaling bitmap
lchans Feb 4, 2015
185e1a9
Geometry classes accept List instead of ArrayList
juliawong Feb 5, 2015
1820b34
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Feb 5, 2015
fe5c31a
Implementations of GeoJsonGeometry inherit the javadoc
juliawong Feb 5, 2015
4123900
Updated Javadoc to reflect changes to a list
juliawong Feb 5, 2015
ce3a1d3
Renamed add and remove layer methods
juliawong Feb 5, 2015
0f6e274
Removed demo files that weren't needed and updated the manifest
juliawong Feb 5, 2015
bd64770
Changed type for coordintaes. Overcomes type erasure.
juliawong Feb 5, 2015
58a9cb6
Updated Javadoc, removed getFeatureById and updated demo
juliawong Feb 5, 2015
369ba87
Seperated getter styles into static methods
lchans Feb 5, 2015
37d635b
Seperated getter styles into static methods
lchans Feb 5, 2015
a5a48e6
Fixed JavaDoc for KMLStyle
lchans Feb 5, 2015
82eff66
Redid Javadoc and refactor. Modified behaviour of styles for the GeoJ…
juliawong Feb 6, 2015
a7413fb
Fixed up KML Javadoc
lchans Feb 6, 2015
0006b9c
Removed TODO
juliawong Feb 6, 2015
4ee566e
Throw IAE if default styles are set to null
juliawong Feb 6, 2015
897b1e6
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Feb 6, 2015
2c8505e
Added code example for the GeoJsonLayer
juliawong Feb 6, 2015
38d82de
Added units to the Javadoc for GeoJSON styles
juliawong Feb 6, 2015
f28de17
Added a demo for a KML file
lchans Feb 6, 2015
0caa16a
:tada: KML Download from URL WORKS!
juliawong Feb 6, 2015
9f0dbd4
Refactor method names - removal of words nested and Kml
juliawong Feb 8, 2015
8419eeb
Renamed method to add layer to addLayer()
juliawong Feb 8, 2015
d84b68c
Refactor to allow for null styles in GeoJsonFeature
juliawong Feb 9, 2015
33224ef
Changed property to store in Kml Feature
lchans Feb 9, 2015
0ccb0d5
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans Feb 9, 2015
3991d3c
Color supported in format of AABBGGRR and BBGGRR
lchans Feb 9, 2015
6a13bf4
Minor refactor of Javadoc
juliawong Feb 9, 2015
c262229
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Feb 9, 2015
c76f9f0
Update demos with refactored method names
juliawong Feb 9, 2015
64d73ea
Custom HTML for info windows
lchans Feb 9, 2015
c4a3efc
Custom HTML for info windows
lchans Feb 9, 2015
ff65230
Fixed bug where utility was creating info windows when it should not be
lchans Feb 9, 2015
4d10464
Improved the rotation method
juliawong Feb 10, 2015
e6e0c60
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong Feb 10, 2015
a90f1bc
Added proper demo
lchans Feb 11, 2015
4fd0902
Changed to generic type
lchans Feb 11, 2015
a322e93
Fixed errors in comments
lchans Feb 11, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
classpath 'com.android.tools.build:gradle:1.0.0'
}
}
6 changes: 4 additions & 2 deletions demo/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
android:versionName="1.0">

<uses-sdk
android:minSdkVersion="9"
android:minSdkVersion="17"
android:targetSdkVersion="19"/>

<permission
Expand Down Expand Up @@ -37,7 +37,7 @@

<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDCa5WRSMk3CrNSf3y5xbyQTvp1_zwuTtE"/>
android:value="AIzaSyDe3Ivf9_tRPzoxzSKIWxJxH6uCLB6H9ww"/>

<activity
android:name=".MainActivity"
Expand All @@ -57,6 +57,8 @@
<activity android:name=".TileProviderAndProjectionDemo"/>
<activity android:name=".HeatmapsDemoActivity"/>
<activity android:name=".HeatmapsPlacesDemoActivity"/>
<activity android:name=".KmlDemoActivity"/>
<activity android:name=".GeoJsonDemoActivity"/>

</application>

Expand Down
4 changes: 2 additions & 2 deletions demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
classpath 'com.android.tools.build:gradle:1.0.0'
}
}

Expand All @@ -19,7 +19,7 @@ dependencies {

android {
compileSdkVersion 19
buildToolsVersion "21.0.1"
buildToolsVersion "21.1.1"

sourceSets {
main {
Expand Down
18 changes: 18 additions & 0 deletions demo/res/layout/geojson_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:name="com.google.android.gms.maps.SupportMapFragment"
tools:layout="@layout/geojson_demo"/>


</LinearLayout>
24 changes: 1 addition & 23 deletions demo/res/layout/heatmaps_demo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,6 @@
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">

<Button
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="Radius"
android:onClick="changeRadius" />

<Button
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="Gradient"
android:onClick="changeGradient" />


<Button
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="Opacity"
android:onClick="changeOpacity" />

</LinearLayout>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't do this :)


<Spinner
Expand All @@ -51,4 +28,5 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center" />

</LinearLayout>
20 changes: 20 additions & 0 deletions demo/res/layout/kml_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_above="@id/textView"
android:layout_below="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent">

<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:name="com.google.android.gms.maps.SupportMapFragment"
tools:layout="@layout/kml_demo"/>


</LinearLayout>
36 changes: 36 additions & 0 deletions demo/res/raw/kml_demo.kml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>Polygon.kml</name>
<open>0</open>
<Placemark>
<name>hollow box</name>
<Polygon>
<extrude>1</extrude>
<altitudeMode>relativeToGround</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates>
-122.366278,37.818844,30
-122.365248,37.819267,30
-122.365640,37.819861,30
-122.366669,37.819429,30
-122.366278,37.818844,30
</coordinates>
</LinearRing>
</outerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
-122.366212,37.818977,30
-122.365424,37.819294,30
-122.365704,37.819731,30
-122.366488,37.819402,30
-122.366212,37.818977,30
</coordinates>
</LinearRing>
</innerBoundaryIs>
</Polygon>
</Placemark>
</Document>
</kml>
14 changes: 14 additions & 0 deletions demo/res/raw/point.kml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<kml>
<Style id="markerStyle">
<IconStyle>
<color>a1ff00ff</color>
</IconStyle>
</Style>

<Placemark>
<styleUrl>#markerStyle</styleUrl>
<Point>
<coordinates>-90.86948943473118,48.25450093195546</coordinates>
</Point>
</Placemark>
</kml>
3 changes: 3 additions & 0 deletions demo/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<string name="attrib_format">Data from &lt;a href = "%s">data.gov.au&lt;/a>, modified under &lt;a href = \"http://creativecommons.org/licenses/by/3.0/au/\">CC BY 3.0 AU&lt;/a></string>
<string name="police_stations_url">http://data.gov.au/dataset/police-station-locations/resource/76110b24-0f0a-4c29-9583-3f99eaba486c</string>
<string name="medicare_url">http://data.gov.au/dataset/location-of-medicare-offices/resource/5d38e1be-4011-49c4-8b8b-75405eeb1088</string>
<string name="remove">Remove</string>
<string name="add">Add</string>
<string name="visibility">Toggle Vis</string>
<string-array name="heatmaps_datasets_array">
<item>@string/police_stations</item>
<item>@string/medicare</item>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
package com.google.maps.android.utils.demo;

import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;
import com.google.maps.android.geojson.GeoJsonFeature;
import com.google.maps.android.geojson.GeoJsonLayer;
import com.google.maps.android.geojson.GeoJsonPoint;
import com.google.maps.android.geojson.GeoJsonPointStyle;

import org.json.JSONObject;

/**
* Created by juliawong on 12/1/14.
*/
public class GeoJsonDemoActivity extends BaseDemoActivity {

protected int getLayoutId() {
return R.layout.geojson_demo;
}

@Override
protected void startDemo() {
try {
JSONObject geoJson = new JSONObject(
"{ \"type\": \"FeatureCollection\",\n"
+ "\"bbox\": [-150.0, -80.0, 150.0, 80.0],"
+ " \"features\": [\n"
+ " { \"type\": \"Feature\",\n"
+ " \"id\": \"point\", \n"
+ " \"geometry\": {\"type\": \"Point\", \"coordinates\": [102.0, 0.5]},\n"
+ " \"properties\": {\"prop0\": \"value0\"}\n"
+ " },\n"
+ " { \"type\": \"Feature\",\n"
+ " \"geometry\": {\n"
+ " \"type\": \"LineString\",\n"
+ " \"coordinates\": [\n"
+ " [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]\n"
+ " ]\n"
+ " },\n"
+ " \"properties\": {\n"
+ " \"prop0\": \"value0\",\n"
+ " \"prop1\": 0.0\n"
+ " }\n"
+ " },\n"
+ " { \"type\": \"Feature\",\n"
+ " \"geometry\": {\n"
+ " \"type\": \"Polygon\",\n"
+ " \"coordinates\": [\n"
+ " [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],\n"
+ " [100.0, 1.0], [100.0, 0.0] ]\n"
+ " ]\n"
+ " },\n"
+ " \"properties\": {\n"
+ " \"prop0\": \"value0\",\n"
+ " \"prop1\": {\"this\": \"that\"}\n"
+ " }\n"
+ " }\n"
+ " ]\n"
+ " }"
);
GeoJsonLayer layer = new GeoJsonLayer(getMap(), geoJson);
layer.addLayer();
GeoJsonPointStyle pointStyle = new GeoJsonPointStyle();
pointStyle.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_MAGENTA));
layer.setDefaultPointStyle(pointStyle);
layer.addFeature(
new GeoJsonFeature(new GeoJsonPoint(new LatLng(0, 0)), null, null, null));
layer.addFeature(
new GeoJsonFeature(new GeoJsonPoint(new LatLng(10, 10)), null, null, null));
layer.clearLayer();
pointStyle = new GeoJsonPointStyle();
pointStyle.setTitle("BANANANA!");
layer.setDefaultPointStyle(pointStyle);
layer.addLayer();
} catch (Exception e) {
e.printStackTrace();
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class HeatmapsPlacesDemoActivity extends BaseDemoActivity {
/**
* Places API server key.
*/
private static final String API_KEY = "YOUR_KEY_HERE"; // TODO place your own here!
private static final String API_KEY = "AIzaSyDe3Ivf9_tRPzoxzSKIWxJxH6uCLB6H9ww"; // TODO place your own here!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert this. It really should live in a resource file but that's not in scope for your changes.


/**
* The colors to be used for the different heatmap layers.
Expand Down
92 changes: 92 additions & 0 deletions demo/src/com/google/maps/android/utils/demo/KmlDemoActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
package com.google.maps.android.utils.demo;

import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.maps.android.kml.KmlContainer;
import com.google.maps.android.kml.KmlLayer;
import com.google.maps.android.kml.KmlPlacemark;
import com.google.maps.android.kml.KmlPolygon;

import org.xmlpull.v1.XmlPullParserException;

import android.graphics.Typeface;
import android.os.AsyncTask;
import android.text.Html;
import android.text.method.ScrollingMovementMethod;
import android.util.Log;
import android.widget.TextView;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;

public class KmlDemoActivity extends BaseDemoActivity {
GoogleMap mMap;

protected int getLayoutId() {
return R.layout.kml_demo;
}

public void startDemo () {
try {
Log.i("Demo", "Start");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these logs useful for anything? They look like leftover debug statements. If they're useful, make the messages more descriptive, if they're not, remove them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, they're leftover debug statements - Removed them

KmlLayer kmlLayer = new KmlLayer(getMap(), R.raw.point, getApplicationContext());
kmlLayer.addLayer();
KmlContainer container = kmlLayer.getContainers().iterator().next();
KmlPlacemark placemark = container.getPlacemarks().iterator().next();
KmlPolygon polygon = (KmlPolygon) placemark.getGeometry();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spacing is off here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

polygon.getOuterBoundaryCoordinates().get(0);
getMap().moveCamera(CameraUpdateFactory.newLatLngZoom(
polygon.getOuterBoundaryCoordinates().get(0), 18));
Log.i("Demo", "End");
} catch (Exception e) {
Log.e("Exception caught", e.toString());
}
}

private class DownloadKmlFile extends AsyncTask<String, Void, byte[]> {
private final String mUrl;

public DownloadKmlFile(String url) {
mUrl = url;
}

@Override
protected byte[] doInBackground(String... params) {

try {
InputStream is = new URL(mUrl).openStream();
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
int nRead;
byte[] data = new byte[16384];
while ((nRead = is.read(data, 0, data.length)) != -1) {
buffer.write(data, 0, nRead);
}

buffer.flush();

return buffer.toByteArray();

} catch (IOException e) {
e.printStackTrace();
}
return null;
}

@Override
protected void onPostExecute(byte[] byteArr) {
try {
KmlLayer layer = new KmlLayer(mMap, new ByteArrayInputStream(byteArr),
getApplicationContext());
layer.addLayer();
} catch (XmlPullParserException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}

}
}
}
2 changes: 2 additions & 0 deletions demo/src/com/google/maps/android/utils/demo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ protected void onCreate(Bundle savedInstanceState) {
addDemo("Generating tiles", TileProviderAndProjectionDemo.class);
addDemo("Heatmaps", HeatmapsDemoActivity.class);
addDemo("Heatmaps with Places API", HeatmapsPlacesDemoActivity.class);
addDemo("KML Layer Overlay", KmlDemoActivity.class);
addDemo("GeoJSON Layer Overlay", GeoJsonDemoActivity.class);
}

private void addDemo(String demoName, Class<? extends Activity> activityClass) {
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Oct 08 10:43:50 MDT 2014
#Wed Dec 17 14:51:18 EST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
Loading