forked from googlemaps/android-maps-utils
-
Notifications
You must be signed in to change notification settings - Fork 1
GeoJSON Review #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
juliawong
wants to merge
384
commits into
master
Choose a base branch
from
geojson
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
384 commits
Select commit
Hold shift + click to select a range
4f4e286
Renamed files to be prefixed with Kml. Added more support for recursi…
juliawong 8c5201e
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong e62c468
Added more kml files for demos
juliawong 264198e
:cookie: Points, LineStrings and Polygons are successfully being draw…
juliawong f41699b
Geometry collections can be added and removed from the map - Nested g…
lchans 1172068
:cow2: MultiGeometry adding to the map
juliawong 3de0e63
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong 20bd9d7
Added test skeleton files
juliawong 9d33d56
Added tests for features
lchans 021b267
Added support for the normal style tag in StyleMap
juliawong cc8853e
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong b27b7fe
Added public methods remove, set z index and get placemarks
juliawong f0df9d1
Fixed minor syntax error and removed old code
juliawong 465afde
Added additional tests for GeoJsonParser
lchans d0609c2
Modified KmlLayer to download icons once and add to many markers
juliawong e1e5ac4
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong 2454853
Minor refactor of KmlLayer to utilise LruCache
juliawong 294af51
Refactored code to not store Marker objects twice, uses LruCache more…
juliawong c554c8b
Reformatted code, added TODO
juliawong a3bfd6a
Added exceptions for null coordinates. Renamed KmlGeometry method
juliawong 05502be
Added tests for getType
juliawong 61b7c0e
Updated demo files and grade files
juliawong ed2700f
Added comments
lchans 7465a8d
Changed GeoJsonGeometry to an interface
juliawong 06eeae7
Minor syntax correction
juliawong e58442a
Seperated KMLParser into KMLStyleParser and KMLPlacemarkParser
lchans afe1843
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong ec5b764
Refactored code, ran reformatter and added some JavaDoc
juliawong 47a2aaf
Renamed tests
juliawong 77563f4
Added support for bbox in FeatureCollection
juliawong eb913a8
Implemented addFeature, removeFeature methods
juliawong a44f601
Refactored rendering of GeometryCollection
juliawong e6328bc
Implemented Folders, however need to also create a Document class so …
lchans 8878a74
:balloon: Added and redid Javadoc. Minor refactor of code.
juliawong 9b5896e
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong 5bcc1d3
Modified methods to add and remove data to allow developers to call a…
juliawong 8abab35
Prevented feature redrawing if different type style was set
juliawong b420ec9
Features are redrawn when styles are updated
juliawong 6d65e06
Can handle nested folders and overriding styles in KML
lchans ad48265
Added tests for style classes
juliawong 63751cc
Minor clean ups
juliawong 0bb7de2
Can fetch a url for a marker in folders
lchans 06e1198
Caught exceptions and logging when GeoJSON could not be parsed.
juliawong 0169eec
Reformatting tests and minor clean ups
juliawong d539b74
Implemented API methods for Folders
lchans 16b9021
Added more tests for null coordinates
juliawong 0107258
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong 6da5a38
Implement public API methods for KMLLayer
lchans 254ca40
KmlGeometry is now typed
juliawong cec65f8
Added comments to code
lchans f3fafa3
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans 8c35de6
BoundingBox stored as a LatLngBounds object
juliawong c91a39c
Renamed package to geojson
juliawong 97fef89
Made Documents a KmlContainer (Can now have nested Documents, however…
lchans 6d65b96
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans 933a031
Refactor to store map objects in GeoJsonRenderer and make methods sta…
juliawong 1c2490c
Made geometry arrays and coordinates final
juliawong 4e9b038
Added constants for geometries
juliawong d9dd85e
Minor refactor of GeoJsonRenderer
juliawong 0beb8fb
Renamed the GeoJsonMultiLineStringTest and added tests/
juliawong 44f0b6a
Renamed GeoJsonMultiPolygonTest and added tests
juliawong 058f49f
Started on implementation for GroundOverlay
lchans 5b7b049
Merge conflict
lchans d7e7933
GeoJsonParser and GeoJsonRenderer are now package protected. Ran refo…
juliawong a58e528
Fixed tests failing due to IBitmapDescriptorFactory
juliawong 90f456d
Cleaned up comments
lchans 479fae4
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans 7a6438f
Added more GeoJsonFeature tests
juliawong 91d6fce
Removed TODO
juliawong a9c3d1b
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong 624efa7
Modified exception throwing in the parser. Added tests.
juliawong 7be2a93
getFeatures returns an Iterable
juliawong 4273c58
Reformat and minor refactor of code. Changed all iterators to iterabl…
juliawong 045a09e
Fixed error preventing inner containers from being created.
juliawong 1f01fd7
Implemented parsing of extended data in features
juliawong 8d76802
Implemented parsing of extended data in containers
juliawong 8557c02
Implemented parsing and adding GroundOverlay onto the map
juliawong a4a6df2
Added toString methods
juliawong e2d3d87
Throws an error if the image could not be retrieved
lchans 02222a7
Throwing error if no text found in BalloonStyle
lchans 9a564d1
Added Polygon tests, fixed error where not existent inner boundaries …
lchans 1b91a53
Added tests for KML geometry objects and basic KML style functions
lchans 3bfb5da
Added more tests for styles
lchans cb2dd27
Added tests for container parser, changed visibility of containers to…
lchans 278c2d3
Support for inline styles in placemarks
juliawong 486ccee
Updated demo files
juliawong fe716d6
Removed KmlContainerInterface and updated references to it
juliawong 2facf23
Added tests for KmlContainerParser, focusing mainly on nested containers
lchans 29850b8
Inline styles stored for containers. Separated from shared styles.
juliawong 2135e3f
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong 4445420
One LruCache being used for marker icons and ground overlays
juliawong 529de63
Added additional tests for nested folders
lchans b50c743
Removed inline styles for containers, not supported in KML
juliawong c9f293a
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong 8d6142f
Added seperate method for creating a latlngbound for better readability
lchans d1cc4df
Changed FeatureParser from if to else if statements
lchans c5da7be
Added testing for feature, now fetches test files from a raw resource…
lchans dfb8b3c
Refactored part of KmlLayer into KmlRenderer
juliawong 6bae8b8
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong 62bfa59
Added tests for multigeometry and added a hasProperties method
lchans 747f165
Fixed up a few javadoc commments and also deleted code so that it is …
lchans d123cf7
Added tests for multiple features in a container
lchans e1ae3fa
Implemented inline styles
juliawong 8ee262d
Added extended data test
lchans 492c2ae
Color mode working for markers
lchans 1e085cf
Seperated methods, now has inlinestyle methods
lchans 23933d2
Refractored variable names
lchans 67f84a0
Added style map tests
lchans 4fbce85
Support for inline icon URLs and scale
juliawong 536b868
Refractored variable names
lchans 6760590
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans e664ca2
Added more ground overlay tests
lchans fe3c5d5
Added testing for cdata entities
lchans 08510fd
Changed to nextToken
lchans 1d54a89
Changed implemented of createGroundOverlay to be seperate create and …
lchans 1158331
Ground Overlay stores color
lchans 09d300f
Removal of GroundOverlays, parse objects once, download images once
juliawong e56c9ce
Added more javadoc
lchans 0e83a3a
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans fb20a66
Point displays an info window even if balloonstyle is not set (it dis…
lchans 0052fce
Closed the stream
juliawong fffb80d
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong ea8ccbc
Using additional hashmap to assign styles
juliawong 2d797bb
Changed javadoc comments
lchans 5cb9103
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans 96729b0
Minor modification to allow for style maps to be updated only when re…
juliawong 9e4e915
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong 5c4c618
Reformat parser
juliawong 59e69be
Add images to the cache regardless of layer visibility
juliawong 158ad5b
Updated Javadoc for KmlLayer
juliawong 64171d3
Added more JavaDoc
lchans 6a0e7b8
Small change from getFolders to getContainers
lchans d92649a
New KML file with incorrect balloons
juliawong ba42830
Fixed bug where info windows had the same text
lchans ebcbc74
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans f157c3f
Removed unnecessary javadoc comments, also refractored START_TAG
lchans e9ee72a
Cleaned up minor errors
lchans 2cbd6a5
Added more tests for invalid features
juliawong 5bc9c40
Added skeleton for renderer
juliawong 2dcbc90
Parser classes take in the parser through the method not the construc…
lchans b2604cb
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong 8ae1483
Added tests for valid features, minor clean up
juliawong 5278496
Changed constructors of KmlContainer to take all properties, eliminat…
lchans 3781da1
Changed featureparser methods to static
lchans 02287e0
Removed constructor in KmlFeatureParser, now has all static methods
lchans b6e8167
Minor editng of primative types
lchans 4b3a82b
Features can be accessed when not added to the map
juliawong 0039f97
Minor refactor
juliawong d93103f
Add tests for the layer
juliawong dd7f050
createGroundOverlay is now static, removed set methods for KmlGroundO…
juliawong 8f81f53
Started implementing static methods for style
juliawong 581273e
Fixed calling of static method
juliawong 5094e8a
Added a demo for GeoJson
lchans 4ad6f51
Added a demo for GeoJson
lchans a3ce6ca
Added a GeoJson demo
lchans 718f849
Parsing methods are now static, minor refactor of code.
juliawong 00c844e
Updated test
juliawong 9a2aeb2
Features are now read from the renderer when adding and removing
juliawong bce41d9
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans 0c154b7
Added get, set, has and remove methods for the properties
juliawong ab819b8
Made Style interface local
juliawong faa3c25
More descriptive addDataToLayer Javadoc
juliawong df6fa24
Rotation working for GroundOverlay
lchans 624ef01
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans f9396cd
Created a shorter way of implementing GroundOverlay - Values now stor…
lchans ac773ef
Modified tests to use new property methods. Added an iterable to get all
juliawong 4a87434
Added javadoc for groundoverlay, also changed methods from public to …
lchans 3b564f1
Always remove previous map objects before adding new ones
juliawong 6b8fd78
Reverted ground overlay methods to public, color stored in proprties …
juliawong 967462a
Minor refactor of putting color in properties hashmap
juliawong 7fea8cc
KML reads color in the reverse order, reversed the string storing the…
lchans 40bf540
Cleaned up code in KmlRenderer
lchans 50da4fd
Reverted renderer, added demo files and demo classes
juliawong 1bdf284
Visibility not working
lchans a1023be
Fixed visibility, germany.kml was setting initial visibility to 0
lchans eedf8fe
:cow: Demo files
juliawong 1c47eaf
Revert ":cow: Demo files"
juliawong d050f82
Redo Javadoc
juliawong 7d63284
Fixed visibility of ground overlay - now inherits visibility of the c…
lchans 2404538
Refractored code
lchans 687ebf6
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong 070856d
Log error when URL cannot be found
juliawong 6458f63
Cleaned up code when scaling bitmap
lchans 185e1a9
Geometry classes accept List instead of ArrayList
juliawong 1820b34
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong fe5c31a
Implementations of GeoJsonGeometry inherit the javadoc
juliawong 4123900
Updated Javadoc to reflect changes to a list
juliawong ce3a1d3
Renamed add and remove layer methods
juliawong 0f6e274
Removed demo files that weren't needed and updated the manifest
juliawong bd64770
Changed type for coordintaes. Overcomes type erasure.
juliawong 58a9cb6
Updated Javadoc, removed getFeatureById and updated demo
juliawong 369ba87
Seperated getter styles into static methods
lchans 37d635b
Seperated getter styles into static methods
lchans a5a48e6
Fixed JavaDoc for KMLStyle
lchans 82eff66
Redid Javadoc and refactor. Modified behaviour of styles for the GeoJ…
juliawong a7413fb
Fixed up KML Javadoc
lchans 0006b9c
Removed TODO
juliawong 4ee566e
Throw IAE if default styles are set to null
juliawong 897b1e6
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong 2c8505e
Added code example for the GeoJsonLayer
juliawong 38d82de
Added units to the Javadoc for GeoJSON styles
juliawong f28de17
Added a demo for a KML file
lchans 0caa16a
:tada: KML Download from URL WORKS!
juliawong 9f0dbd4
Refactor method names - removal of words nested and Kml
juliawong 8419eeb
Renamed method to add layer to addLayer()
juliawong d84b68c
Refactor to allow for null styles in GeoJsonFeature
juliawong 33224ef
Changed property to store in Kml Feature
lchans 0ccb0d5
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
lchans 3991d3c
Color supported in format of AABBGGRR and BBGGRR
lchans 6a13bf4
Minor refactor of Javadoc
juliawong c262229
Merge branch 'new' of https://github.com/juliawong/android-maps-utils…
juliawong c76f9f0
Update demos with refactored method names
juliawong 5c4c3c9
Deleting KML utility for GeoJSON branch
juliawong eee7b39
Modified demo files
juliawong 208c0b1
Remove demo files
juliawong 3a96fe6
Revert changes in GradientTest
juliawong ee49bc5
Revert change to GradientTest
juliawong 4acac73
Added links to style classes
juliawong 9b99b5e
Removed KmlDemoActivity
juliawong 55fc1bf
Added new demo using GOOGLE letters
juliawong 69e4ebe
Removed KML layout
juliawong 742e250
Revert changes to Heatmaps Demo
juliawong 475b8b1
Revert Heatmaps Places Demo
juliawong 04fd895
Updated name of GeoJSON demo
juliawong 391fa93
Removed if statement that didn't do anything
juliawong fba7915
fixed typo in Javadoc
juliawong 39fc096
Updated demo
juliawong 85cb778
Added earthquake demo
juliawong 950aceb
Removed pre tags to make Javadoc inline for code examples
juliawong 090b330
Update Javadoc
juliawong be9d004
Update Javadoc
juliawong 225f5b8
Improved Javadoc description of GeoJsonLineString
juliawong 6e0033e
Replace & with &
juliawong a2bed63
Ran reformatter on GeoJSON utility to prepare for pull request
juliawong 448a928
Style regex is now a string array, updated tests to match
juliawong bfaf396
Added a check for place property
juliawong 075579c
Made method static
juliawong a4f24f5
Added flag to check if layer is on map
juliawong 712fed0
Updated javadoc for renamed mathod
juliawong c1cd7d1
Layers can only be added and removed once
juliawong f3b8d0c
Merge https://github.com/googlemaps/android-maps-utils into geojson
juliawong 8ff082e
Modified Javadoc
juliawong 920e5c2
Refactored renderer and added javadoc
juliawong 470b2d0
Redid default styles. No set default style methods. Changes to defaul…
juliawong a63d708
Minor change to demo
juliawong 6c2ff42
Remove unused demo file
juliawong 5b7fae8
Ran reformatter on code to prepare for PR
juliawong cc9eac7
Ran reformatter on demo to prepare for PR
juliawong 5b85756
Revert AndroidManifext.xml
juliawong dcabe01
Revert again
juliawong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
131 changes: 131 additions & 0 deletions
131
demo/src/com/google/maps/android/utils/demo/GeoJsonDemoActivity.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
package com.google.maps.android.utils.demo; | ||
|
||
import com.google.android.gms.maps.model.BitmapDescriptor; | ||
import com.google.android.gms.maps.model.BitmapDescriptorFactory; | ||
import com.google.maps.android.geojson.GeoJsonFeature; | ||
import com.google.maps.android.geojson.GeoJsonLayer; | ||
import com.google.maps.android.geojson.GeoJsonPointStyle; | ||
|
||
import org.json.JSONException; | ||
import org.json.JSONObject; | ||
|
||
import android.os.AsyncTask; | ||
import android.util.Log; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.io.InputStreamReader; | ||
import java.net.URL; | ||
|
||
public class GeoJsonDemoActivity extends BaseDemoActivity { | ||
|
||
private final static String mLogTag = "GeoJsonDemo"; | ||
|
||
// GeoJSON file to download | ||
private final String mGeoJsonUrl | ||
= "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson"; | ||
|
||
private GeoJsonLayer mLayer; | ||
|
||
/** | ||
* Assigns a color based on the given magnitude | ||
*/ | ||
private static float magnitudeToColor(double magnitude) { | ||
if (magnitude < 1.0) { | ||
return BitmapDescriptorFactory.HUE_CYAN; | ||
} else if (magnitude < 2.5) { | ||
return BitmapDescriptorFactory.HUE_GREEN; | ||
} else if (magnitude < 4.5) { | ||
return BitmapDescriptorFactory.HUE_YELLOW; | ||
} else { | ||
return BitmapDescriptorFactory.HUE_RED; | ||
} | ||
} | ||
|
||
protected int getLayoutId() { | ||
return R.layout.geojson_demo; | ||
} | ||
|
||
@Override | ||
protected void startDemo() { | ||
DownloadGeoJsonFile downloadGeoJsonFile = new DownloadGeoJsonFile(); | ||
// Download the GeoJSON file | ||
downloadGeoJsonFile.execute(mGeoJsonUrl); | ||
} | ||
|
||
/** | ||
* Adds a point style to all features to change the color of the marker based on its magnitude | ||
* property | ||
*/ | ||
private void addColorsToMarkers() { | ||
// Iterate over all the features stored in the layer | ||
for (GeoJsonFeature feature : mLayer.getFeatures()) { | ||
// Check if the magnitude property exists | ||
if (feature.hasProperty("mag") && feature.hasProperty("place")) { | ||
double magnitude = Double.parseDouble(feature.getProperty("mag")); | ||
|
||
// Get the icon for the feature | ||
BitmapDescriptor pointIcon = BitmapDescriptorFactory | ||
.defaultMarker(magnitudeToColor(magnitude)); | ||
|
||
// Create a new point style | ||
GeoJsonPointStyle pointStyle = new GeoJsonPointStyle(); | ||
|
||
// Set options for the point style | ||
pointStyle.setIcon(pointIcon); | ||
pointStyle.setTitle("Magnitude of " + magnitude); | ||
pointStyle.setSnippet("Earthquake occured " + feature.getProperty("place")); | ||
|
||
// Assign the point style to the feature | ||
feature.setPointStyle(pointStyle); | ||
} | ||
} | ||
} | ||
|
||
private class DownloadGeoJsonFile extends AsyncTask<String, Void, JSONObject> { | ||
|
||
@Override | ||
protected JSONObject doInBackground(String... params) { | ||
try { | ||
// Open a stream from the URL | ||
InputStream stream = new URL(params[0]).openStream(); | ||
|
||
String line; | ||
StringBuilder result = new StringBuilder(); | ||
BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); | ||
|
||
while ((line = reader.readLine()) != null) { | ||
// Read and save each line of the stream | ||
result.append(line); | ||
} | ||
|
||
// Close the stream | ||
reader.close(); | ||
stream.close(); | ||
|
||
// Convert result to JSONObject | ||
return new JSONObject(result.toString()); | ||
} catch (IOException e) { | ||
Log.e(mLogTag, "GeoJSON file could not be read"); | ||
} catch (JSONException e) { | ||
Log.e(mLogTag, "GeoJSON file could not be converted to a JSONObject"); | ||
} | ||
return null; | ||
} | ||
|
||
@Override | ||
protected void onPostExecute(JSONObject jsonObject) { | ||
if (jsonObject != null) { | ||
// Create a new GeoJsonLayer, pass in downloaded GeoJSON file as JSONObject | ||
mLayer = new GeoJsonLayer(getMap(), jsonObject); | ||
// Add the layer onto the map | ||
addColorsToMarkers(); | ||
mLayer.addLayerToMap(); | ||
} | ||
} | ||
|
||
|
||
} | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need this in the library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added to allow for unit tests to extend the AndroidTestCase. In particular, we need this to test the changing of icons for markers.