[Google Static Maps] Handle styled Maps with the "style" parameter
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
Hướng nghiên cứu
Bắt đầu trong StaticMapsRequest.java và lần theo custom(String, String) qua param và paramAddToList để hiểu các tham số lặp lại được biểu diễn như thế nào. So sánh hành vi kiểu dáng được yêu cầu cho Google Static Maps với tài liệu về kiểu dáng được liên kết; công việc được xem là hoàn tất khi các bên gọi có thể thêm nhiều tham số style thông qua một request API được hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
req.custom("style", "feature:poi|visibility:off");
But I can't add multiple styles, because the custom method allows to add just one 'style' parameter.
I can't do the following:
StaticMapsRequest req = StaticMapsApi.newRequest(sc.context, new Size(WIDTH, HEIGHT));
req.center("Google Sydney");
req.zoom(16);
req.custom("style", "feature:poi|visibility:off");
req.custom("style", "feature:landscape|visibility:off");
ByteArrayInputStream bais = new ByteArrayInputStream(req.await().imageData);
BufferedImage img = ImageIO.read(bais);
Describe the solution you'd like
I would like to have a method to handle the 'style' parameter.
req.style(
new Style()
.feature(new StyleFeature().poi())
.element(new StyleElement().labels().icon())
.rules(new StyleRules().color(java.awt.Color.WHITE))
);
req.style(
new Style()
.feature(new StyleFeature().landscape().man_made())
.rules(new StyleRules().visbility().off())
);
Describe alternatives you've considered
The custom method allows to add a single string:
public A custom(String parameter, String value) {
return this.param(parameter, value);
}
An alternative would be to add a new custom method that allows a list of Strings:
public A custom(String parameter, List<String> values) {
values.forEach(v -> this.paramAddToList(parameter, v));
return this.getInstance();
}
- Ngôn ngữ chính
- Java
- Star
- 1.8k
- Fork
- 972
- Merge trung bình
- 5 giờ 7 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của googlemaps/google-maps-services-java
-
PlacesApi.placeDetails(context, placeId).await() interface errorCó thể đã có người làm @madtriceps đã nhận 99 ngày trước. Đang mởtriage me type: bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
-
[email protected]Đang mởtriage me type: feature request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
-
Bagg hacmĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 5/100
googlemaps/google-maps-services-java#1059 · 1 reaction ·
-
Issue in java daĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
-
Issue in java daĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
Tất cả issue của googlemaps/google-maps-services-java
Issue tương tự
-
Area-UIUX Issue-Bug Issue-Easy (good first issue)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
TeamAmaze/AmazeFileManager#4769 ·
Maintainer thường phản hồi trong vòng 7 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
open-feature/java-sdk#2076 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Expose SManga.memo & SChapter.memo fields in GraphQL APIs to support source-specific client featuresĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Suwayomi/Suwayomi-Server#2551 ·
Maintainer thường phản hồi trong vòng 9 ngày
-
CLI: enforce absolute ADB device paths in file and directory commandsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
weaviate/java-client#631 ·