JSFiddle - React, Tailwind, and code Playground

by Ömür Bilgili

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.4/ol.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.4/ol.css" rel="stylesheet">
<div id="map" class="map">

</div>

JavaScript

var map = new ol.Map({
        layers: [
          new ol.layer.Tile({
        'title': 'Google Maps Uydu',
        'type': 'base',
         visible: true,
        'opacity': 1.000000,
         source: new ol.source.XYZ({
         attributions: [new ol.Attribution({ html: '<a href=""></a>' })],
         url: 'http://mt0.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}&s=Ga'
         })
})
        ],
        target: 'map',
        view: new ol.View({
          center: [0, 0],
          zoom: 2
        })
      });