Skip to content

Commit

Permalink
Merge branch 'wkid2'
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpoole committed Jul 8, 2023
2 parents be4fb8d + 80d502e commit 92cc5a1
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 95 deletions.
4 changes: 4 additions & 0 deletions documentation/docs/help/en/Custom imagery.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Place holders are replaced when the application retrieves imagery files from the

The place holders have the general format of __{__ _place holder name_ __}__.

__{apikey}__ api key for sources that require it. _JOSM_, _iD_, _Vespucci (only in configuration files)_ see [key configuration example](https://github.com/MarcusWolschon/osmeditor4android/blob/master/src/main/assets/keys2-default.txt) for more information.

__{zoom}__ the zoom level

__{x}__ the x tile number
Expand All @@ -43,6 +45,8 @@ __{quadkey}__ used for Bing. _Vespucci_

__{proj}__ projection for WMS servers. _JOSM_, _Vespucci (only in configuration files)_

__{wkid}__ projection for proprietary ESRI servers. _JOSM_, _Vespucci (only in configuration files)_

__{width}__ tile width for WMS servers. _JOSM_, _Vespucci_

__{height}__ tile height for WMS servers. _JOSM_, _Vespucci_
Expand Down
2 changes: 2 additions & 0 deletions src/main/assets/help/en/Custom imagery.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ <h2>Adding a custom imagery source</h2>
<h3>Supported place holders</h3>
<p>Place holders are replaced when the application retrieves imagery files from the source and are replaced by calculated values. There are some variants even between applications that in principle use the same system, which are noted for completeness sake below.</p>
<p>The place holders have the general format of <strong>{</strong> <em>place holder name</em> <strong>}</strong>.</p>
<p><strong>{apikey}</strong> api key for sources that require it. <em>JOSM</em>, <em>iD</em>, <em>Vespucci (only in configuration files)</em> see <a href="https://github.com/MarcusWolschon/osmeditor4android/blob/master/src/main/assets/keys2-default.txt">key configuration example</a> for more information.</p>
<p><strong>{zoom}</strong> the zoom level</p>
<p><strong>{x}</strong> the x tile number</p>
<p><strong>{y}</strong> the y tile number</p>
Expand All @@ -35,6 +36,7 @@ <h3>Supported place holders</h3>
<p><strong>{switch:a,b,c}</strong> rotating server selection (replace <em>a,b,c</em> by the actual sub-domains). <em>JOSM</em>, <em>iD</em>, <em>Vespucci</em></p>
<p><strong>{quadkey}</strong> used for Bing. <em>Vespucci</em></p>
<p><strong>{proj}</strong> projection for WMS servers. <em>JOSM</em>, <em>Vespucci (only in configuration files)</em></p>
<p><strong>{wkid}</strong> projection for proprietary ESRI servers. <em>JOSM</em>, <em>Vespucci (only in configuration files)</em></p>
<p><strong>{width}</strong> tile width for WMS servers. <em>JOSM</em>, <em>Vespucci</em></p>
<p><strong>{height}</strong> tile height for WMS servers. <em>JOSM</em>, <em>Vespucci</em></p>
<p><strong>{bbox}</strong> bounding box in <em>proj</em> coordinates for WMS servers. <em>JOSM</em>, <em>Vespucci</em></p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,8 @@ public static void addLayer(@NonNull SQLiteDatabase db, @NonNull String source,
*/
private static void addCoverageFromLayer(@NonNull SQLiteDatabase db, @NonNull TileLayerSource layer) {
// insert coverage areas
List<CoverageArea> coverages = layer.getCoverage();
if (coverages != null) {
for (CoverageArea ca : coverages) {
addCoverage(db, layer.getId(), ca);
}
for (CoverageArea ca : layer.getCoverage()) {
addCoverage(db, layer.getId(), ca);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public static void showLayerDialog(@NonNull final FragmentActivity activity, fin
minZoomPicker.setValue(layer.getMinZoomLevel());
maxZoomPicker.setValue(layer.getMaxZoomLevel());
List<CoverageArea> coverages = layer.getCoverage();
if (coverages != null && !coverages.isEmpty()) {
if (!coverages.isEmpty()) {
BoundingBox box = coverages.get(0).getBoundingBox();
Log.d(DEBUG_TAG, "Coverage box " + box);
if (box != null) {
Expand Down
Loading

0 comments on commit 92cc5a1

Please sign in to comment.