Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
7d8a2ce8
Commit
7d8a2ce8
authored
Mar 11, 2019
by
Emmanuel René Huchim Puc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minimap working
parent
a5cdeed8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
74 deletions
+1
-74
minimap.js
reports/static/reports/js/minimap.js
+1
-74
No files found.
reports/static/reports/js/minimap.js
View file @
7d8a2ce8
...
...
@@ -17,10 +17,7 @@ var xyz = new ol.layer.Tile({
extent
:
defaultExtent
,
source
:
new
ol
.
source
.
XYZ
({
projection
:
'EPSG:3857'
,
// url: './home/emmanuelhp/Documentos/scripts/images/test/{z}/{x}/{-y}.png',
// tileUrlFunction: function(tileCoord) {
// return '/home/emmanuelhp/Documentos/scripts/images/test/' + tileCoord[0] + '/' + tileCoord[1] + '/' + tileCoord[2] + '.png';
// },
url
:
'/static/reports/test/{z}/{x}/{-y}.png'
,
tilePixelRatio
:
2
,
minZoom
:
7
,
maxZoom
:
14
...
...
@@ -36,73 +33,3 @@ var map = new ol.Map({
zoom
:
10
})
});
// useful urls
// https://gis.stackexchange.com/questions/309115/mismatch-between-openlayers-5-and-xyz-layer-on-some-zoom-levels
// https://gis.stackexchange.com/questions/286649/displaying-tiles-generated-by-gdal2tiles-with-openlayers
// https://github.com/openlayers/openlayers/issues/3707
// function init(){
// // TODO: definir segun imagenes generadas
// var options = {
// div: "minimap",
// controls: [],
// projection: "EPSG:3857",
// displayProjection: new OpenLayers.Projection("EPSG:4326"),
// numZoomLevels: 4
// };
//
// var tmsoverlay = new OpenLayers.Layer.TMS("TMS Overlay", "",
// {
// serviceVersion: '.',
// layername: '.',
// alpha: true,
// type: 'png',
// isBaseLayer: false,
// getURL: getURL
// });
//
// if (OpenLayers.Util.alphaHack() == false) {
// tmsoverlay.setOpacity(0.6);
// }
//
// map.addLayers([mapbox]);
//
// var switcherControl = new OpenLayers.Control.LayerSwitcher();
// map.addControl(switcherControl);
// switcherControl.maximizeControl();
//
// map.zoomToExtent(mapBounds.transform(map.displayProjection, map.projection));
//
// map.addControls([
// new OpenLayers.Control.PanZoomBar(),
// new OpenLayers.Control.Navigation(),
// new OpenLayers.Control.MousePosition(),
// new OpenLayers.Control.ArgParser(),
// new OpenLayers.Control.Attribution()
// ]);
// }
//
//
// function getURL(bounds) {
// bounds = this.adjustBounds(bounds);
// var res = this.getServerResolution();
// var x = Math.round((bounds.left - this.tileOrigin.lon) / (res * this.tileSize.w));
// var y = Math.round((bounds.bottom - this.tileOrigin.lat) / (res * this.tileSize.h));
// var z = this.getServerZoom();
//
// var path = this.serviceVersion + "/" + this.layername + "/" + z + "/" + x + "/" + y + "." + this.type;
// var url = this.url;
// if (OpenLayers.Util.isArray(url)) {
// url = this.selectUrl(path, url);
// }
// if (mapBounds.intersectsBounds(bounds) && (z >= mapMinZoom) && (z <= mapMaxZoom)) {
// return url + path;
// } else {
// return emptyTileURL;
// }
// }
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment