From 18bcf9e80f856dcf3667e7e846eaf6c5ff746db8 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Wed, 27 May 2015 20:44:52 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B0=D0=BB=D0=B5=D0=BD=D1=8C=D0=BA?= =?UTF-8?q?=D0=B8=D0=B5=20=D1=82=D0=BE=D1=87=D0=BA=D0=B8-=D0=BC=D0=B0?= =?UTF-8?q?=D1=80=D0=BA=D0=B5=D1=80=D1=8B=20=D0=BD=D0=B0=20=D0=BC=D0=B0?= =?UTF-8?q?=D1=80=D1=88=D1=80=D1=83=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/map.js | 8 +++++++- public/js/route.js | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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)