Commit ba71db05 authored by Matija Obreza's avatar Matija Obreza
Browse files

Merge branch 'master' into staging

# Conflicts:
#	.project
#	src/main/java/org/genesys2/server/service/impl/UserServiceImpl.java
#	src/main/java/org/genesys2/server/servlet/controller/UserProfileController.java
#	src/main/java/org/genesys2/server/servlet/controller/rest/UsersController.java
#	src/main/webapp/WEB-INF/jsp/accession/map.jsp
parents 2ac7d55f 79ac654a
...@@ -559,10 +559,6 @@ public class BatchRESTServiceImpl implements BatchRESTService { ...@@ -559,10 +559,6 @@ public class BatchRESTServiceImpl implements BatchRESTService {
private boolean updateCrop(Accession accession, JsonNode value) throws RESTApiDataTypeException { private boolean updateCrop(Accession accession, JsonNode value) throws RESTApiDataTypeException {
if (value != null) { if (value != null) {
if (!value.isTextual()) {
throw new RESTApiDataTypeException("cropName must be a String");
}
if (value.isNull()) { if (value.isNull()) {
if (!StringUtils.equals(null, accession.getCropName())) { if (!StringUtils.equals(null, accession.getCropName())) {
accession.setCropName(null); accession.setCropName(null);
...@@ -571,6 +567,10 @@ public class BatchRESTServiceImpl implements BatchRESTService { ...@@ -571,6 +567,10 @@ public class BatchRESTServiceImpl implements BatchRESTService {
} }
} }
if (!value.isTextual()) {
throw new RESTApiDataTypeException("cropName must be a String");
}
final String cropName = value.textValue().trim(); final String cropName = value.textValue().trim();
if (!StringUtils.equals(cropName, accession.getCropName())) { if (!StringUtils.equals(cropName, accession.getCropName())) {
accession.setCropName(cropName); accession.setCropName(cropName);
......
...@@ -763,11 +763,9 @@ ...@@ -763,11 +763,9 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(document).ready(function() { jQuery(document).ready(function() {
var map = L.map('map').setView([${accessionGeo.latitude}, ${accessionGeo.longitude}], 2); var map = L.map('map').setView([${accessionGeo.latitude}, ${accessionGeo.longitude}], 2);
L.tileLayer('https://otile{s}-s.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', { L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}', {
attribution: "MapQuest", attribution: 'Tiles &copy; Esri &mdash; Esri, DeLorme, NAVTEQ',
styleId: 22677, maxZoom: 16
subdomains: ['1','2','3','4'],
opacity: 0.6
}).addTo(map); }).addTo(map);
var marker = L.marker([${accessionGeo.latitude}, ${accessionGeo.longitude}]).addTo(map); var marker = L.marker([${accessionGeo.latitude}, ${accessionGeo.longitude}]).addTo(map);
}); });
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li> <li>
<label class="label-map-provider"><input class="map-provider" value="mapQuest" name="provider" style='margin-right: 10px;margin-left: 5px' <!-- <label class="label-map-provider"><input class="map-provider" value="mapQuest" name="provider" style='margin-right: 10px;margin-left: 5px'
type='radio'>MapQuest</label> type='radio'>MapQuest</label> -->
<label class="label-map-provider"><input name="provider" value="openstreetmap" class="map-provider" style='margin-right: 10px;margin-left: 5px' <label class="label-map-provider"><input name="provider" value="openstreetmap" class="map-provider" style='margin-right: 10px;margin-left: 5px'
type='radio'>Openstreetmap</label> type='radio'>Openstreetmap</label>
<label class="label-map-provider"><input name="provider" value="esriGray" class="map-provider" style='margin-right: 10px;margin-left: 5px' <label class="label-map-provider"><input name="provider" value="esriGray" class="map-provider" style='margin-right: 10px;margin-left: 5px'
...@@ -133,12 +133,12 @@ ...@@ -133,12 +133,12 @@
maxZoom: 19, maxZoom: 19,
attribution: 'Imagery from <a target="_blank" href="http://giscience.uni-hd.de/">GIScience Research Group, University of Heidelberg</a>, Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>' attribution: 'Imagery from <a target="_blank" href="http://giscience.uni-hd.de/">GIScience Research Group, University of Heidelberg</a>, Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}),*/ }),*/
mapQuest: L.tileLayer('https://otile{s}-s.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', { /* mapQuest: L.tileLayer('https://otile{s}-s.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', {
attribution: "MapQuest", attribution: "MapQuest",
styleId: 22677, styleId: 22677,
subdomains: ['1', '2', '3', '4'], subdomains: ['1', '2', '3', '4'],
opacity: 0.6 opacity: 0.6
}), }),*/
esriGray: L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}', { esriGray: L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}', {
attribution: 'Tiles &copy; Esri &mdash; Esri, DeLorme, NAVTEQ', attribution: 'Tiles &copy; Esri &mdash; Esri, DeLorme, NAVTEQ',
maxZoom: 16 maxZoom: 16
...@@ -215,9 +215,9 @@ ...@@ -215,9 +215,9 @@
topPane.appendChild(mapProviders[cookieUtils.getCookie('mapProviders')].getContainer()); topPane.appendChild(mapProviders[cookieUtils.getCookie('mapProviders')].getContainer());
mapProviders[cookieUtils.getCookie('mapProviders')].setZIndex(0); mapProviders[cookieUtils.getCookie('mapProviders')].setZIndex(0);
} else { } else {
mapProviders.mapQuest.addTo(map); mapProviders.esriGray.addTo(map);
topPane.appendChild(mapProviders[cookieUtils.getCookie('mapProviders')].getContainer()); topPane.appendChild(mapProviders[cookieUtils.getCookie('mapProviders')].getContainer());
mapProviders.mapQuest.setZIndex(0); mapProviders.esriGray.setZIndex(0);
} }
}); });
......
...@@ -205,21 +205,6 @@ ...@@ -205,21 +205,6 @@
messages: { noResults: '', results: function() {} }, messages: { noResults: '', results: function() {} },
select: function(event, ui) { document.location.pathname='/acn/t/'+ui.item.value; } }); select: function(event, ui) { document.location.pathname='/acn/t/'+ui.item.value; } });
}); });
/* var map = L.map('globalmap', {minZoom:2, maxZoom:2, dragging:false, zoomControl:false, keyboard:false}).setView([20,0], 2);
L.tileLayer('https://otile{s}-s.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', {
attribution: "MapQuest",
styleId: 22677,
noWrap: true,
subdomains: ['1','2','3','4'],
opacity: 0.6
}).addTo(map);
L.tileLayer("{s}/explore/tile/{z}/{x}/{y}?filter={}", {
attribution: "<a href='${props.baseUrl}'>Genesys</a>",
styleId: 22677,
noWrap: true,
subdomains: [${props.tileserverCdn}]
}).addTo(map); */
}); });
</script> </script>
</content> </content>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment