Blake Thompson
a16c67d953
Fixes problems associated with node 10 and NAN ( #14847 )
...
* Fixes problems associated with node 10 and NAN
* Follow up removal of unnecessary linking to map object
* Remove header left over from debugging
2019-06-26 13:38:06 -05:00
Thiago Marcos P. Santos
06f1dc48a2
[core] Make the BackgroundScheduler a singleton
...
- Do not carry it over everywhere as parameter, it is a shared
instance anyway and the lifecycle is pretty much the app lifecycle
from the moment we instantiate a map.
- Rename to BackgroundScheduler because it is a Scheduler that will
do tasks in the background, we don't make assumptions if it is a
thread pool or a single thread.
- Most importantly, remove the dependency from `core` on `platform`.
2019-05-10 14:20:38 +03:00
Bruno de Oliveira Abinader
d5868d3da8
[core] Remove file source from public Map ctor
2019-03-20 21:30:08 +02:00
Ander Conselvan de Oliveira
7d19115720
[core] Don't use exceptions in MapObserver::onDidFailLoadingMap
...
Using different exception pointers to specify the loading failure makes
an awkward API. Most users rethrow the exception only to figure out what
type of error happened so it can be reported properly. So replace the
exception pointer with a enum an string description of the failure.
2019-03-13 11:58:27 +02:00
Bruno de Oliveira Abinader
096dea16e3
[node] Change Map/FileSource relationship to composition
2019-03-12 23:52:40 +02:00
Chris Loer
d735d89835
[core] Port "collision group" plumbing to gl-native.
...
[node] Hook up map-wide "crossSourceCollisions" option, defaulting to true.
[test] Pass "crossSourceCollisions" test option through test harness; enable cross-source-collisions tests on native.
2018-09-12 14:10:46 -07:00
Konstantin Käfer
30272924a9
[node] capture invalid input data as ParseError objects
...
This allows us to distinguish them from other types of errors
2018-08-27 14:07:40 -07:00
Konstantin Käfer
973aa963f9
[node] move to Nan 2.10.0
2018-05-22 11:17:01 +02:00
Łukasz Paczos
22b4ef1f4b
Update layer immediately when changing its max/min zoom level ( #11399 )
...
* [android][core] update layer immediately when changing it's max/min zoom
* [core] node bindings for layer zoom range
2018-04-12 10:42:14 +02:00
Konstantin Käfer
d511f74ce4
[node] add setLight support
2018-01-24 16:35:47 -08:00
Ansis Brammanis
22c07596a0
[core] Split MapMode::Still into Static and Tile
...
`Tile` makes sure the symbols in the resulting tile are tileable while
symbols in `Still` match rendering in `Continuous` mode.
2017-11-17 10:05:15 -08:00
Lauren Budorick
e43e2aa3d7
[core, node] Support axonometric rendering
2017-10-14 03:15:34 +02:00
Bruno de Oliveira Abinader
447d24bb19
[node] Added 'removeSource'
2017-09-15 18:28:40 -03:00
John Firebaugh
32bd1d54fa
[node, tests] Consolidate headless rendering logic in HeadlessFrontend
2017-07-26 09:50:38 -07:00
Ivo van Dongen
b97cc980e0
[node] rendering interface changes
2017-07-18 10:45:12 +02:00
Ivo van Dongen
39a732d7ae
[android][glfw][ios][macos][node][qt] split backend from mapobserver
2017-07-18 10:45:12 +02:00
John Firebaugh
9eba2a66d1
[core, node, darwin, qt] Remove support for paint classes
2017-05-15 09:45:55 -07:00
Thiago Marcos P. Santos
51ebb96b1d
[node] Add map.cancel()
...
Cancels an ongoing rendering.
2017-04-20 18:46:35 +03:00
Bruno de Oliveira Abinader
5e3308c5c0
[node] Update changes in MapObserver::onDidFailLoadingMap
2017-03-17 11:25:48 +02:00
Bruno de Oliveira Abinader
d152efb8cb
[node] Support mbgl::MapObserver
2017-03-15 14:53:32 +02:00
Bobby Sudekum
2988ca16c1
Add addImage, removeImage API ( #7610 )
2017-01-09 13:03:17 -08:00
Konstantin Käfer
117863f111
[build] move headless rendering files to platform/default
2016-11-22 20:58:51 +01:00
John Firebaugh
251035cd75
[node] Add setZoom and setPitch support
2016-11-17 13:48:00 -08:00
Konstantin Käfer
a4d259c33f
[core] move gl::Context to Backend and refactor View
2016-10-25 13:52:36 -07:00
Konstantin Käfer
5cc390d694
[core] separate Backend from View for headless rendering
2016-10-25 13:52:36 -07:00
Mike Morris
a894870fb8
[node] remove internal NodeRequest class from public API
2016-10-20 14:38:36 -04:00
Mike Morris
817c26111a
[core] [node] pass thread pool impl to Map constructor
...
Updates mbgl::Map constructor usage everywhere
Adds NodeThreadPool implementation using AsyncQueue to call
Nan::AsyncQueueWorker from main thread
2016-10-20 14:37:36 -04:00
Bruno de Oliveira Abinader
89f3270f72
[node] Added set{Bearing,Center} + updated -test-suite
...
This gives the ability to pan and/or rotate the map in a posterior step
after initial render for testing purposes.
2016-10-11 12:10:32 +03:00
Thiago Marcos P. Santos
edec56e6c5
[node] switch to NodeRequest member fn callback
...
For (hopefully) better performance than creating a new v8::Context to
wrap each callback while still avoiding leaking memory with v8::FunctionTemplate.
Adds a JavaScript shim in front of module.exports.Map to wrap the
req.respond API internally and preserve the public callback-passing
API, while still exporting the correct prototype.
2016-09-06 18:14:22 -04:00
Mike Morris
7df0e459b6
[node] NodeRequest inherits from Nan::AsyncWorker
...
drop NodeRequest::Create, move MakeCallback to NodeRequest::Execute
rework Respond -> HandleCallback
modern NAN style updates
2016-07-14 13:47:02 -04:00
Bruno de Oliveira Abinader
1cb59e20c4
[node] Added 'removeLayer' binding
2016-07-13 16:19:28 +03:00
John Firebaugh
021d4199cb
[core, node] Implement bindings for addSource
2016-06-24 09:39:51 -07:00
John Firebaugh
16c435b151
[core, node] Implement bindings for addLayer
2016-06-24 09:39:51 -07:00
John Firebaugh
3459b83736
[core, node] Node bindings for setFilter
2016-06-21 18:24:49 -07:00
John Firebaugh
8a9ee26b0e
[core] Use mbgl::style::conversion in node bindings
2016-06-21 16:04:22 -07:00
John Firebaugh
3f5ea169f5
[node] Partial implementation of runtime styling API for node bindings
2016-06-13 17:22:05 -07:00
John Firebaugh
ee78b1b797
[core] Eliminate some redundant NodeMap members
2016-06-13 17:22:05 -07:00
Ansis Brammanis
61d14089e0
[core] implement queryRenderedFeatures
2016-04-29 12:00:24 -07:00
John Firebaugh
169755e89a
[core] Unify FileRequest and WorkRequest
2016-03-24 10:54:32 -07:00
Thiago Marcos P. Santos
63982e0010
Revert "[node] Destroy the RunLoop with the last Map object"
...
This reverts commit 3633fd7ebd .
2016-02-24 14:31:11 +02:00
Thiago Marcos P. Santos
3633fd7ebd
[node] Destroy the RunLoop with the last Map object
...
The last map object to get destroyed will also destroy
the RunLoop (which will also destroy the AsyncTask).
This will clear any reference to the Node default main
loop and let it close.
Downside is that we need to make sure we are always calling
`map.release()`.
2016-02-20 13:33:13 +02:00
Mike Morris
f4d394d935
[node] code review cleanup
2015-12-15 10:19:56 -08:00
Thiago Marcos P. Santos
873eabcf28
[node] Fix build on GCC 4.9.2
2015-11-26 19:40:36 +02:00
John Firebaugh
1d33790dc0
[core] Fix image type of Map::renderStill
...
It's a premultiplied image. This implies that we were misusing encodePNG
in most cases, as we were passing premultiplied pixels which were then
interpreted as unmultiplied. I changed encodePNG to accept premultipled
pixels, and unpremultiply in the implementations.
2015-11-25 15:57:37 -08:00
John Firebaugh
0c1e378bc9
[core] Rewrite image handling
...
* Consolidate Image and StillImage
* Typecheck unassociated vs premultiplied images
* Rewrite default platform image decoding implementation
2015-11-25 15:57:36 -08:00
John Firebaugh
c4c3a19d85
[node] Allow GC in spite of reference loops through the request method
...
The following produces a reference cycle:
var map = new mbgl.Map({
request: function () { ... }
});
map has a reference to the request function, which has a reference to
its closure, which has a reference to map.
Storing a the map options in an internal field, rather than a Persistent,
allows V8 to collect the reference cycle when none of its members have
other references.
2015-11-20 16:33:46 -08:00
Mike Morris
36a8fb32d5
[node] Fixes 'make xnode' to configure HOST_SLUG.gypi
...
Adds node-gyp to dev-dependencies to support 'make xnode' on Node v0.10.x
Ignores -Wnested-anon-types around v8.h includes.
2015-11-05 18:16:33 -05:00
John Firebaugh
014b517820
[node] Output debug logs when a render test times out
2015-10-28 15:54:34 -07:00
John Firebaugh
0531b38367
Nan 2.0
2015-09-09 14:55:14 -07:00
Mike Morris
6e6387e089
move node-mbgl to platform/node/ directory
2015-08-21 16:22:04 -04:00