Find more Examples here

Single Tour: Interactive Elevation Profile (Map-API)

Version reduced to minimal set of HTML Read Example Description


Description

The GeomLayer allows to easyily add the interactive elevation profile to a page.

oax.api.maps( initOAX );

function initOAX( oamaps, gm ) {

    // a single tour
    var content = '1399200';

    var layerConfig = {
	markersActive : true,
	defaultIW : true
    };

    // initialize GeomLayer
    layer = new oamaps.GeomLayer( content, layerConfig );

    layer.whenLoaded( initMap );

    function initMap() {

        var mapDiv = document.getElementById( "map_canvas" );

        var mapTypeIds = ['oa_map', 'oa_topo', 'oa_map_winter'];

        var mapConfig = {
            center :  new gm.LatLng( 47.54687, 10.2928 ),
            zoom : 10,
            bounds: layer.getBounds(),
            mapTypeId : mapTypeIds[ 0 ],
            mapTypeControlOptions : { mapTypeIds: mapTypeIds }
        };

        var map = oamaps.map( mapDiv, mapConfig );
    
        // add GeomLayer to map
        layer.setMap( map );

    }

}