[Google Static Maps] Handle styled Maps with the "style" parameter
まだ誰も着手していません。
評価
調査の方向性
StaticMapsRequest.java から始め、param と paramAddToList を通じて custom(String, String) を追跡し、繰り返しパラメータがどのように表現されるかを理解します。Google Static Maps に対して要求されているスタイル動作を、リンク先のスタイル設定ドキュメントと比較します。呼び出し側がサポートされたリクエスト API を通じて複数の style パラメータを追加できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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();
}
- 主要言語
- Java
- スター
- 1.8k
- フォーク
- 972
- 平均マージ
- 5時間 7分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
googlemaps/google-maps-services-java のほかの issue
-
PlacesApi.placeDetails(context, placeId).await() interface error対応中かも @madtriceps が 99 日前に担当しました。 オープンtriage me type: bug
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
[email protected]オープンtriage me type: feature request
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
-
Bagg hacmオープン
難易度 5/5 1週間以上 初心者へのやさしさ 5/100
googlemaps/google-maps-services-java#1059 · リアクション 1 件 ·
-
Issue in java daオープン
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
-
Issue in java daオープン
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
googlemaps/google-maps-services-java の issue をすべて見る
似ている issue
-
Area-UIUX Issue-Bug Issue-Easy (good first issue)
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
TeamAmaze/AmazeFileManager#4769 ·
メンテナーはふだん 7 日以内に返信
-
Expose SManga.memo & SChapter.memo fields in GraphQL APIs to support source-specific client featuresオープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Suwayomi/Suwayomi-Server#2551 ·
メンテナーはふだん 9 日以内に返信
-
CLI: enforce absolute ADB device paths in file and directory commands対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
weaviate/java-client#631 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信