All Projects → maptalks → maptalks.mapboxgl

maptalks / maptalks.mapboxgl

Licence: MIT license
MapboxglLayer for maptalks.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to maptalks.mapboxgl

angular-mapboxgl-directive
AngularJS directive for Mapbox GL
Stars: ✭ 43 (-15.69%)
Mutual labels:  mapbox-gl, mapbox-gl-js, mapbox
Mapbox Gl Js
Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
Stars: ✭ 8,017 (+15619.61%)
Mutual labels:  mapbox-gl, mapbox-gl-js, mapbox
Mapdeck
R interface to Deck.gl and Mapbox
Stars: ✭ 296 (+480.39%)
Mutual labels:  mapbox-gl, mapbox-gl-js, mapbox
react-mapboxgl
Declarative React components for mapbox-gl-js.
Stars: ✭ 15 (-70.59%)
Mutual labels:  mapbox-gl, mapbox-gl-js, mapbox
deck.gl-time-series-widget
A React Time Slider implementation for DECK.GL - (non)temporal data - by CPU filtering ⌛
Stars: ✭ 19 (-62.75%)
Mutual labels:  mapbox-gl, mapbox-gl-js, mapbox
Martin
Blazing fast and lightweight PostGIS vector tiles server
Stars: ✭ 540 (+958.82%)
Mutual labels:  mapbox-gl, mapbox-gl-js, mapbox
Mappa
A canvas wrapper for Maps 🗺 🌍
Stars: ✭ 290 (+468.63%)
Mutual labels:  mapbox-gl, mapbox
React Map Gl
React Component Library for Mapbox GL JS
Stars: ✭ 298 (+484.31%)
Mutual labels:  mapbox-gl, mapbox-gl-js
Mapbox Gl Native
Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
Stars: ✭ 4,091 (+7921.57%)
Mutual labels:  mapbox-gl, mapbox
react-map-gl-cluster
Urbica React Cluster Component for Mapbox GL JS
Stars: ✭ 27 (-47.06%)
Mutual labels:  mapbox-gl, mapbox-gl-js
Mapbox Gl Draw
Draw tools for mapbox-gl-js
Stars: ✭ 569 (+1015.69%)
Mutual labels:  mapbox-gl, mapbox-gl-js
React Map Gl
React friendly API wrapper around MapboxGL JS
Stars: ✭ 6,244 (+12143.14%)
Mutual labels:  mapbox-gl, mapbox-gl-js
React Mapbox Gl
A React binding of mapbox-gl-js
Stars: ✭ 1,683 (+3200%)
Mutual labels:  mapbox-gl, mapbox-gl-js
Vue Mapbox
Vuejs 2 components for interacting with mapbox-gl-js
Stars: ✭ 359 (+603.92%)
Mutual labels:  mapbox-gl, mapbox
Maplibre Gl Native
An open-source fork of Mapbox GL SDK for iOS and Android and other platforms
Stars: ✭ 65 (+27.45%)
Mutual labels:  mapbox-gl, mapbox
Mapbox Gl Native Android
Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL
Stars: ✭ 135 (+164.71%)
Mutual labels:  mapbox-gl, mapbox
who-owns-what
Who owns what in nyc?
Stars: ✭ 146 (+186.27%)
Mutual labels:  mapbox-gl, mapbox-gl-js
Osm Liberty
A free Mapbox GL basemap style for everyone
Stars: ✭ 231 (+352.94%)
Mutual labels:  mapbox-gl, mapbox-gl-js
Editor
An open source visual editor for the 'Mapbox Style Specification'
Stars: ✭ 1,167 (+2188.24%)
Mutual labels:  mapbox-gl, mapbox-gl-js
Terramach
Terra Mach is a mapping frontend system to build graphical interfaces for devices.
Stars: ✭ 142 (+178.43%)
Mutual labels:  mapbox-gl, mapbox

maptalks.mapboxgl

NPM Version

A plugin to add mapbox-gl-js as a layer for maptalks.js.

screenshot

Tips

This is just a temporary solution for vector tilelayer

The webgl context of maptalks and the webgl context of mapboxgl will not be shared

Please familiarize yourself with the above when you use the plugin, and it is recommended to use the webgl ecology library from maptalks maptalks-gl-layers

Examples

Install

  • Install with npm: npm install maptalks.mapboxgl.
  • Download from dist directory.
  • Use unpkg CDN: https://unpkg.com/maptalks.mapboxgl/dist/maptalks.mapboxgl.min.js

Usage

As a plugin, maptalks.mapboxgl must be loaded after maptalks.js and mapbox-gl.js in browsers.

<script type="text/javascript" src="https://unpkg.com/maptalks/dist/maptalks.min.js"></script>
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.36.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.36.0/mapbox-gl.css' rel='stylesheet' />
<script type="text/javascript" src="https://unpkg.com/maptalks.mapboxgl/dist/maptalks.mapboxgl.min.js"></script>
<script>
var mapboxglLayer = new maptalks.MapboxglLayer('tile',{
        glOptions : {
            'style' : 'mapbox://styles/mapbox/light-v9'
        }
    }).addTo(map);
</script>

Supported Browsers

IE 11, Chrome, Firefox, other modern and mobile browsers support WebGL.

API Reference

MapboxglLayer is a subclass of maptalks.Layer and inherits all the methods of its parent.

Constructor

new maptalks.MapboxglLayer(id, options)

getGlMap()

get mapbox-gl-js map instance used by the layer

Returns Map

toJSON()

export the layer's JSON.

var json = mapboxglLayer.toJSON();

Returns Object

Contributing

We welcome any kind of contributions including issue reportings, pull requests, documentation corrections, feature requests and any other helps.

Develop

The only source file is index.js.

It is written in ES6, transpiled by babel and tested with mocha and expect.js.

Scripts

  • Install dependencies
$ npm install
  • Watch source changes and generate runnable bundle repeatedly
$ gulp watch
  • Tests
$ npm test
  • Watch source changes and run tests repeatedly
$ gulp tdd
  • Package and generate minified bundles to dist directory
$ gulp minify
  • Lint
$ npm run lint
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].