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

learn more… | top users | synonyms

0
votes
0answers
9 views

Mapbox JS get geojson and echo to a div

I have a mysql table with geo data (id, lat, lon, speed, ...). I am using this php to parse to geojson (json.php in my case): <?php header('Content-type: text/plain'); $username = "[user]"; $...
1
vote
1answer
22 views

inserting points in postgis with pdo (php)

I have a problem with sql insert statement using PDO (php, postgis, postgres). I have tried to use different combinations, but none of them work. Here is what I ve got: $latitude= 46.07175; $...
0
votes
0answers
20 views

Inserting markers coordinates into postgis table with one row per marker via php

I have a leaflet map with some markers (coming from a .gpx) and I’m trying to send them in a postgis table with one row per marker. For the moment it works but only for the first marker. Here is how ...
0
votes
0answers
3 views

Ushahidi installation problem “Unknown Error”

After finishing install Ushahidi version 2.7, i've got this error application/views/header_nav.php [17]: Following by this messages : Non-static method html::escape() should not be called ...
0
votes
0answers
29 views

Markers display with leaflet and javascript

I have a problem displaying data relating to schools on a div 'info' when click the marker with leaflet and javascript: here's the error: Uncaught TypeError: layer.setStyle is not a function
1
vote
0answers
18 views

I am using an example fracnsites to make a similar map but I don't under stand the ajax code?

I am using an example fracnsites to make a similar map but I don't under stand the ajax code? The example has js code: var map, fields = ["gid", "createdby", "featname", "feattype", "status", "acres"...
1
vote
1answer
32 views

Why can't PHP insert new geometry on PostGIS?

(Copied this question from stackoverflow, since it may have more answers here.) I'm using ogr2ogr to upload a GPX file to PostGIS. When I do it on command line (Ubuntu 14.04), it works fine. ...
2
votes
1answer
74 views

Leaflet: Map tile request, hidden key/secret via proxy

