Projekt

Obecné

Profil

« Předchozí | Další » 

Revize a9be340b

Přidáno uživatelem Ondřej Fibich před více než 5 roky(ů)

Issue #1113: Fix display of address point map in popup

Zobrazit rozdíly:

application/views/js/address_points_show.php
<?php
/**
* Map in address point detail.
* Map in address point detail, coordinate loaded from data attributes.
*
* @author Ondřej Fibich
*/
......
if (FALSE): ?><script type="text/javascript"><?php endif
?>
window.mapycz_addr = function (divId, gpsx, gpsy)
$(document).ready(function ()
{
var center = SMap.Coords.fromWGS84(gpsy, gpsx);
var m = new SMap(JAK.gel(divId), center, 17);
m.addDefaultLayer(SMap.DEF_OPHOTO);
m.addDefaultLayer(SMap.DEF_BASE).enable();
function mapycz_addr(divId, gpsx, gpsy)
{
var center = SMap.Coords.fromWGS84(gpsy, gpsx);
var m = new SMap(JAK.gel(divId), center, 17);
m.addDefaultLayer(SMap.DEF_OPHOTO);
m.addDefaultLayer(SMap.DEF_BASE).enable();
var layerSwitch = new SMap.Control.Layer();
layerSwitch.addDefaultLayer(SMap.DEF_BASE);
layerSwitch.addDefaultLayer(SMap.DEF_OPHOTO);
m.addControl(layerSwitch, {left: "8px", top: "9px"});
m.addControl(new SMap.Control.Sync());
m.addDefaultControls();
var layerSwitch = new SMap.Control.Layer();
layerSwitch.addDefaultLayer(SMap.DEF_BASE);
layerSwitch.addDefaultLayer(SMap.DEF_OPHOTO);
m.addControl(layerSwitch, {left: "8px", top: "9px"});
m.addDefaultControls();
var markerLayer = new SMap.Layer.Marker();
markerLayer.addMarker(new SMap.Marker(center, "myMarker", {}));
m.addLayer(markerLayer);
markerLayer.enable();
};
var markerLayer = new SMap.Layer.Marker();
markerLayer.addMarker(new SMap.Marker(center, "myMarker", {}));
m.addLayer(markerLayer);
markerLayer.enable();
};
var $map = $('#ap_gmap');
mapycz_addr('ap_gmap', $map.data('gpsx'), $map.data('gpsy'));
});

Také k dispozici: Unified diff