Skip to content

Commit

Permalink
bruh moment when you add all of the floors of grainger and it works p…
Browse files Browse the repository at this point in the history
…erfectly (for now lol). not gonna lie, i am pretty proud of the progress & knowledge that i have acquired this evening.

elia out (lol im gonna commit more things tn idk why i said elia out but bear with me future fans & employers :))
  • Loading branch information
echudov committed Dec 11, 2019
1 parent 38daed7 commit 9f7eab1
Show file tree
Hide file tree
Showing 265 changed files with 708 additions and 63 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/src/debug/res;file://$MODULE_DIR$/build/generated/res/google-services/debug" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/src/debug/res;file://$MODULE_DIR$/build/generated/res/google-services/debug;file://$MODULE_DIR$/build/generated/res/resValues/debug" />
<option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions app/src/main/assets/libraries/grainger/floor0/leaflet.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<title>floor0</title>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.3.1/leaflet.css">
<link rel="stylesheet" href="https://cdn.rawgit.com/ardhi/Leaflet.MousePosition/master/src/L.Control.MousePosition.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.3.1/leaflet.js" type="text/javascript"></script>
<script src="https://cdn.rawgit.com/ardhi/Leaflet.MousePosition/master/src/L.Control.MousePosition.js" type="text/javascript"></script>
<style>
html, body, #map { width:100%; height:100%; margin:0; padding:0; z-index: 1; background: #ffffff; }
#slider{ position: absolute; top: 10px; right: 10px; z-index: 5; }
</style>
</head>
<body>
<div id="map"></div>
<input id="slider" type="range" min="0" max="1" step="0.1" value="1" oninput="layer.setOpacity(this.value)">
<script type="text/javascript">
var mapExtent = [0.00000000, -900.00000000, 2332.00000000, 0.00000000];
var mapMinZoom = 0;
var mapMaxZoom = 4;
var mapMaxResolution = 1.00000000;
var mapMinResolution = Math.pow(2, mapMaxZoom) * mapMaxResolution;
var tileExtent = [0.00000000, -900.00000000, 2332.00000000, 0.00000000];
var crs = L.CRS.Simple;
crs.transformation = new L.Transformation(1, -tileExtent[0], -1, tileExtent[3]);
crs.scale = function(zoom) {
return Math.pow(2, zoom) / mapMinResolution;
};
crs.zoom = function(scale) {
return Math.log(scale * mapMinResolution) / Math.LN2;
};
var layer;
var map = new L.Map('map', {
maxZoom: mapMaxZoom,
minZoom: mapMinZoom,
crs: crs
});

