MCPcopy
hub / github.com/plotly/plotly.js / getMapInfo

Function getMapInfo

test/jasmine/tests/map_test.js:1881–1918  ·  view source on GitHub ↗
(gd)

Source from the content-addressed store, hash-verified

1879});
1880
1881function getMapInfo(gd) {
1882 var subplot = gd._fullLayout.map._subplot;
1883 var map = subplot.map;
1884
1885 var sources = map.style.sourceCaches;
1886 var layers = map.style._layers;
1887 var uid = subplot.uid;
1888
1889 var traceSources = Object.keys(sources).filter(function(k) {
1890 return k.indexOf('source-') === 0;
1891 });
1892
1893 var traceLayers = Object.keys(layers).filter(function(k) {
1894 return k.indexOf('plotly-trace-layer-') === 0;
1895 });
1896
1897 var layoutSources = Object.keys(sources).filter(function(k) {
1898 return k.indexOf(uid) !== -1;
1899 });
1900
1901 var layoutLayers = Object.keys(layers).filter(function(k) {
1902 return k.indexOf(uid) !== -1;
1903 });
1904
1905 return {
1906 map: map,
1907 div: subplot.div,
1908 sources: sources,
1909 layers: layers,
1910 traceSources: traceSources,
1911 traceLayers: traceLayers,
1912 layoutSources: layoutSources,
1913 layoutLayers: layoutLayers,
1914 center: map.getCenter(),
1915 zoom: map.getZoom(),
1916 style: map.getStyle()
1917 };
1918}

Callers 10

assertLayoutFunction · 0.85
countVisibleLayersFunction · 0.85
assertLayerStyleFunction · 0.85
_assertFunction · 0.85
map_test.jsFile · 0.85
_assertLayoutFunction · 0.85
countVisibleTracesFunction · 0.85
getStyleFunction · 0.85
getGeoJsonDataFunction · 0.85
assertTileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…