On 01/02/2010 12:12, Walter Lorenzetti wrote:
> Giuseppe Naponiello ha scritto:
>> Hi,
>> I'd like to create a button for download the map in kml format, maybe I
>> could use the ogr2ogr script but I don't know how. Is it possible?
>>
>> thanks a lot
>>
>>
> Hi Giuseppe,
>
> Alessandro Pasotti (itOpen) sometimes ago, made a class to export a map
> to kml format: http://www.itopen.it/soluzioni/kml-map-server/
>
> you can start to study this  for to try a write i pmapper plugins...
>
> Bye
> W
>

Giuseppe,

Another purely PHP-KML approach is to use the Google PHP-KML bindings:
http://code.google.com/p/php-kml/
But in any case you will first have to exactly define what you really 
want to export. All layers or single layers of the map, or results of a 
query, or all of that...

Calling ogr2ogr via PHP instead of writing the KML with a separate class 
gives the advantage to have this more flexible also for other formats in 
case you once need to extend this.

There are also OGR bindings for PHP but they're a bit of a pain to use. 
The Python bindings for GDAL/OGR are a bit more straightforward to use, 
you could use this via a web service (REST, or XML-RPC) that is then 
called from PHP. But for all of that you would need some more deeper 
knowledge how OGR works.

armin

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to