Browse Source

Переключение работы карты пользователей на LocationCoordinate #16

pull/28/head
Gitea 3 years ago
parent
commit
f3340f9234
  1. 11
      templates/map/umap.tmpl

11
templates/map/umap.tmpl

@ -2821,7 +2821,9 @@
var addressPoints = [
{{range .Users}}
[parseFloat({{.Location}}.split(',')[0]) , parseFloat({{.Location}}.split(',')[1]), "{{avatar .}} {{.HomeLink}} {{.FullName}} {{.Description}}"],
{{if .LocationCoordinate}}
[parseFloat({{.LocationCoordinate}}.split(',')[0]) , parseFloat({{.LocationCoordinate}}.split(',')[1]), "{{avatar .}} {{.HomeLink}} {{.FullName}} {{.Description}}"],
{{end}}
{{else}}
{{end}}
@ -2831,16 +2833,15 @@
<div id="map"></div>
<span>Mouse over a cluster to see the bounds of its children and click a cluster to zoom to those bounds</span>
<script type="text/javascript">
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
maxZoom: 16,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Points &copy 2012 LINZ'
}),
latlng = L.latLng(-37.89, 175.46);
latlng = L.latLng(55.4, 37.3);
var map = L.map('map', {center: latlng, zoom: 13, layers: [tiles]});
var map = L.map('map', {center: latlng, zoom: 5, layers: [tiles]});
var markers = L.markerClusterGroup({ chunkedLoading: true });

Loading…
Cancel
Save