Coder Social home page Coder Social logo

ramsailopal / yottadb-maps Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 1.44 MB

A demo of M based globals as a co-ordinate store that can then be used to map points of interest.

Go 45.55% Shell 3.13% M 3.84% HTML 25.99% CSS 0.87% JavaScript 20.62%
yottadb mumps intersystems-cache interysystems gtm telematics gps gps-data points-of-interest maps

yottadb-maps's Introduction

YottaDB-Maps

Alt text

A demo of M based globals (YottaDB/Intersystems/GTM) as a co-ordinate store that can then be used to map points of interest.

The demo uses the co-ordinates of the football grounds in England as a data set and then exposes this data via a REST API to be consumed and then utilised to display the locations of the grounds on a map:

 ^STADIUMS("A.F.C. Bournemouth",50.735277)=-1.83833
 ^STADIUMS("Arsenal ",51.555)="-0.108611"
 ^STADIUMS("Aston Villa ",52.509167)=-1.884722
 ^STADIUMS("Barnsley ",53.552222)=-1.4675
 ^STADIUMS("Birmingham City ",52.475703)=-1.868189
 ^STADIUMS("Blackburn Rovers ",53.728611)=-2.489167
 ^STADIUMS("Blackpool ",53.804722)=-3.048056
 ^STADIUMS("Bolton Wanderers ",53.580556)=-2.535556
 ^STADIUMS("Bradford City",53.804222)=-1.759022
 ^STADIUMS("Brentford",51.488183)="-0.302639"

React-leaflet is used in the "front-end" and mg-web/YottaDB as the "back-end"

Gitpod deployment

Open in Gitpod

  1. Create a free/paid Gitpod account - https://www.gitpod.io/

  2. Log into the account

  3. Open a new browser tab and add gitpod.io/#https://github.com/RamSailopal/YottaDB-Maps to the address - This will create a new Gitpod cloud instance.

  4. Let the containers fully load

  5. Click on the remote explorer icon on the left hand panel (looking like a monitor)

  6. Click the globe icon next to 9966 to view the front-end and the globe icon next to 8080 for the backend and then add /api/cords to the end.

  7. Due to blocked cross origin requests, A CORS browser add-on also needs to be added and enabled https://addons.mozilla.org/en-GB/firefox/addon/cors-everywhere/

    https://chrome.google.com/webstore/detail/cors-unblock/lfhmikememgdcahcdlaciloancbhjino?hl=en

    With the firefox addon, ensure that the plugin is enabled in the browser header as in the image below:

    Alt text

    This contrasts to when CORS is disabled as in the image below:

    Alt text

    Once the CORS plugin is enabled, the map of the English football grounds will appear.

Local Deployment

With Git, Docker and docker compose installed:

 git clone https://github.com/RamSailopal/YottaDB-Maps.git
 cd YottaDB-Maps
 export apiadd="https://ipaddress-of-docker-server:8080/"
 docker-compose up

Front-end - http://ipaddress-of-docker-server:9966 Back-end - http://ipaddress-of-docker-server:8080/api/cords

References

React-leaflet - https://react-leaflet.js.org/

YottaDB - https://yottadb.com

mg-web - https://github.com/robtweed/mgweb-server

yottadb-maps's People

Contributors

ramsailopal avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

g9020

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.