Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

react map gl

import * as React from 'react';
import { useState } from 'react';
import ReactMapGL from 'react-map-gl';

function Map() {
  const [viewport, setViewport] = useState({
    width: 400,
    height: 400,
    latitude: 37.7577,
    longitude: -122.4376,
    zoom: 8
  });

  return (
    <ReactMapGL
      {...viewport}
      onViewportChange={nextViewport => setViewport(nextViewport)}
    />
  );
}
Comment

react-map-gl

npm install --save react-map-gl
Comment

PREVIOUS NEXT
Code Example
Javascript :: macos start simulator from cli 
Javascript :: stopping setinterval 
Javascript :: js compare elements of two arrays 
Javascript :: react native vector icon 
Javascript :: javascripti remove int character from string 
Javascript :: round innerhtml up 
Javascript :: js regex for password 
Javascript :: sweetalert allow html 
Javascript :: args slice discord.js 
Javascript :: javascript copy content of one div to another 
Javascript :: convert date dd/mm/yyyy to date object js 
Javascript :: redirect to download javascript 
Javascript :: MAC addresses in JavaScript 
Javascript :: open sans font 
Javascript :: binary addition javascript 
Javascript :: update photoURL firebase 
Javascript :: Pass Props to a Component Using default parameters in react 
Javascript :: vercel rewrites 
Javascript :: new date null javascript 
Javascript :: javascript resize window 
Javascript :: add element into array 
Javascript :: async await promise all javascript 
Javascript :: javascript data types 
Javascript :: moment get month short name 
Javascript :: log javascript 
Javascript :: get results from db and put in javascript array codeigniter 
Javascript :: hourglasses js 
Javascript :: express cors specific origins 
Javascript :: typeof array 
Javascript :: export multiple functions react 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =