AIFanatic / earth-3d

Get 3D data from google earth.
MIT License
3 stars 5 forks source link

Earth 3D

alt text Get 3D data from google earth.

Simple demo - Advanced demo

Description

This project is a combination of the amazing work from retroplasma/earth-reverse-engineering and LexSong/earth-reverse-engineering-utils put together to form a usable library.

Install

Node

yarn add https://github.com/AIFanatic/earth-3d

Browser

<script src="https://cdn.jsdelivr.net/gh/AIFAnatic/earth-3d@latest/dist/earth-3d-bundle.js"></script>
import { NodeManager } from 'https://cdn.jsdelivr.net/gh/AIFAnatic/earth-3d@latest/dist/earth-3d-esm-bundle.js';

Usage

import { NodeManager, LatLonBox } from 'earth-3d';

const filterLatLonBox = new LatLonBox(37.304420471191406, 37.3040771484375, -121.88644409179688, -121.88610076904297);

const nodeValidationHandler = (node) => {
    // Filter nodes based on some criteria
    return LatLonBox.is_overlapping(filterLatLonBox, node.latLonBox);
}

const nodeManager = new NodeManager({
    nodeValidationHandler: nodeValidationHandler
});

setInterval(() => {
    const nodes = nodeManager.get_nodes();
}, 100);

Notes:

TODO

References

Disclaimer

This project has no affiliation with Google or any of its affiliates, there may by a chance that you will get a temporary ban from using google maps services due to the high volume of tiles being streamed.