I would like to request a Leaflet tilelayer without exposing my API key and secret. For example, using the UrtheCast API (but would apply to other similar APIs that embed api_key and api_secret in the ...
0
votes
1answer
35 views

CartoDB - inserting polygons

I am new to using PostGIS and CartoDB, and I am doing some test SQL inserts into both using PHP. I've had no problem with points, but polygons are proving to be a bit tricky - my SQL insert works ...
0
votes
0answers
16 views

print x/y coordinate within a getmap request in php

I have created a webservice in php, where you can enter a zipcode and housenumber. By pressing submit on the website, the php will build the url with its bounding box based on the input. I echo the ...
0
votes
1answer
60 views

HTML form to load points on Google Maps using API?

I am creating a web page with a Google Map embedded in it. I want to create a form to allow a user to type which London tube zone they wish to see and, when submitted, this will map the tube stations ...
0
votes
1answer
84 views

Display Geojson data from PHP API (http://localhost/sample.php) on google map

I have PHP API (http://localhost/api.php) that gives data in GeoJSON format, how can I show that GeoJSON data on Google map ? Dragging & Dropping GeoJSON data on map is not allowed.
0
votes
1answer
60 views

Plotting lat long on World Map [closed]

I have lat long coordinates of various merchant ships of the world, say 50000. And I have around 100 instances of coordinates (lat long) of each of these ships at various timestamps. I have them on ...
0
votes
1answer
243 views

Display geojson on WMS images in openlayers 3

Here actually am trying to achieve multipolygon on wms layer in openlayers 3. In this i'm calling a php file which is giving the output of geojson format but i don't have any idea where i'm doing . I ...
1
vote
0answers
27 views

How do I increase the 2mB uploadifive limit in Geoserver installed on AWS?

I've recently migrated a site from Geoserver 2.1.4 installed on a hardware server to Geoserver 2.7.0 installed on an Amazon Web Service. The site uses uploadifive to enable the user to upload a pdf to ...
0
votes
0answers
38 views

Get the published shape file to client side processed with PHP

I want to use a PHP to retrieve information from the .db file of a shapefile saved as a layer in Geoserver. I need to retrieve attribute data from the layer and present it at the client side. ...
0
votes
1answer
197 views

Zoom to polygon bounds on click. Leaflet ´, GeoJSON

I have a leaflet map with a lot of polygons (borders). I will like to zoom to the bounds on the polygon, when the user click. Until now its only possible for me to zoom to the the bounds of all the ...
0
votes
0answers
50 views

how to stop the marker from dragging?

I'm making a form that reads data from a map and puts it in an input field to be inserted into a database. The latitude and longitude were taken perfectly and inserted as expected but my problem is ...
1
vote
2answers
87 views

Reduce query time when using both MySQL and PostgreSQL with PostGIS

I am doing a tracking query. The device is sending its location data, timestamp to store in MySQL Database. I want to show the query result of every point with its nearest POI. The POI database is ...
3
votes
1answer
62 views

Geojson in postgis Geometry : Z dimension error

i had this php code : $geom1='{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-32514.400906806848,4810093.013501738],[-32877.47679116143,4809500.626532529],[-34473.099756614494,...
1
vote
3answers
72 views

QGIS export feature coordinates

I have a big project (whole country) and it contains smaller features (administrative units). My project is in .shp. How to export features' coordinates one by one or all at once as long as all ...
0
votes
0answers
52 views

GDAL memory raster + OpenLayers

I'm trying to improve my use of GDAL for creating and sending images to an OpenLayers map, but I have some memory issues. Here is the thing : 1. JS send a query to server with map parameters (bbox, ...
0
votes
0answers
65 views

populating a geojson from postgresql with php depending on zoom level

i am about to load a few thousand polygons (a grid 500x500m) from a postgresql db into a leaflet map with php script converting the data into a geojson. the php script populates the geojson depending ...
2
votes
2answers
215 views

Using PHP's curl to Upload *.csv file into CartoDB?

I use CartoDB import api to upload csv file correctly, and I can see the 'pointtest' table is created in the cartoDB website. By following command line: #curl -v -F file=@/mnt/hgfs/D/cartodb/...
2
votes
1answer
21 views

Is there an app/plugin combination that suits the tracking of a public bus

In a town near where I live there is a public bus that runs a circuit about once an hour. I was asked if it would be easy to track the bus (presumably via an android device on the bus) and put the ...
1
vote
1answer
71 views

PostGIS table structure question

I have been using QGIS to insert point data accompanied by information for each point into PostGIS. When I open PGAdmin to take a look at the table rows I noticed a column near the start of each row ...
2
votes
1answer
144 views

Spatialite not loaded in PHP5 on Ubuntu

I'm trying to install Spatialite (4.3.0a) on Ubuntu (14.94.2 LTS) ..... I'd like to use it with PHP (5.5.9-1) .... Following this post https://faimsproject.atlassian.net/wiki/display/FAIMS/...
1
vote
0answers
18 views

Prepared statements and MULTILINE geographies [closed]

I'm working on a web application that parses GPX files and enters the contents into a database as Geography objects. Seeing how incoming files can be potentially insecure, I was hoping to use prepared ...
0
votes
1answer
78 views

How configure Spatialite for PHP Version 5.6.14 (on Windows 7 and Apache 2.4)?

I'm on Windows 7, using PHP Version 5.6.14 on Apache 2.4 and I'm trying to access to a Spatialite database. All works fine when execute "no spatial" SQL query in my PHP procedure but when I try to ...
0
votes
1answer
33 views

Generating wms from postgresql table with GeoServer in phpfile?

I've a postgresql table build from shapefile. In my phpfile I duplicate this table with a new name. Now I want to generate a wms with the content of the new table. The generation must be ...
0
votes
0answers
52 views

Querying geom from MS SQL 2014 in PHP/PDO returns empty array

I'm using the following php code: $query = $dbconn->prepare("SELECT [geom].ToString() as geom FROM [the_table_im_using]"); $query->execute(); if($query->errorCode() != 0) { die("Query ...
0
votes
0answers
84 views

PHP, PostGIS & Geojson

I'm using Lumen to connect to postgis and I want to execute this query: WITH query AS (SELECT ST_GeomFromGeoJSON('{"type": "Polygon","coordinates": [[[366063.228612569917459, 623109.765295544289984],[...
1
vote
1answer
89 views

If bounds contain a polygon PHP-Leaflet

I have the latitude and the longitude of view of map ( latitude and longitude of north west and the latitude and longitude of southeast ) and a geojson files with MultiPolygon. (43mo) In PHP i want ...
1
vote
0answers
20 views

Updated GPS coordinate shows rotated point

So I have a GPS coordinate: 8.6258,47.3325 Which I use as my origin. Then I have the path of an object that has been moving around based on the ENU position, say: -10, 12 //east, north in meters -...
1
vote
1answer
501 views

Nominatim reverse geocode gets blocked - how do i send a valid UserAgent or Referer?

I have a php page that requests reverse geocoding data from Nominatim OSM server. It was working for over a year. Recently started blocking my requests with the following message: You have been ...
0
votes
1answer
266 views

Leaflet : How to update polyline ? Live Tracking

var ColorVar = '#bd0026'; var firstpolyline = new L.Polyline(polyList, { color:ColorVar, weight: 8, opacity:0.8, smoothFactor: 1 } ); ...
1
vote
2answers
902 views

Convert WKT to GeoJSON with leaflet

I have a point type WKT geometry column in a MySQL table storing the location of some stores. I want to display it on a leaflet map on my website. I've found plenty of tutorials to doing this on ...
0
votes
0answers
17 views

Calculate Sector & Find Point Inside with PHP

I've been trying to find out how to do this kind of stuff with PHP and haven't had much luck so I thought I'd ask here. My scenario is this. I have a lat/lng point and need to be able to calculate ...
0
votes
0answers
51 views

Creating Tile server without using any Base Map

I have a database of points with coordinates on server (MySQL + PHP). I need to create a transparent (without an image of map) tiles with the points (one tile can be several points) format (x) (y) (...
0
votes
0answers
105 views

Save JSON from Openlayers using AJAX

I am trying to build a web app where users can use OpenLayers to draw features and then save them either as a download or write to a file on the server which I can collect when I need it. I am happy ...
2
votes
1answer
28 views

Error when passing shapefile to postgis through submit button and php

I have the following issue when I try to pass a shape file to postgis. When I run this part of code through the terminal: shp2pgsql -s 2100 -d /var/www/dkar/MarCO/Code/python/output/cluster/...
0
votes
1answer
227 views

Converting EPSG:28992 to universal (Google Maps) lat/lon

I'm trying to find a way to convert EPSG:28992 to Google Maps' lat/lon using PHP. Is this possible? I'm trying to convert XYZ: 137634.397 455715.439 0.0. I'm using Kadaster, which is a Dutch ...
2
votes
2answers
3k views

Take data (points) from MySQL to Leaflet Map using PHP and Ajax

I have records with lat and lngs in a MySQL database and I want to add them to a Leaflet map as markers. I have tried a couple of methods but none seem to work. When the webpage opens the map doesn't ...
3
votes
1answer
85 views

Deploying Web AppBuilder Application with php

I have created my web application with the Web AppBuilder Developer edition, downloaded the zip file and customized the index.html file in my localhost environment. Everything works fine until I ...
3
votes
1answer
1k views

Submit form information from a leaflet popup to MySQL table

I have a leaflet map and I want to have the user fill out a form in a leaflet popup and upon clicking the 'submit' button - the information in the form will be inserted into my MySQL database. As a ...
1
vote
1answer
152 views

I am using “Hindi and Gujrati” font then I am getting “Black Squre Dots”?

At the time of generating PDF file when I am using “Hindi and Gujrati” font then I am getting “Black Squre Dots”. Below I am using code. Here I am trying to convert in UTF-8 but it’s not converting. ...
1
vote
2answers
1k views

Getting all vertex lat, long coordinates every 1 meter between two known points using PHP?

I am currently using php to try and write code that will take a start point and end point latitude and longitude coordinate pair in decimal degrees and calculate the latitude and longitude of every ...
2
votes
0answers
21 views

Vanilla PHP and GeoTIFF: How to know byte address and byte length of a “strip” in an LZW-compressed GeoTiff?

I have a situation where I need to read cell values from a GeoTiff using vanilla PHP, and while I've been successful reading values from an uncompressed TIF (~800MB), I'm having difficulty reading ...
2
votes
1answer
40 views

Using php to edit CartoDB infowindow?

Perhaps a basic question, but can php code be used in editing the CartoDB infowindow HTML? We want to show or hide a category depending on the value.
3
votes
2answers
390 views

Column 'SHAPE' cannot be null in mysql database even if the query string is correct

I am trying to write an POLYGON into an column named SHAPE which is a geometry type. And created query which looks $sql = "INSERT INTO rokka(zone,district,location,area,SHAPE) VALUES ('$zone','$...