function applyLayerBoundsFromDoc(layer, document)
{
    var bounds = getLayerShapeForDoc(document);

    if(document.layerType === "circle" )
    {
        layer.setLatLng(bounds[0]);
        layer.setRadius(bounds[1]);
    }

    if(document.layerType === "rectangle")
    {
        layer.setBounds(bounds);
    }

    if(document.layerType === "polygon")
    {
        layer.setLatLngs(bounds);
    }
}
// applies bounds properties to circle rectangle and polygon types
applies bounds properties to circle rectangle and polygon types
applies bounds properties to circle rectangle and polygon types
function applyLayerBoundsFromDoc(layer, document)
{
    var bounds = getLayerShapeForDoc(document);
    if(document.layerType === "circle" )
    {
        layer.setLatLng(bounds[0]);
        layer.setRadius(bounds[1]);
    }
    if(document.layerType === "rectangle")
    {
        layer.setBounds(bounds);
    }
    if(document.layerType === "polygon")
    {
        layer.setLatLngs(bounds);
    }
}
function applyLayerBoundsFromDoc ( layer , document ) { var bounds = getLayerShapeForDoc ( document ) ; if ( document . layerType === "circle" ) { layer . setLatLng ( bounds [ 0 ] ) ; layer . setRadius ( bounds [ 1 ] ) ; } if ( document . layerType === "rectangle" ) { layer . setBounds ( bounds ) ; } if ( document . layerType === "polygon" ) { layer . setLatLngs ( bounds ) ; } }
applies bounds properties to circle rectangle and polygon types
applies bounds properties to circle rectangle and polygon types