Glavin001 / open-world

Multiplayer world generated from Open data. GTA Clone using open data, such as OpenStreetMaps.
http://society.cs.smu.ca:8081/game.html
30 stars 8 forks source link

Switch to Overpass API for OSM data #11

Closed Glavin001 closed 11 years ago

Glavin001 commented 11 years ago

Example query for halifax data: Returning OSM XML:

(
  node(44.6088720,-63.6092540,44.6688720,-63.5592540);
  <;
  >;
);
out meta;

Returning JSON:

[out:json];
(
  node(44.6088720,-63.6092540,44.6688720,-63.5592540);
  <;
  >;
);
out meta;

See example: http://overpass-turbo.eu/s/If

Example URL OSM data: http://overpass.osm.rambler.ru/cgi/interpreter?data=(%20node(44.6088720,-63.6092540,44.6688720,-63.5592540);%20%3C;%20%3E;%20);%20out%20meta; Usage:

$.get('http://overpass.osm.rambler.ru/cgi/interpreter?data=(%20node(44.6088720,-63.6092540,44.6688720,-63.5592540);%20%3C;%20%3E;%20);%20out%20meta;', function(data) { 
console.log(data); 
});