New answers tagged

1

I started it all again: restored a previous database from backup; create extension postgis; create extension postgis_topology; ogr2ogr from console creates additional tables (like waypoints); after this I need to grant access in those additional tables to php/apache user.


3

Basically you just need a PHP script that acts as a middle man and does the fetching for you, then returns what it gets directly to the client. I converted your JS snippet above into the relevant parts below. Notice that the url in your Leaflet tileLayer example has been changed to a PHP endpoint with URL parameters: ?s={s}&z={z}&x={x}&y={y} ...


0

Use AJAX. In jQuery style, something like this should do what you are tryingto accomplish: <form> Type Zone Number:<br> <input type="text" name="zone" id="zone"/><br> <input type="submit" value="Submit" id="btn-tubline-submit"/> </form> <script> $("#btn-tubeline-submit").on("submit", function(e){ ...


1

ST_GeomFromText takes a WKT parameter, which is a text string of WKT. However, you can't use database parameters to format text within an SQL statement. (You would need to use PHP's text formatting utilities, like sprintf, but I don't think this is a good approach). A better way is to use PostGIS geometry constructors that take numeric parameters, e.g. ...


2

I did port the Python code to php: <?php function parseFloat($ptString) { if (strlen($ptString) == 0) { return false; } $pString = str_replace(" ", "", $ptString); if (substr_count($pString, ",") > 1) $pString = str_replace(",", "", $pString); if ...



Top 50 recent answers are included