Created
November 24, 2023 21:07
-
-
Save teomanofficial/4951c1e369eb09ed7ac2dd72a946df3f to your computer and use it in GitHub Desktop.
Openlayers Nasıl Kullanılır ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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