Поправил карту в фотораме

This commit is contained in:
Krivchikov Dmitry 2015-01-26 15:22:54 +03:00
parent 3adac2d50d
commit ff83fced0a
2 changed files with 10 additions and 9 deletions

View File

@ -38,21 +38,17 @@
<tr>
<td width="33%"></td>
<td width="34%">
<div class="fotorama" data-maxwidth="555" data-loop="true">
<div class="fotorama" data-width="534" data-height="400" data-loop="true">
<?php if ($point->img): ?>
<a href="<?= $point->img ?>">
<img src="<?= $point->img ?>" />
</a>
<img data-thumb="<?= $point->img ?>" src="<?= $point->img ?>">
<?php endif; ?>
<?php if ($photos): ?>
<?php foreach ($photos as $photo): ?>
<a href="/photos/middle/<?= $photo->name ?>">
<img src="/photos/small/<?= $photo->name ?>">
</a>
<img data-thumb="/photos/small/<?= $photo->name ?>" src="/photos/middle/<?= $photo->name ?>">
<?php endforeach; ?>
<?php endif; ?>
<span>
<div id="map" style="width: 100%; height: 100%; position: relative; display: inline-block;"></div>
<div id="map" style="width: 100%; height: 100%; position: static; display: block;"></div>
</span>
</div>
</td>

View File

@ -90,8 +90,13 @@ function initPoints()
url: "/json/points/",
success: function (data) {
for (var k in data) {
if (k == pointId) {
constructPoint(data[k]);
points[k].addTo(myMap);
} else {
markers.addLayer(constructPoint(data[k]));
}
}
myMap.addLayer(markers);
}
});