Created
March 3, 2017 16:59
-
-
Save smahood/464eaa974247ae3f382f012ed0afc082 to your computer and use it in GitHub Desktop.
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
(ns quickstart.core | |
(:require [ol.Map] | |
[ol.View] | |
[ol.proj] | |
[ol.layer.Tile]) | |
(:import [ol.source.OSM])) | |
(def my-center (ol.proj/fromLonLat #js [37.41 8.82])) | |
(def my-view (ol.View. #js{:center my-center | |
:zoom 4})) | |
(def my-source (ol.source.OSM.)) | |
(def my-tile (ol.layer.Tile. #js {:source my-source})) | |
(def my-layers #js [my-tile]) | |
(def my-map (ol.Map. #js {:target "map" | |
:layers my-layers | |
:view my-view})) | |
(def my-map (ol.Map. #js {:target "map" | |
:layers #js [(ol.layer.Tile. #js {:source (ol.source.OSM.)})] | |
:view (ol.View. #js {:center (ol.proj/fromLonLat #js [37.41 8.82]) | |
:zoom 4})})) | |
;; Error message - Uncaught TypeError: ol.source.OSM is not a constructor at core.js:10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment