Другой ответ
document.addEventListener("DOMContentLoaded", function() {
setInterval(function() {
var form = document.getElementById('form') || document.querySelector('form[name="userprofile"]');
var json = Array.from(new FormData(form)).map(function(e,i) {this[e[0]]=e[1]; return this;}.bind({}))[0];
console.log(json)
document.querySelector('#asJSON').value = JSON.stringify(json);
}, 1000);
})
JSON:
FormData: https://developer.mozilla.org/en-US / документы / Web / API / FormData
Для этого вы можете использовать includeCoordinate. Он будет соответствовать всем координатам в границах.
var bounds = GMSCoordinateBounds()
bounds = bounds.includingCoordinate(source)
bounds = bounds.includingCoordinate(destination)
self.mapView.animate(with: GMSCameraUpdate.fit(bounds, withPadding: 10.0))
Обновлено!
let bounds = GMSCoordinateBounds(coordinate: source, coordinate: destination)
self.mapView.animate(with: GMSCameraUpdate.fit(bounds, withPadding: 100))
mapView.padding = UIEdgeInsets(top: 0, left: 0, bottom: self.bottomView.height, right: 0)
mapView.padding = UIEdgeInsets(top: 0, left: 0, bottom: self.bottomView.height, right: 0)
– Samet MACİT 19 July 2018 в 09:02