Skip to content

Instantly share code, notes, and snippets.

@raveenb
Created May 19, 2016 14:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save raveenb/fa42126be517f70c506890e2cb30762a to your computer and use it in GitHub Desktop.
Save raveenb/fa42126be517f70c506890e2cb30762a to your computer and use it in GitHub Desktop.

Jon is visiting New York City for the first time. He would like to make use of his stay by touring various places around the city. He wonders if there could be any system which helps him to find a most optimal route which covers as many tourist places as possible from his source to his desired destination point.

Luckily, we have Open Street Maps which contatins "tags" on each road describing it. More information about it can be found here, http://wiki.openstreetmap.org/wiki/Elements#Tag.

Now, you as a Software Developer, need to develop a system to solve his problem. Here are the things that will help you,

Using these, when a source and destination points are given, you need to find a route which has a maximum number of tourist places in it. Any of the following tags is considered to be a valid tourist spot.

  • tourism
  • attraction
  • leisure
  • natural

To draw a map, you can use Leaflet library, http://leafletjs.com/ which has OSM support.

We expect you to come up with a simple interactive map where Jon can give his source and destination and get a best possible route to enjoy his stay.

OSM XML file link : https://www.dropbox.com/s/jv0zffxz9blpfq5/map.xml?dl=0

@JeremyLWright
Copy link

Hello, the Karoo looks awesome! Also, there is a small spelling error. I updated on my fork. :)

@ganeshkamath89
Copy link

Leaflet version 1.3.1 tries to access the file Google.js in the following path:
https://github.com/shramov/leaflet-plugins/blob/master/layer/tile/Google.js

but fails because the file Google.js is not present in the path: https://github.com/shramov/leaflet-plugins/blob/master/layer/tile/

@simeonjmcg
Copy link

Hello, It looks like the Dropbox link for the OSM XML file is broken.

@akgerber
Copy link

akgerber commented Oct 21, 2018

Still hiring for software in NYC?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment