Skip to content

Instantly share code, notes, and snippets.

@teomanofficial
Created November 24, 2023 21:07
Show Gist options
  • Save teomanofficial/4951c1e369eb09ed7ac2dd72a946df3f to your computer and use it in GitHub Desktop.
Save teomanofficial/4951c1e369eb09ed7ac2dd72a946df3f to your computer and use it in GitHub Desktop.
Openlayers Nasıl Kullanılır ?
import Map from 'ol/Map';
import View from 'ol/View';
import TileLayer from 'ol/layer/Tile';
import XYZ from 'ol/source/XYZ';
const map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new XYZ({
url: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png'
})
})
],
view: new View({
center: [0, 0],
zoom: 2
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment