Questions tagged [php]

PHP is a Server-Side Scripting language designed initially for web programming, but is also used as a general-purpose programming language.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

Access forbidden during the installation of the Lizmap server on Windows

How can I successfully install Lizmap? I have exhausted all the means of research without success. In fact, for more than a week I have tried to install lizmap on Windows. At the step of the Apache ...
user avatar
1 vote
0 answers
20 views

Is it possible to "copy" one layer from WMS and create another WMS only with this layer automatically?

I'm using Lizmap and QGIS to create WMS service with multiple layers. Now I need to find a way to create WMS containing only one layer that the 'main' WMS contains. Is there any way to do it without ...
user avatar
1 vote
0 answers
70 views

How to calculate the daylight saving time given a latitude and longitude [closed]

I've been using an algorithm (https://gist.github.com/assaflavi/fc8cf83c167558ebf3ab159b5c5b0df2) to calculate sunrise and sunset times given a latitude and longitude and it works fine but this ...
user avatar
3 votes
2 answers
97 views

"Unsupported GeoJSON type" from AJAX request to PostGIS database

I'm trying to use a GeoJSON to build a layer on an OpenLayers map of MultiPolygons from my PostGIS database. However the following error is thrown: Uncaught Error: Unsupported GeoJSON type: undefined ...
user avatar
0 votes
1 answer
72 views

GeoServer StoreDefinition - "Markup im Dokument nach dem Root-Element muss ordnungsgemäß formatiert sein."

I try to set up a GeoServer WFS-rerouting using a local PHP script that creates the GetCapabilities-document which should then be interpreted by the GeoServer. I get the following error: (german) &...
user avatar
  • 117
1 vote
1 answer
83 views

How to format PostgeSQL query results in PHP to return GeoJSON object?

I'm building a small map application with Leaflet and PostGIS. I'm having an issue similar to this post where using pg_fetch_all is returning the data I want, but buried in an associative array. When ...
user avatar
  • 284
1 vote
1 answer
66 views

Location Based KNN script on Leaflet works for Chrome but other browsers and mobiles cause parse error - invalid geometry

As many of you know I have been producing a Leaflet map with a KNN function to show the closest pubs to a user's location. Live example to test for yourself: https://ces-web2.southwales.ac.uk/students/...
user avatar
  • 101
1 vote
1 answer
554 views

How to output GeoJSON file from MySQL database shapefile?

I have a MySQL spatial database ('mydb') of one table ('tst'), I mean by spatial. I need to output the GeoJSON file from this spatial MySQL table. I downloaded geoPHP library and also MySQL to GeoJSON ...
user avatar
  • 29
0 votes
0 answers
69 views

Getting a GeoServer created style to Leaflet markers via PHP

How can I use a point/marker style created on GeoServer within my Leaflet map when I am drawing data from the server using PHP. I am currently PHP to draw geodata from my GIS server, however I would ...
user avatar
  • 101
-1 votes
1 answer
473 views

GeoJSON custom marker for different data sources

I need help how to show markers with two different colors for two different GeoJSON data sources. Here's first source geojson.php: { "type": "FeatureCollection", "...
user avatar
  • 3
0 votes
2 answers
279 views

Dynamically load data from a GeoJSON

I ask a new question about the problem I have, because I tried it but I don't know how to solve it. (I'm learning OpenLayers, and I see that it isn't that easy). Using a html select, I run a PHP query ...
user avatar
0 votes
1 answer
390 views

Unsupported GeoJSON type

I run a query and I get a GeoJSON file, but when I try to load the file into the map, I get the error that it's an Unsuported GeoJSON type. this is the PHP file that generate GeoJSON : $element = $...
user avatar
0 votes
1 answer
861 views

Saving data of Leaflet Draw using PHP into MySQL

How do I insert Leaflet Draw coordinates in the MySQL database with id longitude-latitude columns? <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&...
user avatar
  • 1
1 vote
1 answer
302 views

Call marker color in Geojson to apply to leaflet.js in php

I have a geojson file which has marker-color properties in it. In this case I want to call the marker color contained in the GeoJSON file, to change the marker color. how to do this? GeoJSON data: ...
user avatar
  • 15
1 vote
0 answers
43 views

GeoJSON cluster, group points with the same id

I want to make a cluster with a GeoJSON, to obtain the file I query a table in PostgreSQL and I save the file. The same point can have several associated images, but according to the GeoJSON, it makes ...
user avatar
2 votes
1 answer
156 views

How to calculate Night Flight time for a given flight between 2 locations?

I am currently working on a project (web app) at university to be able to calculate the amount of time spent during night flying. Currently, I have, Departure Lat and Long and Departure Time in UTC ...
user avatar
  • 123
0 votes
0 answers
25 views

Plot something on lat long in PHP

Is there some sort of plotting system which lets you do this? (in PHP): ex. plot(lat,long,data_show_onhover) My CSV file that I want to plot on the map looks like this: something,something,something,...
user avatar
0 votes
0 answers
352 views

Installing QGIS Server on existing Apache/PHP on Windows 10

Using OSGeo4W installer, I installed QGIS server while having already Apache/PHP on my computer. And I got this message: The requested URL was not found on this server when I tested the QGIS Server ...
user avatar
1 vote
0 answers
41 views

Binding Popup from database to a marker

I am trying to add popup to markers from database. Markers are showing unable to add title to popup. function add_markers(coordinates) { var geojson = (saved_markers == ...
user avatar
1 vote
1 answer
104 views

SELECT * will not work with table containing geodata

The following will not run... I get ORA-00932 error every time.. $sql = 'SELECT * FROM app.table_1'; however, this will work (specifying a column name, i.e. objectid): $sql = 'SELECT objectid FROM ...
user avatar
1 vote
0 answers
191 views

Ogr2ogr: how to add values ​to a database column

So I have my table named ppb_curp with the following columns ogc_fid | name | description | wkb_geometry |curp | zip_code Then I insert the KML file in my PostGis base with ogr2ogr ogr2ogr -f ...
user avatar
  • 83
2 votes
1 answer
154 views

ogr2ogr error loading KML file in PostGIS with PHP

So I have a KML file that I want to save to my PostGIS database, Currently I have the following code using PHP: $file = $request->file("item"); $name = time(); $name = $name . '.' . $...
user avatar
  • 83
1 vote
0 answers
101 views

Loading google maps API from php file [closed]

I've been trying to load some GeoJSON data into a map, using Google Maps API. When I save my file as .html the map shows up just fine, and it shows the data I want to see (a Linestring). I'm using ...
user avatar
1 vote
1 answer
277 views

Open QGIS project using PHP command

We are using a intranet geoloket (html). I would like to share some QGIS projects using PHP. This is the code I start with: header("Content-disposition: attachment; filename=MapInQgis.qgz");&...
user avatar
0 votes
1 answer
223 views

Getting meters from pgr_dijkstra

I imported http://download.geofabrik.de/europe/germany/baden-wuerttemberg.html into my PostgreSQL database which supports PostGIS. Now I wrote a PHP script which gets two points (lon, lat, which are ...
user avatar
  • 21
2 votes
1 answer
171 views

Updating PostgreSQL database with PHP language

I want to update the text information contained in my database for a specific layer. This layer is called via a WFS stream. At first I displayed my layer with an Overlay with OpenLayers, and with a ...
user avatar
  • 55
1 vote
1 answer
8k views

PHP: Call to undefined function pg_connect() with MS4W for PostgreSQL

I am trying to add dynamic interactions with my PostgreSQL 12 database to my web page with the PostGIS extension that I use with PgAdmin 4. I use an Apache web server that I installed with MS4W. For ...
user avatar
  • 55
1 vote
0 answers
118 views

how to put the data on the map from database

I wanted to display a polygon with the coordinated on my map and each time i click the button. This is my database: I get the data from the database with php $sql = "SELECT * FROM ...
user avatar
1 vote
1 answer
4k views

How to display the GeoJSON from PHP on the map?

I am using MapboxGLJS. I retrieve the coordinates from my database and I put it in GeoJSON format on PHP which look like this: <?php $sql = "SELECT * FROM waypoint"; $...
user avatar
0 votes
0 answers
53 views

Reading GeoJSON from external file in Leaflet [duplicate]

I found the following script on the web but I don't know how to change the way to read JSON code. In the script the JSON code is included in a var called sitec but I need to read that code from an ...
user avatar
2 votes
2 answers
551 views

Loading points from an array given by PHP query from MySQL db to OL

New to OpenLayers and JS in general. I have some coords stored as lat long, then PHP script which load these points from MySQL db and simply print it as follows: var points = [[49.66356869941062, 16....
user avatar
  • 21
1 vote
0 answers
48 views

CARTO update existing table from external MySQL database

I would like my Carto data to be updated, using external data (MySQL database, I run and manage locally using PHP scripts), so that the Carto table gets updated with the most recent data, whenever the ...
user avatar
  • 11
0 votes
0 answers
92 views

Using PHP on Webservers and PostgreSQL

I'm creating a general webapp that is displaying data from a Postgres database hosted on Digital Ocean. My problem is that I can't get the PHP script to run on my webserver(hosted by Hostgator) to ...
user avatar
  • 31
0 votes
1 answer
457 views

Use PHP form to insert geometry from WKT into SQL Server 2017

I have a PHP 7.3 form that asks the user for a Name, a WKT and an SRID. I would like to upload the WKT and SRID to SQL Server 2017 so that it creates a geometric object in Upload_WKT_Test using ...
user avatar
  • 3,633
1 vote
1 answer
517 views

Openlayers: Using PHP and npm

I've got a rather large MySQL database containing polygons (coordinates) and their additional properties (e. g. text labels in different languages). I would like to use PHP to connect to my database ...
user avatar
1 vote
1 answer
477 views

On change filter Leaflet

I want to make dynamic filter on Leaflet, but I got a little problem. so first this my dropdown: <select id="selc"> <option value="baik">baik</option> <option value="sedang">...
user avatar
1 vote
0 answers
48 views

Count points that are within certain radius within a polygon

I have 4 table, I want to count police that are within 5km of a point (dam), schools and clinics within 3km same dam. So far I do get the results if I'm focusing on one table $str = pg_query($conn, "...
user avatar
1 vote
0 answers
203 views

Problem with loading big data (GeoJSON) via PHP

I have a problem with loading (big) data via PHP from a spatial database. I let run this project on a localhost Apache Server. From a data count of about 30.000 edges I get an error VM885:1 Uncaught ...
user avatar
1 vote
0 answers
61 views

Display all trajectories location along with dummy location

I'm trying to display the all trajectory location on Google map along with dummy location. I have tried to display dummy locations with sample location and it works fine, but when I try to connect to ...
user avatar
1 vote
1 answer
319 views

Leaflet Foreach point in GeoJSON check Distanceto

So I was wondering how I can get the points from the GeoJSON located here. and then for each of them separately check if the distance of Markers is within 5 meters range of these. I have tried but ...
user avatar
0 votes
0 answers
93 views

ArcGIS map with basemap toggle and simplemarker pointer

I am using ArcGIS map which gives me an error: Below is my function which i am using to implementing the map on my application: function handlerForVariableB (latt, longt, complaintid) { // ...
user avatar
2 votes
1 answer
1k views

Show points (layer) from PostgreSQL database on OpenLayers map

I have this code, I want to load a collection of points stored in a table in PostgreSQL database, I retreive the GeoJSON format succesfully, but the points never show up on the map! The three files ...
user avatar
0 votes
0 answers
168 views

How to setup my Tileserver-php

I have downloaded "xampp-windows-x64-7.3.6-3-VC15-installer.exe" and installed only Apache and PHP. My Apache server is running. I have download "tileserver-php-master" and paste the folder in path ...
user avatar
  • 511
1 vote
1 answer
831 views

ArcGIS Feature layer data update using API in PHP

I'm facing an issue with update data on the ArcGIS feature layer using API in PHP. Data is updating on the feature layer as expected, But data on the map is not representing. Every time when I'm ...
user avatar
0 votes
0 answers
578 views

Generating random locations nearby my location in PHP and MySQL

I'm using a method to generate a random locations around my location with given the initial position(lat,long) and radius this method is used From the reference post here, but unfortunately the ...
user avatar
  • 11
1 vote
2 answers
310 views

MySQL, geoPHP, select sites near the current site

I'm working with archaeological sites, stored as polygons in a MariaDB 10.3 table, and I have PHP 7.2 with GEOS and geoPHP available. I'm creating a page that displays all the related information for ...
user avatar
  • 21
0 votes
0 answers
172 views

Creating GeoServer layers from GeoJSON generated by PHP script

I have few layers on my map rendered with ol.format.GeoJSON. I generated GeoJSON from pgsql database with PHP scripts. The size of layers ranges from 1MB to 5MB so to speed up the process I want to ...
user avatar
  • 343
0 votes
0 answers
455 views

Query and display MySQL DB data from HTML

I want to link MySQL DB to the HTML and get the data according to the query below. SELECT * FROM feature1 WHERE place = 'feature2' php seems one of the way to do this, since I am one day old with ...
user avatar
0 votes
0 answers
62 views

Remove tolerance in PostGIS requests

I just read the problems similar to mine on this forum, but no solution helped me. To put it simply, I use ST_Touches in an algo in PHP that allows me to test if two points touch. Here is the query: ...
user avatar
2 votes
1 answer
130 views

Get values from shapeObj MapScript

I'm using Mapserver 7.4.0-dev and MapScript PHP. In previous versions of MapServer and MapScript (https://mapserver.org/mapscript/php/index-5.6.html#shapeobj), I could query a shapeObj after its ...
user avatar
  • 153

1
2 3 4 5
7