ForScale

u/ForScale







r/learnjavascript•

function useChangeMapType(mapRef: mapboxgl.Map) { if (!mapRef) return;

return (mapboxStyleName: string) => { const savedSources = {}; const savedLayers = [];

// filter out mapbox styles leaving only added sources like field-boundary, crop-zones, etc.
const addedSourcesNames = Object.keys(mapRef.getStyle().sources).filter(
  sourceKey => !/mapbox:\/\/|composite/.test(sourceKey)
);

// check each layer to see if it's in addedSourcesNames
mapRef.getStyle().layers.forEach((layer: Layer) => {
  if (!addedSourcesNames.includes(layer.source)) return;

  const sourceName = layer.source;

  savedSources[sourceName] = (
    mapRef.getSource(sourceN
16

r/learnjavascript•

/**

    • loops through sources and layers, saves added ones that are not mapbox styles
    • adds back saved sources and layers */ function useChangeMapType(mapRef: mapboxgl.Map) { if (!mapRef) return;

return (mapboxStyleName: string) => { const savedSources = {}; const savedLayers = [];

// filter out mapbox styles leaving only added sources
const addedSourcesNames = Object.keys(mapRef.getStyle().sources).filter(
  sourceKey => !/mapbox:\/\/|composite/.test(sourceKey)
);

// check each layer to see if it's in addedSourcesNames
mapRef.getStyle().layers.forEach((layer: Laye
10

You know those places that all seem to have the same decor... you call ahead, or stop in, and they whip up a takeout dish in about 10 mins... you pay at the counter and go.

Why are these stores predominantly Chinese cuisine? Why are their not Japanese, Vietnamese, Korean ones?? I may have seen a Thai one or two, but nothing compared to the amount of Chinese ones.

How did Chinese takeout become so dominant in the realm of Asian cuisine takeout?

019

r/CallOfDutyMobile•

Ever since about 2 updates ago I'm seeing everything the commander says in the chat area (where you see what your team is saying during the match). How the hell do I turn it off?

2nd question.. does C4 detonate when an enemy touched it, or is it only when you hit the detonator?

Thanks!

22