Coder Social home page Coder Social logo

1tpp / rally Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 3.0 1.48 MB

Web-based online road trip planner ๐Ÿ—บ๏ธ

Home Page: https://rally.1tpp.dev

License: MIT License

HTML 1.55% CSS 0.20% JavaScript 98.10% Dockerfile 0.15%
react typescript tailwindcss react-leaflet side-project

rally's Introduction

3d image!

rally's People

Contributors

1tpp avatar dependabot[bot] avatar mmenuu avatar norawit2907 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

rally's Issues

Add ways elements to the map

const way_api = `${

import.meta.env.VITE_MAP_DATA_API

}?data=[out:json];way(around:3000,${lat}, ${lng})[%22amenity%22=%22restaurant%22];out;`;

const way_response = await axios.get(way_api);

const way_data = way_response.data;

const data = [...node_data.elements, ...way_data.elements];

https://api.github.com/1tpp/rally-client/blob/91cbff1cd5479cfc051ea090e6e124d8f43be6f6/src/App.jsx#L84

    distanceBetweenWaypoints: [],
  });

  const searchElements = async ({ lat, lng }) => {
    const node_api = `${
      import.meta.env.VITE_MAP_DATA_API
    }?data=[out:json];node(around:3000,${lat}, ${lng})[%22amenity%22=%22restaurant%22];out;`;
    const node_response = await axios.get(node_api);
    const node_data = node_response.data;

    // TODO: Add ways elements to the map
    // const way_api = `${
    //   import.meta.env.VITE_MAP_DATA_API
    // }?data=[out:json];way(around:3000,${lat}, ${lng})[%22amenity%22=%22restaurant%22];out;`;
    // const way_response = await axios.get(way_api);
    // const way_data = way_response.data;
    // const data = [...node_data.elements, ...way_data.elements];

    const data = node_data.elements;

    const elementsData = data.map((element) => ({
      id: element.id,
      position: [element.lat, element.lon],
      name: element.tags.name ? element.tags.name : "N/A",

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.