Giter Club home page Giter Club logo

mim's Introduction

mim

Synopsis

mim is a webpage that allows users to upload geotagged pictures into a database. The pictures are displayed on a map where they were taken and can also be displayed.

The website is hosted at mapim.herokuapp.com

Code Example

The mapview is build with leaflet

var Esri_WorldImagery = L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
  attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community',
  maxZoom: 17
});

var mymap = L.map('mapid', {
  layers: [Esri_WorldImagery] // only add one!
}).setView([64.127, -21.817], 12);

var baseLayers = {
  "street map": basemap0,
  "satellite map": Esri_WorldImagery
};

L.control.layers(baseLayers).addTo(mymap);

router post to import image to database and display a marker.

router.post('/', upload.single('myFile'), function(req, res, next) {
  console.log(req.body);
  console.log(req.file);
  console.log('SERVER FILE NAME\n' + req.file.filename);

  const destination = req.file.destination;
  const fileNameOnServer = req.file.filename;

  imageprocess.processImage(destination, fileNameOnServer, req.body.comment, db)
  .then(data => {
    console.log('image processed!');
    res.redirect('/import');
  })

Motivation

This is a school project in web developing. It was developed on github and deployed to heroku and can be viewed here.

Installation and setup

  1. Download and install Node

  2. This project reguires a postgres database, see line 8 in index.js

  3. Download and unzipp from github. then from the mim rootfolder type:

⋅⋅⋅npm install ⋅⋅⋅npm start

Getting involved

We encourage people to get involved so feel free to make a push request.

mim's People

Contributors

hallgrimur1471 avatar fannsi avatar sverrirkarl avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Forkers

fannsi vfp1

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.