Skip to content

dulapahv/gistda-sphere-reactjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GISTDA sphere map component for ReactJS + demo

Modified from longdo-map-demo-reactjs

  1. Replace mapKey value in ./src/map/Map.jsx with your own API key (get one here).

    const mapKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  2. Import map component (Map) and instance (map).

    import { map, Map } from "./map";
  3. Call <Map /> and you should see the map, for example:

    import React from "react";
    
    import { map, Map } from "./map";
    
    const App = () => {
      return (
        <div style={{ height: "80vh" }}>
          <Map />
        </div>
      );
    };
  4. Use map instance to use sphere API, for example:

    map.goTo({ center: { lon: 100.510847, lat: 13.743757 }, zoom: 14 });

About

Demonstration on how to use GISTDA sphere map component in ReactJS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published