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 = '1536393';
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 = {
bounds: layer.getBounds(),
mapTypeId : mapTypeIds[ 0 ],
mapTypeControlOptions : { mapTypeIds: mapTypeIds },
oa: { maplibre: false }
};
var map = oamaps.map( mapDiv, mapConfig );
// add GeomLayer to map
layer.setMap( map );
}
}