Skip to content

Jenny directionsapi 368#428

Merged
cammace merged 19 commits into
masterfrom
jenny-directionsapi-368
Apr 14, 2017
Merged

Jenny directionsapi 368#428
cammace merged 19 commits into
masterfrom
jenny-directionsapi-368

Conversation

@JennyVayla

Copy link
Copy Markdown
Contributor

Added a marker overlay on static image maps.

  • Added a marker model class containing name, label, color, precision, latitude and longitude.
  • In MapboxStaticImage, added support for markers by allowing it to set a list of markers and creating the annotationPathSegment.
  • Created StaticImageWithAnnotationActivity in Demo App to display the support of markers over the static map image.
  • In GalleryAdapter, added the property to Picasso to fit the image to the screen.
  • In MainActivity, added an entry to the list to display the StaticImageWithAnnotationsActivity.

@JennyVayla JennyVayla requested a review from zugaldia March 31, 2017 20:59
@cammace

cammace commented Apr 3, 2017

Copy link
Copy Markdown

Commit eac12a5 was merged in #422, I have reverted it to remove merge conflicts.

@cammace

cammace commented Apr 3, 2017

Copy link
Copy Markdown

List of things that still need to be done:

  • Test coverage of this API needs improving
  • GeoJSON annotation support
  • path annotation support
  • Add before_layer and auto APIs to MapboxStaticImage

@cammace cammace force-pushed the jenny-directionsapi-368 branch from d6e52c9 to 57a8add Compare April 12, 2017 20:52
@cammace

cammace commented Apr 12, 2017

Copy link
Copy Markdown

Path and marker have been added. Only API that needs exposure still is the GeoJSON.

cc: @zugaldia

.setStrokeWidth(5)
.build();


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: extra line

<item>Lost</item>
<item>Google Play Services</item>
</string-array>
<string name="title_activity_static_image_with_annotations">Static Image With AnnotationsActivity

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Duplicated: there's a title_static_image_with_annotations above.

*
* @since 2.1.0
*/
public class Marker {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we call this StaticMarkerAnnotation instead?

*
* @since 2.1.0
*/
public class Polyline {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we call this StaticPolylineAnnotation instead?

}
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: extra lines


if (builder.getPrecision() > 0) {
String pattern = "0." + new String(new char[builder.getPrecision()]).replace("\0", "0");
DecimalFormat df = (DecimalFormat) DecimalFormat.getInstance(Locale.US);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Instead of having custom code here for formatting, let's extend the code in #424 for this use case?

@cammace cammace force-pushed the jenny-directionsapi-368 branch from bc19f69 to 8e67eec Compare April 14, 2017 17:32
@cammace cammace force-pushed the jenny-directionsapi-368 branch from 765ebf6 to 0a2becd Compare April 14, 2017 18:59
@cammace cammace merged commit 08cad42 into master Apr 14, 2017
@cammace cammace deleted the jenny-directionsapi-368 branch April 14, 2017 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants