Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
Revert "add satellite baseLayer and fix layer-switcher position"
Browse files Browse the repository at this point in the history
This reverts commit 9002c95.
  • Loading branch information
hisham waleed karam committed Jul 1, 2017
1 parent 9a8d5ea commit 5153187
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 59 deletions.
16 changes: 3 additions & 13 deletions src/components/geonode.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ global.enMessages = enMessages;

import Save from './save';
import MapUrlLink from '../containers/MapUrlLink';
import {getLocalGeoServer, createThumbnail} from '../services/geonode';
import {getLocalGeoServer,createThumbnail} from '../services/geonode';
import {getCRSFToken} from '../helper';

import '../css/app.css'
Expand Down Expand Up @@ -55,7 +55,7 @@ var map = new ol.Map({
})
});
window.setThumbnail = function(obj_id) {
createThumbnail(obj_id, map)
createThumbnail(obj_id,map)
}

class GeoNodeViewer extends React.Component {
Expand Down Expand Up @@ -87,16 +87,7 @@ class GeoNodeViewer extends React.Component {
}
updateMap(props) {
if (props.config) {
var tileServices = [
{
name: 'Satellite',
description: 'ESRI world imagery',
endpoint: 'http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
standard: 'XYZ',
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community',
thumbnail: 'http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/0/0/0'
}
];
var tileServices = [];
var errors = [];
var filteredErrors = [];
if (props.zoomToLayer && props.config.map.layers[props.config.map.layers.length - 1].bbox) {
Expand Down Expand Up @@ -167,7 +158,6 @@ class GeoNodeViewer extends React.Component {
mapUrl = (<MapUrlLink/>);
}
}
console.log(this.state);
return (
<div id='content'>
{error}
Expand Down
60 changes: 14 additions & 46 deletions src/css/app.css
Original file line number Diff line number Diff line change
@@ -1,139 +1,107 @@
html {
font-family: 'Roboto', sans-serif;
}

html, body {
height: 100%;
padding: 0;
margin: 0;
}


/* Dead Simple Grid (c) 2015 Vladimir Agafonkin */

.row .row {
margin: 0 -1.5em;
}

.col {
padding: 0 0em;
}
.row .row { margin: 0 -1.5em; }
.col { padding: 0 0em; }

.row:after {
content: "";
clear: both;
display: table;
content: "";
clear: both;
display: table;
}

@media only screen {
.col {
@media only screen { .col {
float: left;
width: 100%;
box-sizing: border-box;
}
}


}}
/* end Dead Simple Grid */

#map {
width: 100%;
height: 100%;
}

#content, #main {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
}

#zoom-buttons {
margin-left: 20px;
position: absolute;
top: 20px;
}

.layer-list {
top: 74px !important;
}

#rotate-button {
top: 366px;
left: 20px;
position: absolute;
}

#home-button {
margin-left: 20px;
position: absolute;
top: 134px;
}

#print-button {
position: absolute;
margin-left: 20px;
top: 244px;
}

#save-button {
position: absolute;
margin-left: 20px;
top: 310px;
}

#globe-button {
position: absolute;
margin-left: 20px;
top: 189px;
}

.layer-switcher {
top: 20px !important;
right: 20px;
position: absolute;
}

.layer-tree-panel {
max-height: 94vh !important;
}

.map-url-wrapper {
position: absolute;
position: absolute;
top: 0;
width: 50%;
left: 25%;
height: 25px;
height: 25px;
text-align: center;
}

.map-url-wrapper.hide {
display: none;
display: none;
}

.map-url-wrapper a {
padding: 10px;
color: #fff;
font-size: 0.8em;
padding: 10px;
color: #fff;
font-size: 0.8em;
}

#debug {
position: absolute;
top: 0;
left: 25%;
z-index: 10;
background: rgba(204, 204, 204, 0.8);
background: rgba(204,204,204, 0.8);
width: 50%;
height: 30px;
padding: 10px;
text-align: center;
}

#debug label {
margin-right: 10px;
}

#debug input {
width: 50%;
}

0 comments on commit 5153187

Please sign in to comment.