1

This question already has an answer here:

I'm new to GIS and mapping, and I need to learn how to create web map application for my project. I'm really confused on what to use. I have read PostGIS, OpenStreetMap, and OpenLayers. I'm wondering how those API's work together. I'm an experienced PHP programmer, so is there a way that I can apply my PHP skills?

Later on this project, I'll be calculating the shortest path and creating a routing guide. Can you guys suggest a best guide for accomplishing my project?

Also, is there a way that I can use only domain server or host like bluehost? Since I'm only required to work within a small town.

marked as duplicate by Devdatta Tengshe, PolyGeo, BradHards, Simbamangu, Paul May 29 '14 at 12:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I posted a similar thread here. I'd reccomend looking into Leaflet, mapvox and tilemill. gis.stackexchange.com/questions/94712/… – GISKid May 28 '14 at 13:59
  • Im about to add more features in future. Am I able program them for it? – Ran Gualberto May 28 '14 at 14:09
  • It really depends on what software they will be using and how it's set up. Are they using ArcGIS and SQL Server? Or another alternative. You might want to provide additional details in your question. – GISKid May 28 '14 at 14:13
  • I'll suggest that you go through the Questions tagged Web-Mapping Those should give you a basic understanding – Devdatta Tengshe May 29 '14 at 4:19
1

Ran,

Where is your PostgreSQL database housed. On BlueHost or somewhere else. You might want to check out last chapter of 2nd edition of our book which covers these topics and provides examples in PHP -- you can download the code for free has examples of Leaflet and OpenLayers with PHP http://www.postgis.us/chapter_17_edition_2 (2nd edition currently in draft but purchaseable from Manning and you get the e-Book and updates and final book after completion).

The PostGIS Cookbook -- already in print also has chapter dedicated to web mapping with PostGIS - where they cover PHP and GeoDjango

Just to sum up your above: PostGIS - database you can use SQL to connect to it directly via PHP.
OpenStreetMap - is a PostgreSQL project that you can use their tile service, or build your own with TileMill or Mapnik.

OpenLayers - a javascript client API - if you want to communicate directly with PostGIS via PHP to overlay on this, you'd use

Leaflet - another javascript client mapping api. It's a bit easier to get started with than OpenLayers and also a bit lighter.

Hope that helps, Regina

  • Hi Regina. I read more last night and I found out that web server is different to geo or mapping server. If im going to use bluehost, what it looks like and how its going to work? Thank you for your answer. – Ran Gualberto May 28 '14 at 21:48
  • Ran, Depends what you want to do. You don't really need a mapping server if you just want to draw lines on a map. A simple webserver with PHP with PostGIS backend will do. In those cases, OpenLayers or Leaftlet will do much of the rendering stuff. For a base map, you can use Google Maps, OpenStreetMap or build your own tiles with TileMill (the native form it outputs is an SQL Lite db with the images in it) using a php script like this: github.com/infostreams/mbtiles-php – LR1234567 May 29 '14 at 1:17
  • Yes! All I need is to create a routing system in a small town near me. I'm really confused on how the birds eye view of system will work. Lets say PHP with PostGIS in server side process and OpenLayers will manipulate the response. So, If I can generate a vector layer via PostGIS why do I need a base map? Are WFS and WMS working in webserver? Why I need to convert OpenStreetMap data to PostGIS? I hope I can find simple and clean workshop. – Ran Gualberto May 29 '14 at 9:17
  • You could use OpenStreetMap directly, but the tileservice they have usage limitations - wiki.openstreetmap.org/wiki/Tile_usage_policy and you don't have full control of the look. Same issue with google maps etc. WFS and WMS are plugins into a webserver. Mapserver can be installed as CGI , geoserver using Java Servlets (e.g. tomcat under apache). You don't need WMS/WFS for what you are doing. It makes things a little easier especially for large geometries. – LR1234567 May 30 '14 at 21:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.