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

Set map maxZoom for FaoInstitute (lack of detail in source data)

parent 9d4a7035
...@@ -128,7 +128,8 @@ ...@@ -128,7 +128,8 @@
<c:if test="${faoInstitute.latitude ne null}"> <c:if test="${faoInstitute.latitude ne null}">
<script type="text/javascript"> <script type="text/javascript">
jQuery(document).ready(function() { jQuery(document).ready(function() {
var map=GoogleMaps.map("${pageContext.response.locale.language}", $("#map"), { var map=GoogleMaps.map("${pageContext.response.locale.language}", $("#map"), {
maxZoom: 6, /* WIEWS does not provide enough detail */
center: new GoogleMaps.LatLng(${faoInstitute.latitude}, ${faoInstitute.longitude}), center: new GoogleMaps.LatLng(${faoInstitute.latitude}, ${faoInstitute.longitude}),
markerTitle: "<spring:escapeBody javaScriptEscape="true">${faoInstitute.fullName}</spring:escapeBody>" markerTitle: "<spring:escapeBody javaScriptEscape="true">${faoInstitute.fullName}</spring:escapeBody>"
}); });
......
...@@ -37,6 +37,7 @@ GoogleMaps = { ...@@ -37,6 +37,7 @@ GoogleMaps = {
map: function(language, doms, mapOptions) { map: function(language, doms, mapOptions) {
var mapOpt = { var mapOpt = {
zoom: mapOptions.zoom || this.defaultOptions.zoom, zoom: mapOptions.zoom || this.defaultOptions.zoom,
maxZoom: mapOptions.maxZoom,
center: mapOptions.center || this.defaultOptions.center, center: mapOptions.center || this.defaultOptions.center,
mapTypeId: mapOptions.mapTypeId || this.defaultOptions.mapTypeId, mapTypeId: mapOptions.mapTypeId || this.defaultOptions.mapTypeId,
markerTitle: mapOptions.markerTitle || null, markerTitle: mapOptions.markerTitle || null,
......
Markdown is supported
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