Commit Graph

149 Commits

Author SHA1 Message Date
Sarah Hoffmann
6c1977b448 replace double-quoting with single quotes where applicable 2017-10-26 21:40:33 +02:00
Sarah Hoffmann
282c6777ee use PlaceLookup::loadParamArray in search and lookup 2017-10-23 23:30:53 +02:00
Sarah Hoffmann
09f1661638 move moreURL computation into Geocode and include all params
Fixes #678.
2017-03-23 00:16:58 +01:00
Sarah Hoffmann
e841422b1f remove unused code 2017-03-22 23:02:19 +01:00
Marc Tobias Metten
1e3bf9729e for search,details in format=HTML return geometry in geojson, not wkt. No longer need leaflet-omnivore plugin 2017-03-19 17:31:00 +01:00
Marc Tobias Metten
adb6ea546f sMoreURL now includes countrycodes values 2016-12-22 02:06:08 +01:00
Marc Tobias Metten
6238ae6032 add namespaces, method visibility according to PSR2 standard 2016-09-16 02:27:36 +02:00
Marc Tobias Metten
2a784fa3d4 fix function declaration errors according to PSR2 coding style guide 2016-09-11 05:22:51 +02:00
marc tobias
f05ea577f4 bracket spacing for if/else/for/foreach/while/switch according to PSR2 standard 2016-09-08 02:16:22 +01:00
Marc Tobias Metten
832547f192 tabs-to-spaces 2016-09-04 03:19:48 +02:00
Sarah Hoffmann
5464dec057 factor out parameter parsing into its own class
Allows to use the parsing functions in website/search.php and
utils/query.php as well.
2016-08-20 13:43:50 +02:00
Sarah Hoffmann
0a95bdc5f5 remove unused functions in Geocode 2016-07-26 23:10:50 +02:00
Sarah Hoffmann
95961d098d introduce chksql function for website code and move other fail functions
The default error screen now reports the full SQL even when not
in debug mode as this message is often more helpful than our
custom error message.
2016-06-12 14:34:57 +02:00
Sarah Hoffmann
7a50d2f996 factor out link formatting function and osm type translation 2016-06-12 12:39:09 +02:00
Sarah Hoffmann
d45524cbfb introduce accessor function for URL parameter
These functions take care of type conversion and check that
the parameters contain legal values. The API now returns a
Bad Request error if the format is wrong.
2016-06-11 23:07:06 +02:00
Sarah Hoffmann
4e0e0c1797 replace new-style [] expression with old-style array()
Also removes some unused code.

fixes #444
2016-05-01 11:22:53 +02:00
Sarah Hoffmann
6fc32d9645 Merge branch 'cmake-port' into master
Conflicts:
	CMakeLists.txt
	lib/init.php
	settings/settings.php
2016-03-16 19:45:18 +01:00
Marc Tobias Metten
df764a3f3b fix for PHP7, added test setup 2016-03-13 02:06:46 +01:00
Sarah Hoffmann
5ccb499a6f install executables and call settings.php explicitly
Executables (including websites) need to be installed in the
build directory, so that they can find the right settings.php.
settings now defines build and source dir.
2016-03-12 09:40:43 +01:00
marc tobias
8e2b5d7ce3 query the last updated timestamp only if output format is HTML 2016-03-02 01:22:19 +01:00
Marc Tobias Metten
21385f5e51 make map tile layer configurable 2016-01-27 19:42:49 +01:00
Marc Tobias Metten
f2a2c29815 responsive details-error page. Shared header and footer 2016-01-19 12:29:07 +01:00
marc tobias
fc961c14fa status after hackweekend London 2016-01-15 17:11:12 +01:00
Sarah Hoffmann
c242386ddb use url with php prefix in more url
User may not want to set up URL rewriting for suffixes.

Fixes #241
2015-08-11 23:09:50 +02:00
Sarah Hoffmann
c9d7015f69 make search with reverse plan default
The old behaviour with reverse planning for only selected languages
can be reinstated by setting CONST_Search_ReversePlanForAll to
false.

