GMap Localizing the Map and DrawingManager

View this example full screen.

JavaScript of GMap Localizing the Map and DrawingManager

/* Languages mapping:  ( CoString Language : GMap language )
** cht : zh-TW
** chs : zh-CN
** en  : en
*/
function initialize()
{
    var oPos = new google.maps.LatLng(24.880650, 121.065427);

    //@ Map/Canvas
    var oMapOptions = {
        coStrType: zhupiter.CoStr.CoStrType.GMAP,
        coStrLang: 'chs',
        center: oPos,
        zoom: 12
    };
    var oCoStrMap = new zhupiter.CoStr.Map(document.getElementById('map_canvas'), oMapOptions);

    //@ DrawingManager
    var oDmOptions = {
        coStrDmDiv: document.getElementById('drawing_manager'),
        //@ The Map coStrLang setting will be used if the coStrLang property is not given here.
        //coStrLang: 'chs',
        coStrMap: oCoStrMap
    };
    var oCoStrDm = new zhupiter.CoStr.drawing.DrawingManager(oDmOptions);

    var oInfoWindow = new zhupiter.CoStr.InfoWindow({
        //@ The Map coStrLang setting will be used if the coStrLang property is not given here.
        //coStrLang: 'chs',
        coStrMap: oCoStrMap,
        position: oPos,
        content: 'Hello World!'
    });
}

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

JavaScript + HTML of GMap Localizing the Map and DrawingManager

<!DOCTYPE html>
<html>
    <head>
        <meta name='viewport' content='initial-scale=1.0, user-scalable=no'>
        <meta charset='utf-8'>
        <title>GMap Localizing the Map and DrawingManager</title>
        <style>
        html, body, #map_canvas {
        height: 100%;
        margin: 0px;
        padding: 0px
        }
        </style>
        <script src='https://maps.googleapis.com/maps/api/js?libraries=drawing&language=zh-CN'></script>
        <script src='http://costr.zhupiter.com/js/?libraries=drawing'></script>
        <script>
/* Languages mapping:  ( CoString Language : GMap language )
** cht : zh-TW
** chs : zh-CN
** en  : en
*/
function initialize()
{
    var oPos = new google.maps.LatLng(24.880650, 121.065427);

    //@ Map/Canvas
    var oMapOptions = {
        coStrType: zhupiter.CoStr.CoStrType.GMAP,
        coStrLang: 'chs',
        center: oPos,
        zoom: 12
    };
    var oCoStrMap = new zhupiter.CoStr.Map(document.getElementById('map_canvas'), oMapOptions);

    //@ DrawingManager
    var oDmOptions = {
        coStrDmDiv: document.getElementById('drawing_manager'),
        //@ The Map coStrLang setting will be used if the coStrLang property is not given here.
        //coStrLang: 'chs',
        coStrMap: oCoStrMap
    };
    var oCoStrDm = new zhupiter.CoStr.drawing.DrawingManager(oDmOptions);

    var oInfoWindow = new zhupiter.CoStr.InfoWindow({
        //@ The Map coStrLang setting will be used if the coStrLang property is not given here.
        //coStrLang: 'chs',
        coStrMap: oCoStrMap,
        position: oPos,
        content: 'Hello World!'
    });
}

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

CoString | Donate bitcoin: 1LX5KC19tXCPK8y72Z6LVoZjoSaCp9P6K