Маленькие точки-маркеры на маршруте

This commit is contained in:
Krivchikov Dmitry 2015-05-27 20:44:52 +03:00
parent 7492569d4b
commit 18bcf9e80f
2 changed files with 11 additions and 1 deletions

View File

@ -29,6 +29,13 @@ categories.lock = L.icon({
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)
{
console.log(data);
id = data['id'];
icon = categories[data['categoryId']];

View File

@ -25,6 +25,10 @@ function buildRoute(fit)
lng = coords[1];
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)