[OpenLayers-Users] php gml export example

DeDuikertjes DeDuikertjes at xs4all.nl
Thu Jun 11 11:41:03 EDT 2009


Hi Nicholas,

In my experience it is relatively easy to write WKT from PHP. Even more 
easy if you can use the spatial functions of MySQL.

Openlayers can read WKT via: new OpenLayers.Layer.GML("name", 
"url_to_local_file, { format: OpenLayers.Format.WKT}).

hope this helps, MArco

Nicholas Efremov-Kendall schreef:
> Hi Andreas,
>
> Thanks for your note. I'm afraid I have to reinvent the wheel. My issue is
> that my hands are tied with regard to what software I can use. I wouldn't
> even bother with GML if I could use Geoserver or Mapserver. I'm developing
> for a university which doesn't want to give us a VPS and won't let me use
> anything besides Jscript, Php, and Mysql. Initially they had suggested an
> entirely clientside solution. I had initially developed using PGsgl and
> Mapserver, and now I'm trying to build more or less the same functionality
> without Mapserver (or an equivalent piece of the software) as the keystone.
>
> The issue is I have a point file that has a number of many-to-one
> relationships, which should be filterable through search parameters (i.e.
> SELECT _type, _phase, etc FROM Sites Where X Like Y). There are only some
> 400 points total, and If I could load them all and hide and reveal them
> based on user input, that might work as well. I was envisioning individual
> site markers as well based on attributes, but that might not happen by the
> time it goes live.
>
> On Wed, Jun 10, 2009 at 3:24 AM, Andreas Hocevar <ahocevar at opengeo.org>wrote:
>
>   
>> Hi,
>>
>> On Wed, Jun 10, 2009 at 4:08 AM, Nicholas
>> Efremov-Kendall<n.e.kendall at gmail.com> wrote:
>>     
>>> I apologize for the deluge of questions. Does anyone have a reference for
>>> getting a postgres/mysql database query into a gml file for export?
>>>       
>> I am not sure there is one, because you would be re-inventing the
>> wheel by implementing this in PHP. You may want to have a look at
>> GeoServer [1] (configurable via web-based GUI, requires Java JDK) or
>> FeatureServer (config file, requires Python). The former implements
>> various OGC [3] standards, and can also render map tiles (using the
>> WMS standard, like e.g. also UMN MapServer [4]), the latter provides a
>> lean REST API. All of the mentioned products work well with
>> OpenLayers.
>>
>> Regards,
>> Andreas.
>>
>> [1] http://geoserver.org/
>> [2] http://featureserver.org/
>> [3] http://opengeospatial.org/
>> [4] http://mapserver.org/
>>
>> --
>> Andreas Hocevar
>> OpenGeo - http://opengeo.org/
>> Expert service straight from the developers.
>>
>>     
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>   



More information about the Users mailing list