JSFiddle - React, Tailwind, and code Playground
by baradzed
HTML
<script src="http://api-maps.yandex.ru/2.1/?lang=ru_RU" type="text/javascript"></script>
<div id="map"></div>
CSS
body {
height: 100%;
}
#map {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
JavaScript
var ymap;
ymaps.ready(function(){
ymap = new ymaps.Map ("map", {
center: [41.01771, 28.968484],
zoom: 10,
controls: ['zoomControl', 'typeSelector',
'geolocationControl', 'trafficControl',
'fullscreenControl']
});
ymaps.route([
'Maltepe',
'Kartal'
]).then(function (route){
ymap.geoObjects.add(route);
}, function(error){
alert("Ошибка. " + error.status +
":" + error.message);
}
);
});