use new geo server for tiles
This commit is contained in:
@@ -48,7 +48,7 @@ function initPage(asHash) {
|
||||
self.tmp('mobile', $('#mobile').is(':visible'));
|
||||
self.tmp('feed_width', self.tmp('mobile')?0:$('#feed').outerWidth(true));
|
||||
self.tmp('map_offset', -1 * self.tmp('feed_width') / $('body').outerWidth(true));
|
||||
self.tmp('tile_api', '?a=tile&id={id}&z={z}&x={x}&y={y}');
|
||||
self.tmp('tile_api', getWmtsApiUrl('{id}', '{y}', '{x}', '{z}'));
|
||||
self.tmp('markers', 'object');
|
||||
self.tmp('marker_size', {width: 32, height: 32});
|
||||
|
||||
@@ -434,7 +434,7 @@ function getPost(asPost) {
|
||||
.append($('<p>').addIcon('fa-coords', true).append(asPost.lat_dms+' '+asPost.lon_dms))
|
||||
.append($('<p>').addIcon('fa-time', true).append(sAbsTime+self.tmp('site_tz_notice')))
|
||||
.append(
|
||||
$('<img>', {'class':'staticmap', title: 'Click pour zoomer', src: getStaticMapUrl(asPost.latitude, asPost.longitude)})
|
||||
$('<img>', {'class':'staticmap', title: 'Click pour zoomer', src: getWmtsApiUrl('static', asPost.latitude, asPost.longitude, 13)})
|
||||
.click(function(){
|
||||
var oMarker = oSpot.tmp(['markers', $(this).parent().data('id')]);
|
||||
self.tmp('map').setOffsetView(self.tmp('map_offset'), oMarker.getLatLng(), 13);
|
||||
@@ -483,13 +483,7 @@ function getPost(asPost) {
|
||||
return $Post;
|
||||
}
|
||||
|
||||
function getStaticMapUrl(oCenterLat, oCenterLng) {
|
||||
return '?'+$.param({
|
||||
'a': 'tile',
|
||||
'id': 'static',
|
||||
'z': 13,
|
||||
'x': oCenterLng,
|
||||
'y': oCenterLat
|
||||
});
|
||||
function getWmtsApiUrl(sMapId, iLat, iLng, iZoom) {
|
||||
return self.consts.geo_server+'/?a=tile&id='+sMapId+'&z='+iZoom+'&x='+iLng+'&y='+iLat;
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user