allow more POIs, get more at once

pull/1/head
Michael Peter Christen 13 years ago
parent 407fdf6968
commit 62ae9bbfda

@ -20,6 +20,7 @@
var shallZoom = true; // flag if the map shall be zoomed to the search result
var shallReload = false; // flag if the search shall be repeated upon next resize of the window
var poisfound = 0;
var poisxml = "";
var kmNormal = 100; // ca. 1km grid for radius
var meterNormal = 100000; // ca. 1m grid for location
@ -87,8 +88,9 @@
radius = Math.floor(radius * kmNormal + 1) / kmNormal;
var lon = Math.floor(center.lon * meterNormal) / meterNormal;
var lat = Math.floor(center.lat * meterNormal) / meterNormal;
poisxml = path_mdsearch + query + '&lon=' + lon + '&lat=' + lat + '&r=' + radius + '&z=' + map.getZoom();
searchLayer_co0 = new OpenLayers.Layer.GeoRSS('Communities', path_losearch + query + '&lon=' + lon + '&lat=' + lat + '&r=' + radius + '&z=' + map.getZoom(), {'icon':marker_co});
searchLayer_md0 = new OpenLayers.Layer.GeoRSS('Point Of Interest', path_mdsearch + query + '&lon=' + lon + '&lat=' + lat + '&r=' + radius + '&z=' + map.getZoom(), {'icon':marker_md});
searchLayer_md0 = new OpenLayers.Layer.GeoRSS('Point Of Interest', poisxml, {'icon':marker_md});
map.addLayer(searchLayer_co0);
map.addLayer(searchLayer_md0);
//document.getElementById('apilink').setAttribute('href', 'yacysearch_location.rss?query=' + query);
@ -119,8 +121,8 @@
//}
// update map and result line
poisfound = mdcount + cocount;
document.getElementById('resultline').innerHTML = poisfound + " POIs found in visible map";
poisfound = mdcount;
document.getElementById('resultline').innerHTML = (poisfound == 0) ? "searching..." : poisfound + " <a href=\"" + poisxml + "\">POIs</a> found in region";
// check if any of the markers is visible on the screen.
// this is only necessary if shallZoom = false since this would set shallZoom = true

@ -59,7 +59,7 @@ public class yacysearch_location {
final boolean search_creator = alltext || post.get("dom", "").indexOf("creator",0) >= 0;
final boolean search_subject = alltext || post.get("dom", "").indexOf("subject",0) >= 0;
final long maximumTime = post.getLong("maximumTime", 5000);
final int maximumRecords = post.getInt("maximumRecords", 3000);
final int maximumRecords = post.getInt("maximumRecords", 6000);
final double lon = post.getDouble("lon", 0.0d);
final double lat = post.getDouble("lat", 0.0d);
final double radius = post.getDouble("r", 0.0d);

@ -49,7 +49,7 @@ import org.apache.http.entity.mime.content.ContentBody;
public class SRURSSConnector extends Thread implements SearchAccumulator {
private final static int recordsPerSession = 100;
private final static int recordsPerSession = 250;
final String urlBase;
final String query;

Loading…
Cancel
Save