я получаю следующее сообщение об ошибкеНеожиданный токен оператор «=», как ожидается Punc «»
Parse error: Unexpected token operator «=», expected punc «,» Line 159, column 26
Это мой код
function fitBounds(type="all", shape=null) {
var bounds = new google.maps.LatLngBounds();
if (type == "all"){
if ((circles.length > 0) | (polygons.length > 0)){
$.each(circles, function(index, circle){
bounds.union(circle.getBounds());
});
$.each(polygons, function(index, polygon){
polygon.getPath().getArray().forEach(function(latLng){
bounds.extend(latLng);
});
});
}
}
else if ((type == "single") && (shape != null)) {
if (shape.type == google.maps.drawing.OverlayType.MARKER) {
marker_index = markers.indexOf(shape);
bounds.union(circles[marker_index].getBounds());
}
else {
shape.getPath().getArray().forEach(function(latLng){
bounds.extend(latLng);
});
}
}
if (bounds.isEmpty() != true)
{
map.fitBounds(bounds);
}
}
Где находится 159 строк? PS: Это действительно плохо спрошенный вопрос у кого-то из вашего представителя ... – AxelH