MCPcopy Create free account
hub / github.com/visgl/react-map-gl / redraw

Method redraw

modules/react-mapbox/src/mapbox/mapbox.ts:400–414  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

398 // render cycle, which is managed by Mapbox's animation loop.
399 // This removes the synchronization issue caused by requestAnimationFrame.
400 redraw() {
401 const map = this._map as any;
402 // map._render will throw error if style does not exist
403 // https://github.com/mapbox/mapbox-gl-js/blob/fb9fc316da14e99ff4368f3e4faa3888fb43c513
404 // /src/ui/map.js#L1834
405 if (!this._inRender && map.style) {
406 // cancel the scheduled update
407 if (map._frame) {
408 map._frame.cancel();
409 map._frame = null;
410 }
411 // the order is important - render() may schedule another update
412 map._render();
413 }
414 }
415
416 _createProxyTransform(map: any) {
417 const proxyTransform = createProxyTransform(map.transform);

Callers 1

setPropsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected