intention: this is experimantal / test bed location for trying out various items
copy from original sources:
mkdir nominat
cd nominat/
wget http://viglino.github.io/ol-ext/examples/search/map.control.searchnominatim.html
mkdir theirs
cd theirs
wget http://viglino.github.io/ol-ext/dist/ol-ext.js
wget http://viglino.github.io/ol-ext/examples/style.css
AND get cherryPy server working...
see if server is running:
ps aux | grep site.py | grep -v grep | grep -v vim
stop:
kill $(cat $HOME/webapps/cherry/pid)
start:
~/webapps/cherry/autostart.cgi
BUT: When the application is down, it is automatically restarted by autostart.cgi upon the first page request.
for now, will hard code nom in site.py...
Yes, and that works...
but NO, server doesn't seem right
NOPE
Hmm..., can run it manually from command line:
wendell@webfaction:~/webapps/cherry
/usr/local/bin/python3.7 /home/wendell/webapps/cherry/site.py
and web page shows up!!!
in site.py:
'log.screen': True,
# wt's additions
'tools.staticdir.on': True,
'tools.staticdir.dir': "/home/wendell/webapps/cherry"
and nom.html works!!!
and changing the url:
theirs:
https://nominatim.openstreetmap.org/search?format=json&addressdetails=1&q=ice%20cream&polygon_geojson=0&limit=10
mine:
url: "http://nominatim.openstreetmap.org/search?viewbox=-77.0,38.8,-77.2,38.99&bounded=1&format=json"
theirs again:
http://nominatim.openstreetmap.org/search?viewbox=-77.0,38.8,-77.2,38.99&bounded=1&format=json
?format=json&addressdetails=1&q=ice%20cream&polygon_geojson=0&limit=10
HMM..., they added '?' onto it, BUT mine already had a '?' !!!
HOW ABOUT THAT: this time, the restart worked:
> ~/webapps/cherry/autostart.cgi
Content-type: text/html
<html><head><META HTTP-EQUIV="Refresh" CONTENT="2; URL=."></head><body>Restarting site ... <a href=".">click here<a></body></html>wendell@webfaction:~/webapps/cherry
> ps aux | grep site.py | grep -v grep | grep -v vim
wendell 22941 19.0 0.0 1044980 23564 ? Sl 02:50 0:00 /usr/local/bin/python3.7 /home/wendell/webapps/cherry/site.py
maybe waited a while???
Anyway, back to SearchNominatim...
parameter in nom.js:
url: "http://nominatim.openstreetmap.org/search"
debug network panel shows:
https://nominatim.openstreetmap.org/search?format=json&addressdetails=1&q=ice%20cream&polygon_geojson=0&limit=10
and still gets places in France...
Q: does this work (in browser or wget or curl)?
http://nominatim.openstreetmap.org/search?viewbox=-77.0,38.8,-77.2,38.99&bounded=1&format=json&addressdetails=1&q=ice%20cream&polygon_geojson=0&limit=10
Yes, in a browser that works fine!
I opened an issue! https://github.com/Viglino/ol-ext/issues/221
virtual hosting now works on cherrypy.
TODO: confirm cgi pgms work.