Comments (1)
See README: OfflineMap returns a promise, not a map directly. Try this:
var map = new mapboxgl.Map({
container: 'map',
style: 'styles/osm-bright/style-offline.json',
center: [2.15, 41.38],
zoom: 8
}).then(function(map) {
var marker = new mapboxgl.Marker()
.setLngLat([2.15, 41.38])
.addTo(map);
})
from mapbox-gl-cordova-offline.
Related Issues (20)
- Missing street names over z14? HOT 2
- JHelp with Layers
- Check if cordova plugin file is installed
- Build fails on node 10.5.0, windows HOT 2
- Possibility to load multiple paths for mbtiles in sources HOT 1
- Draggable Marker not moving HOT 7
- FileError 5 on Android 9 HOT 1
- Remove custom mapbox dependency and update it to the last version that works
- MBTiles Problem HOT 1
- Readme is not updated HOT 1
- Support raster-dem in offline HOT 8
- Add Windows and Apple OS X?
- "Failed to install cordova-sqlite-ext" cordova 9.0.0 HOT 10
- iOS example app doesn't show map data HOT 2
- Unable to see any layers/content added to the map
- Road names not showing HOT 2
- Error: tile x,y,z not found
- Upgrade mapbox-gl or maybe will be better to develop a http server cordova plugin? HOT 16
- Ejemplo en marcha
- using cordova plugin cordova-spatialite-storage and cordova-sqlite-ext?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapbox-gl-cordova-offline.