2D Canvas User-editable Shapes

View this example full screen.

JavaScript of 2D Canvas User-editable Shapes

function initialize()
{
    var oMapOptions = {
        coStrType: zhupiter.CoStr.CoStrType.CANVAS2D,
        center: new zhupiter.CoStr.Point2D(214.0909703111111, 109.72328593151204),
        zoom: 15
    };
    var oCoStrMap = new zhupiter.CoStr.Map(document.getElementById('map_canvas'), oMapOptions);

    var oBounds = new zhupiter.CoStr.Bounds2D(
        new zhupiter.CoStr.Point2D(70.0909703111111, 67.72328593151204),
        new zhupiter.CoStr.Point2D(162.0909703111111, 28.723285931512038)
    );

    var oRectangle = new zhupiter.CoStr.Rectangle({
        bounds: oBounds,
        editable: true
    });

    oRectangle.setMap(oCoStrMap);
}

zhupiter.CoStr.event.addDomListener(window, 'load', initialize);

JavaScript + HTML of 2D Canvas User-editable Shapes

<!DOCTYPE html>
<html>
    <head>
        <meta name='viewport' content='initial-scale=1.0, user-scalable=no'>
        <meta charset='utf-8'>
        <title>2D Canvas User-editable Shapes</title>
        <style>
        html, body, #map_canvas {
        height: 100%;
        margin: 0px;
        padding: 0px
        }
        </style>
        <script src='http://costr.zhupiter.com/js/'></script>
        <script>
function initialize()
{
    var oMapOptions = {
        coStrType: zhupiter.CoStr.CoStrType.CANVAS2D,
        center: new zhupiter.CoStr.Point2D(214.0909703111111, 109.72328593151204),
        zoom: 15
    };
    var oCoStrMap = new zhupiter.CoStr.Map(document.getElementById('map_canvas'), oMapOptions);

    var oBounds = new zhupiter.CoStr.Bounds2D(
        new zhupiter.CoStr.Point2D(70.0909703111111, 67.72328593151204),
        new zhupiter.CoStr.Point2D(162.0909703111111, 28.723285931512038)
    );

    var oRectangle = new zhupiter.CoStr.Rectangle({
        bounds: oBounds,
        editable: true
    });

    oRectangle.setMap(oCoStrMap);
}

zhupiter.CoStr.event.addDomListener(window, 'load', initialize);
        </script>
    </head>
    <body>
        <div id='map_canvas'></div>
    </body>
</html>

CoString | Donate bitcoin: 1LX5KC19tXCPK8y72Z6LVoZjoSaCp9P6K