layer = L.tileLayer('{z}/{x}/{y}.png', {
minZoom: mapMinZoom, maxZoom: mapMaxZoom,
attribution: 'Rendered with <a href="https://www.maptiler.com/desktop/">MapTiler Desktop</a>',
noWrap: true,
tms: false
}).addTo(map);
map.fitBounds([
crs.unproject(L.point(mapExtent[2], mapExtent[3])),
crs.unproject(L.point(mapExtent[0], mapExtent[1]))
]);
L.control.mousePosition().addTo(map)
</script>
</body>
</html>
61 changes: 61 additions & 0 deletions app/src/main/assets/libraries/grainger/floor0/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"name": "floor0",
"version": "1.1.0",
"description": "",
"attribution": "Rendered with <a href=\"https://www.maptiler.com/desktop/\">MapTiler Desktop</a>",
"type": "overlay",
"format": "png",
"minzoom": "0",
"maxzoom": "4",
"scale": "1.000000",
"profile": "custom",
"crs": "RASTER",
"extent": [0.00000000, -900.00000000, 2332.00000000, 0.00000000],
"tile_matrix": [
{
"id": "0",
"tile_size": [256, 256],
"origin": [0.00000000, 0.00000000],
"extent": [0.00000000, -900.00000000, 2332.00000000, 0.00000000],
"pixel_size": [16.00000000, -16.00000000],
"matrix_size": [1, 1],
"scale_denominator": 57142.85714286
},
{
"id": "1",
"tile_size": [256, 256],
"origin": [0.00000000, 0.00000000],
"extent": [0.00000000, -900.00000000, 2332.00000000, 0.00000000],
"pixel_size": [8.00000000, -8.00000000],
"matrix_size": [2, 1],
"scale_denominator": 28571.42857143
},
{
"id": "2",
"tile_size": [256, 256],
"origin": [0.00000000, 0.00000000],
"extent": [0.00000000, -900.00000000, 2332.00000000, 0.00000000],
"pixel_size": [4.00000000, -4.00000000],
"matrix_size": [3, 1],
"scale_denominator": 14285.71428571
},
{
"id": "3",
"tile_size": [256, 256],
"origin": [0.00000000, 0.00000000],
"extent": [0.00000000, -900.00000000, 2332.00000000, 0.00000000],
"pixel_size": [2.00000000, -2.00000000],
"matrix_size": [5, 2],
"scale_denominator": 7142.85714286
},
{
"id": "4",
"tile_size": [256, 256],
"origin": [0.00000000, 0.00000000],
"extent": [0.00000000, -900.00000000, 2332.00000000, 0.00000000],
"pixel_size": [1.00000000, -1.00000000],
"matrix_size": [10, 4],
"scale_denominator": 3571.42857143
}
]
}
64 changes: 64 additions & 0 deletions app/src/main/assets/libraries/grainger/floor0/openlayers.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html>
<head>
<title>floor0</title>
<meta charset="utf-8">
<meta http-equiv="imagetoolbar" content="no"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<style type="text/css">
html, body { margin:0; padding: 0; height: 100%; width: 100%; }
body { width:100%; height:100%; background: #ffffff; }
#map { position: absolute; height: 100%; width: 100%; background-color: #FFFFFF; }
#slider { position: absolute; top: 10px; right: 10px; }
</style>
<link rel="stylesheet" href="https://cdn.maptiler.com/ol/v5.3.0/ol.css" type="text/css">
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL,fetch,Function.prototype.bind,es5&flags=always,gated&unknown=polyfill" type="text/javascript"></script>
<script src="https://cdn.maptiler.com/ol/v5.3.0/ol.js" type="text/javascript"></script>
</head>
<body>
<div id="map"></div>
<input id="slider" type="range" min="0" max="1" step="0.1" value="1" oninput="layer.setOpacity(this.value)">
<script type="text/javascript">
var mapExtent = [0.00000000, -900.00000000, 2332.00000000, 0.00000000];
var mapMinZoom = 0;
var mapMaxZoom = 4;
var mapMaxResolution = 1.00000000;
var tileExtent = [0.00000000, -900.00000000, 2332.00000000, 0.00000000];

var mapResolutions = [];
for (var z = 0; z <= mapMaxZoom; z++) {
mapResolutions.push(Math.pow(2, mapMaxZoom - z) * mapMaxResolution);
}

var mapTileGrid = new ol.tilegrid.TileGrid({
extent: tileExtent,
minZoom: mapMinZoom,
resolutions: mapResolutions
});

var layer = new ol.layer.Tile({
source: new ol.source.XYZ({
attributions: 'floor0; Rendered with <a href="https://www.maptiler.com/desktop/">MapTiler Desktop</a>',
projection: 'PIXELS',
tileGrid: mapTileGrid,
tilePixelRatio: 1.00000000,
url: "{z}/{x}/{y}.png",
})
});

var map = new ol.Map({
target: 'map',
layers: [
layer,
],
view: new ol.View({
projection: ol.proj.get('PIXELS'),
extent: mapExtent,
maxResolution: mapTileGrid.getResolution(mapMinZoom)
})
});
map.getView().fit(mapExtent, map.getSize());
</script>
</body>
</html>
Binary file modified app/src/main/assets/libraries/grainger/floor1/0/0/0.png
Binary file modified app/src/main/assets/libraries/grainger/floor1/1/0/0.png
Binary file modified app/src/main/assets/libraries/grainger/floor1/1/1/0.png
Binary file modified app/src/main/assets/libraries/grainger/floor1/2/0/0.png
Diff not rendered.
Binary file modified app/src/main/assets/libraries/grainger/floor1/2/1/0.png
Diff not rendered.
Binary file modified app/src/main/assets/libraries/grainger/floor1/2/2/0.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file modified app/src/main/assets/libraries/grainger/floor1/3/0/0.png
Binary file modified app/src/main/assets/libraries/grainger/floor1/3/0/1.png
Diff not rendered.
Binary file modified app/src/main/assets/libraries/grainger/floor1/3/1/0.png
Binary file modified app/src/main/assets/libraries/grainger/floor1/3/1/1.png
Diff not rendered.
Binary file modified app/src/main/assets/libraries/grainger/floor1/3/2/0.png
Binary file modified app/src/main/assets/libraries/grainger/floor1/3/2/1.png
Diff not rendered.
Binary file modified app/src/main/assets/libraries/grainger/floor1/3/3/0.png
Binary file modified app/src/main/assets/libraries/grainger/floor1/3/3/1.png
Diff not rendered.
Binary file modified app/src/main/assets/libraries/grainger/floor1/3/4/0.png
Binary file modified app/src/main/assets/libraries/grainger/floor1/3/4/1.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed app/src/main/assets/libraries/grainger/floor1/3/6/1.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
8 changes: 4 additions & 4 deletions app/src/main/assets/libraries/grainger/floor1/leaflet.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>grainger1</title>
<title>floor1</title>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
Expand All @@ -18,12 +18,12 @@
<div id="map"></div>
<input id="slider" type="range" min="0" max="1" step="0.1" value="1" oninput="layer.setOpacity(this.value)">
<script type="text/javascript">
var mapExtent = [0.00000000, -694.00000000, 1864.00000000, 0.00000000];
var mapExtent = [0.00000000, -900.00000000, 2332.00000000, 0.00000000];
var mapMinZoom = 0;
var mapMaxZoom = 3;
var mapMaxZoom = 4;
var mapMaxResolution = 1.00000000;
var mapMinResolution = Math.pow(2, mapMaxZoom) * mapMaxResolution;
var tileExtent = [0.00000000, -694.00000000, 1864.00000000, 0.00000000];
var tileExtent = [0.00000000, -900.00000000, 2332.00000000, 0.00000000];
var crs = L.CRS.Simple;
crs.transformation = new L.Transformation(1, -tileExtent[0], -1, tileExtent[3]);
crs.scale = function(zoom) {
Expand Down
37 changes: 23 additions & 14 deletions app/src/main/assets/libraries/grainger/floor1/metadata.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,60 @@
{
"name": "grainger1",
"name": "floor1",
"version": "1.1.0",
"description": "",
"attribution": "Rendered with <a href=\"https://www.maptiler.com/desktop/\">MapTiler Desktop</a>",
"type": "overlay",
"format": "png",
"minzoom": "0",
"maxzoom": "3",
"maxzoom": "4",
"scale": "1.000000",
"profile": "custom",
"crs": "RASTER",
"extent": [0.00000000, -694.00000000, 1864.00000000, 0.00000000],
"extent": [0.00000000, -900.00000000, 2332.00000000, 0.00000000],
"tile_matrix": [
{
"id": "0",
"tile_size": [256, 256],
"origin": [0.00000000, 0.00000000],
"extent": [0.00000000, -694.00000000, 1864.00000000, 0.00000000],
"pixel_size": [8.00000000, -8.00000000],
"extent": [0.00000000, -900.00000000, 2332.00000000, 0.00000000],
"pixel_size": [16.00000000, -16.00000000],
"matrix_size": [1, 1],
"scale_denominator": 28571.42857143
"scale_denominator": 57142.85714286
},
{
"id": "1",
"tile_size": [256, 256],
"origin": [0.00000000, 0.00000000],
"extent": [0.00000000, -694.00000000, 1864.00000000, 0.00000000],
"pixel_size": [4.00000000, -4.00000000],
"extent": [0.00000000, -900.00000000, 2332.00000000, 0.00000000],
"pixel_size": [8.00000000, -8.00000000],
"matrix_size": [2, 1],
"scale_denominator": 14285.71428571
"scale_denominator": 28571.42857143
},
{
"id": "2",
"tile_size": [256, 256],
"origin": [0.00000000, 0.00000000],
"extent": [0.00000000, -694.00000000, 1864.00000000, 0.00000000],
"extent": [0.00000000, -900.00000000, 2332.00000000, 0.00000000],
"pixel_size": [4.00000000, -4.00000000],
"matrix_size": [3, 1],
"scale_denominator": 14285.71428571
},
{
"id": "3",
"tile_size": [256, 256],
"origin": [0.00000000, 0.00000000],
"extent": [0.00000000, -900.00000000, 2332.00000000, 0.00000000],
"pixel_size": [2.00000000, -2.00000000],
"matrix_size": [4, 2],
"matrix_size": [5, 2],
"scale_denominator": 7142.85714286
},
{
"id": "3",
"id": "4",
"tile_size": [256, 256],
"origin": [0.00000000, 0.00000000],
"extent": [0.00000000, -694.00000000, 1864.00000000, 0.00000000],
"extent": [0.00000000, -900.00000000, 2332.00000000, 0.00000000],
"pixel_size": [1.00000000, -1.00000000],
"matrix_size": [8, 3],
"matrix_size": [10, 4],
"scale_denominator": 3571.42857143
}
]
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/assets/libraries/grainger/floor1/openlayers.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>grainger1</title>
<title>floor1</title>
<meta charset="utf-8">
<meta http-equiv="imagetoolbar" content="no"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
Expand All @@ -20,11 +20,11 @@
<div id="map"></div>
<input id="slider" type="range" min="0" max="1" step="0.1" value="1" oninput="layer.setOpacity(this.value)">
<script type="text/javascript">
var mapExtent = [0.00000000, -694.00000000, 1864.00000000, 0.00000000];
var mapExtent = [0.00000000, -900.00000000, 2332.00000000, 0.00000000];
var mapMinZoom = 0;
var mapMaxZoom = 3;
var mapMaxZoom = 4;
var mapMaxResolution = 1.00000000;
var tileExtent = [0.00000000, -694.00000000, 1864.00000000, 0.00000000];
var tileExtent = [0.00000000, -900.00000000, 2332.00000000, 0.00000000];

var mapResolutions = [];
for (var z = 0; z <= mapMaxZoom; z++) {
Expand All @@ -39,7 +39,7 @@

var layer = new ol.layer.Tile({
source: new ol.source.XYZ({
attributions: 'grainger1; Rendered with <a href="https://www.maptiler.com/desktop/">MapTiler Desktop</a>',
attributions: 'floor1; Rendered with <a href="https://www.maptiler.com/desktop/">MapTiler Desktop</a>',
projection: 'PIXELS',
tileGrid: mapTileGrid,
tilePixelRatio: 1.00000000,
Expand Down
Loading

0 comments on commit 9f7eab1

Please sign in to comment.