Маленькие точки-маркеры на маршруте
This commit is contained in:
parent
7492569d4b
commit
18bcf9e80f
|
|
@ -29,6 +29,13 @@ categories.lock = L.icon({
|
||||||
popupAnchor: [0, 1]
|
popupAnchor: [0, 1]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
categories.simplepoint = L.icon({
|
||||||
|
iconUrl: '/ico/simplepoint.png',
|
||||||
|
iconSize: [13, 13],
|
||||||
|
iconAnchor: [7, 7],
|
||||||
|
popupAnchor: [7, 7]
|
||||||
|
});
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -141,7 +148,6 @@ function init(lat, lng) {
|
||||||
*/
|
*/
|
||||||
function constructPoint(data)
|
function constructPoint(data)
|
||||||
{
|
{
|
||||||
console.log(data);
|
|
||||||
id = data['id'];
|
id = data['id'];
|
||||||
|
|
||||||
icon = categories[data['categoryId']];
|
icon = categories[data['categoryId']];
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,10 @@ function buildRoute(fit)
|
||||||
lng = coords[1];
|
lng = coords[1];
|
||||||
|
|
||||||
wayPoints.push({latLng: {lat: lat, lng: lng}});
|
wayPoints.push({latLng: {lat: lat, lng: lng}});
|
||||||
|
|
||||||
|
costomPointName = 'c_'+lat+'_'+lng;
|
||||||
|
points[costomPointName] = L.marker([lat, lng], {icon: categories.simplepoint, title: 'Произвольная точка'});
|
||||||
|
points[costomPointName].addTo(myMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue