sameer-shelavale/blitz-gmap-editor — pull request #3 by majerski (2014-04-29 11:25:08+00:00)
Title: Some changes & updates

When you have many instances of BlitzMap the overlays from all instances are put together in mapOverlays array. I created a function replaceOverlays() to replace mapOverlays array with array of overlays from single map. Its useful when you want to get overlays from one map. I use it in forum when first instance is executed in topic and second instance is executed in reply form.

First instance:
BlitzMap.setMap('map_canvas1',false,'mapData1'); // map not editable `read mode`
Second:
BlitzMap.setMap('map_canvas2',true,'mapData2'); // map editable `write mode`

Ajax call:
$.ajax({
beforeSend:function(){
BlitzMap.replaceOverlays( 'map_canvas2' );
BlitzMap.toJSONString();
}
});