Fixes #293
2015-08-11 22:30:07 +02:00
Sarah Hoffmann
a1f3bfb35a implement namedetails and extratags parameter for search 2015-08-10 21:42:40 +02:00
Oleksandr Shulgin
46e64bd933 Check for positive polygon simplification threshold
Don't run the simplification function if no threshold was given
(or in case of a negative one).  Also process the query string
parameter in case of html out format.
2015-04-29 16:13:39 +02:00
Oleksandr Shulgin
ab47773604 Add polygon simplification
New query string parameter polygon_threshold=<0.0..1> is introduced.
The float value of this parameter (defaults to 0) is passed to
ST_SimplifyPreserveTopology() on geometry we're about to output in
one (or many) requested formats such as GeoJSON, KML, etc.

This is useful when getting border polygons for whole countries, but
rendering them at large scale, when most of the high resolution details
cannot be seen anyway.  For example, the unsimplified polygon data for
Germany in GeoJSON format currently makes for about 3 MB response body.
With use of this new parameter, the application can greatly reduce the
amount of downloaded data and server response time while providing its
users with the same picture.  On a typical laptop screen resolution,
zooming out to fit the whole country borders on screen, only 1/100 amount
of details could be well enough.
2015-04-27 15:16:38 +02:00
Sarah Hoffmann
02c219d40e PATH_INFO is delivered URL encoded on newer apache 2.4 2014-10-16 00:33:56 +02:00
Sarah Hoffmann
bc27cb2bd8 introduce util function to query db from command line 2014-03-03 20:02:24 +01:00
Brian Quinion
47fdb33adf nominatim fallback mode for structured queries 2014-01-23 14:40:37 +00:00
Sarah Hoffmann
c574c933e4 reenable reverse order queries, leave disabled for structured queries 2013-09-16 00:05:26 +02:00
Brian Quinion
a974d25092 fix structured and batch mode. Add constant to disable batch mode by default 2013-09-12 16:16:08 +01:00
Brian Quinion
6a337f13d0 XML and JSON map 'ploygon' param to AsPoints 2013-09-06 09:47:46 +01:00
Brian Quinion
b3ed566d15 Test for polygon param correctly 2013-09-06 09:47:46 +01:00
Brian Quinion
cdd129de70 fix viewbox issues 2013-09-06 09:47:46 +01:00
Brian Quinion
eb793ae26e Fix for regressions: broken bounded search, error on country codes 2013-09-06 09:47:46 +01:00
Brian Quinion
662af78319 batch mode for json only 2013-09-06 09:47:45 +01:00
Brian Quinion
91d72617e6 Use correct value for html ploygons 2013-09-06 09:47:45 +01:00
Brian Quinion
4429121341 move more code into library 2013-09-06 09:47:45 +01:00
Sarah Hoffmann
ea761a15b6 more restrictive parsing of lat/lon
Require a decimal point in both numbers to avoid cases like
https://trac.openstreetmap.org/ticket/4884
2013-07-07 16:44:37 +02:00
Sarah Hoffmann
d5e9fc4a03 support for partial matching of US ZIP+4 codes 2013-06-19 22:58:46 +02:00
Brian Quinion
c5c44f9a07 missed some postcode use cases 2013-06-13 17:19:27 +01:00
Brian Quinion
464fb913a8 Allow for tiger addresses when filtering by rank 2013-06-11 17:28:30 +01:00
Brian Quinion
e26da936b3 recheck the rank limits before dropping out of the search loop - otherwise we can drop out too soon 2013-06-11 17:13:37 +01:00
Brian Quinion
aa8c6e5f13 Try alternative orderings of structured queries that include postal codes 2013-06-11 14:56:50 +01:00
Brian Quinion
5413abfb1e remove the structuredAddressElement function from search that was moved to lib.php 2013-06-07 16:23:37 +01:00
Sarah Hoffmann
9cec989882 remove suggestion code, no longer works 2013-05-08 20:23:47 +02:00
Sarah Hoffmann
0e6cfed1a4 remove debug putput 2013-05-06 21:33:01 +02:00
Sarah Hoffmann
3ec91d267b fix missing number conversion for coordinates 2013-05-06 21:19:12 +02:00