Open Kobee1203 opened 2 years ago
This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!
...
This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!
It is still valid.
This is what I did as a minimum workaround:
public final class MyStaticMapsRequest extends StaticMapsRequest {
/**
* Instantiates a new my static maps request.
*
* @param context the context
*/
private MyStaticMapsRequest(GeoApiContext context) {
super(context);
}
/**
* Of.
*
* @param context the context
* @param size the size
* @return the my static maps request
*/
public static MyStaticMapsRequest of(GeoApiContext context, Size size) {
MyStaticMapsRequest request = new MyStaticMapsRequest(context);
request.size(size);
return request;
}
@Override
public MyStaticMapsRequest center(LatLng location) {
return (MyStaticMapsRequest) super.center(location);
}
@Override
public MyStaticMapsRequest center(String location) {
return (MyStaticMapsRequest) super.center(location);
}
@Override
public MyStaticMapsRequest format(ImageFormat format) {
return (MyStaticMapsRequest) super.format(format);
}
@Override
public MyStaticMapsRequest maptype(StaticMapType maptype) {
return (MyStaticMapsRequest) super.maptype(maptype);
}
@Override
public MyStaticMapsRequest markers(Markers markers) {
return (MyStaticMapsRequest) super.markers(markers);
}
@Override
public MyStaticMapsRequest path(EncodedPolyline path) {
return (MyStaticMapsRequest) super.path(path);
}
@Override
public MyStaticMapsRequest path(Path path) {
return (MyStaticMapsRequest) super.path(path);
}
@Override
public MyStaticMapsRequest region(String region) {
return (MyStaticMapsRequest) super.region(region);
}
@Override
public MyStaticMapsRequest scale(int scale) {
return (MyStaticMapsRequest) super.scale(scale);
}
@Override
public MyStaticMapsRequest size(Size size) {
return (MyStaticMapsRequest) super.size(size);
}
@Override
public MyStaticMapsRequest visible(LatLng visibleLocation) {
return (MyStaticMapsRequest) super.visible(visibleLocation);
}
@Override
public MyStaticMapsRequest visible(String visibleLocation) {
return (MyStaticMapsRequest) super.visible(visibleLocation);
}
@Override
public MyStaticMapsRequest zoom(int zoom) {
return (MyStaticMapsRequest) super.zoom(zoom);
}
/**
* Style.
*
* @param value The value of the custom parameter.
* @return Returns the request for call chaining.
*/
public MyStaticMapsRequest style(String value) {
return (MyStaticMapsRequest) paramAddToList("style", value);
}
I use the Google Static Maps API and I would like to customize the presentation of the Map by applying my own styles.
I found this documentation: https://developers.google.com/maps/documentation/maps-static/styling
Is your feature request related to a problem? Please describe.
But I can't find a method in
StaticMapsRequest.java
to add styles.As an alternative, I used
StaticMapsRequest.custom(...)
method.But I can't add multiple styles, because the
custom
method allows to add just one 'style' parameter.I can't do the following:
Describe the solution you'd like I would like to have a method to handle the 'style' parameter.
Describe alternatives you've considered The
custom
method allows to add a single string:An alternative would be to add a new
custom
method that allows a list of Strings: