diff --git a/public/js/map.js b/public/js/map.js index b2a7291..e186a0b 100644 --- a/public/js/map.js +++ b/public/js/map.js @@ -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']]; diff --git a/public/js/route.js b/public/js/route.js index 5586d84..161830f 100644 --- a/public/js/route.js +++ b/public/js/route.js @@ -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)