Pushed static maps retrieval to backend
This commit is contained in:
@@ -414,13 +414,12 @@ function getPost(asPost) {
|
||||
}
|
||||
|
||||
function getStaticMapUrl(oCenterLat, oCenterLng) {
|
||||
var asParams = [
|
||||
'https://api.mapbox.com/v4/mapbox.satellite', //Domain
|
||||
'url-http%3A%2F%2Fspot.lutran.fr%2Fimages%2Ffootprint.png('+oCenterLng+','+oCenterLat+')', //Marker
|
||||
oCenterLng+','+oCenterLat+',13', //Center + zoom
|
||||
'400x300.png?access_token='+self.vars('mapbox_key') //Image size + access token
|
||||
];
|
||||
|
||||
return asParams.join('/');
|
||||
return '?'+$.param({
|
||||
'a': 'tile',
|
||||
'id': 'static',
|
||||
'z': 13,
|
||||
'x': oCenterLng,
|
||||
'y': oCenterLat
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user