, Ra, ? , google /.
, , , ctrl :
β http://jsfiddle.net/FbGa5/
. iframe, ctrl .
ctrl:
var selecting = false,
selectedMarkers = [];
window.onkeydown = function(e) {
selecting = ((e.keyIdentifier == 'Control') || (e.ctrlKey == true));
}
window.onkeyup = function(e) {
selecting = false;
}
, ctrl , . , , , :
google.maps.event.addListener(marker, 'click', function() {
if (!selecting) return;
var id = this.id;
var index = selectedMarkers.indexOf(id);
if (index>-1) {
this.setIcon('https://maps.gstatic.com/mapfiles/ms2/micons/red-dot.png');
selectedMarkers.splice(index, 1);
} else {
selectedMarkers.push(id);
this.setIcon('https://maps.gstatic.com/mapfiles/ms2/micons/blue-dot.png');
}
});
: Ra , .