Маленькие точки-маркеры на маршруте v2
This commit is contained in:
parent
18bcf9e80f
commit
8df0cf677a
|
|
@ -27,8 +27,10 @@ function buildRoute(fit)
|
|||
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 (typeof points[costomPointName] == 'undefined') {
|
||||
points[costomPointName] = L.marker([lat, lng], {icon: categories.simplepoint, title: 'Произвольная точка'});
|
||||
markers.addLayer(points[costomPointName]);
|
||||
}
|
||||
}
|
||||
|
||||
if (i == 0)
|
||||
|
|
@ -172,7 +174,8 @@ function addToRoute(id, build)
|
|||
e = (id[1]>=0) ? 'E'+id[1] : 'W'+Math.abs(id[1]);
|
||||
|
||||
coordsName = n.substring(0,10)+'° '+e.substring(0,10)+'°';
|
||||
$('#wayPoints').append('<div pointid="'+JSON.stringify(id)+'" class="wayPoint"><span class="del" onclick="$(this).parent().remove();buildRoute();">×</span> '+coordsName+'</div>');
|
||||
costomPointName = 'c_'+id[0]+'_'+id[1];
|
||||
$('#wayPoints').append('<div pointid="'+JSON.stringify(id)+'" class="wayPoint"><span class="del" onclick="$(this).parent().remove();myMap.removeLayer(points[\''+costomPointName+'\']);buildRoute();">×</span> '+coordsName+'</div>');
|
||||
closePopup();
|
||||
openBox('Route', true);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue