Skip to content

Commit

Permalink
Limit amount of data sent from Nominatim
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Fowler committed Mar 27, 2015
1 parent dcde756 commit c926cd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/membermap.js
Expand Up @@ -24,7 +24,7 @@ jQuery(document).ready(function($) {
// Adds given place to map using helper function to generate coordinates
function addToMap(place,popup) {
function geocode(place,callback) {
var url = 'http://open.mapquestapi.com/nominatim/v1/search?format=json&q=' + encodeURIComponent(place);
var url = 'http://open.mapquestapi.com/nominatim/v1/search?format=json&addressdetails=0&limit=1&q=' + encodeURIComponent(place);
jQuery.getJSON(url, function(data) {
if (data.length > 0) {
callback(null,{lon: parseFloat(data[0].lon),lat: parseFloat(data[0].lat)});
Expand Down

0 comments on commit c926cd5

Please sign in to comment.