[Geomoose-users] data link for download

Brent Fraser bfraser at geoanalytic.com
Mon Jun 14 12:54:20 EDT 2010


I'm not sure I follow...  The solution below basically mimics the returned XML 
of the Print service (but it also passes the layer path).  It then presents a 
link (or it could present several links if more than one format is available) in 
the Information tab, just as the Print service shows links for "View Image", 
"View HTML" and "Download PDF".

   My downloaddata.php would generate XML wrapped around HTML (just the way the 
print.php does) so GeoMOOSE would present links to "Download shp", "Download 
csv", etc.

   The only issue now is that the paths to the different files would need to 
specified/stored somewhere (in the mapbook? settings.ini? somewhere else? ). 
The downloadable files need to be generated previously (or I suppose the 
downloaddata.php could create them on the fly, but there could be performance 
issues).

Brent

Bob Basques wrote:
> 
> 
> Hmm,
> 
> 
> some to think about here, what about a generic link to the tile, that 
> could possibly be expanded to run a external service (for easier) 
> integration  . . . for any format of return, not just XML.
> 
> 
> 
> bobb
> 
> 
> 
> 
>> >> Brent Fraser <bfraser at geoanalytic.com> wrote:
> 
> Bob,
> 
>    I agree.  The code below does in fact add an icon to the layer entry 
> in the
> Catalog, and it does pass the layer path to the downloaddata.php script
> indicated in the service.  But GM(/OpenLayers?) doesn't interpret the
> server-sent Content headers to allow the download.  Not a huge issue, 
> you could
> have the downloaddata.php generate XML with a download link similar to the
> existing print.php.  It just means the user would have to do two mouse 
> clicks
> (one on the layer's download icon, and one on the resulting download 
> link in the
> Information tab.  Still very useful.
> 
> Brent
> 
> Bob Basques wrote:
>>
>>
>>  All,
>>
>>
>>  I think that adding an Icon to the layer might be better for this, you
>>  could even add different icons for different formats.  Also I think that
>>  direct linking to the title should be reserved for things like metadata
>>  and such, but that's just my opinion.
>>
>>
>>  bobb
>>
>>
>>
>>
>> > >> Brent Fraser <bfraser at geoanalytic.com> wrote:
>>
>>  I had experimented with adding:
>>
>>  <service name="download"  display="true">
>>    <url>php/downloaddata.php</url>
>>      <step type="input">
>>        <input type="hidden" name="layer"/>
>>      </step>
>>  </service>
>>
>>  and
>>
>>  <layer-controls>
>>    <layer-control name="download" service-name="download"
>>  layer-input="layer"
>>  on="true" tip="Download data for %LAYER%"/>
>>  </layer-controls>
>>
>>  but GeoMOOSE expects only a limited set of data types (XML, text, etc) 
> to be
>>  returned from the server.  We'd have to enhanced it to allow other actions
>>  (based on the "Content-Disposition" header?) for the download to work.
>>
>>  For now the easiest solution is to use the metadata page approach as Len
>>  suggested...
>>
>>  Best Regards,
>>  Brent Fraser
>>
>>
>>  Dieter Lehmann wrote:
>> >  Hi all,
>> >
>> >  thanks for the label answer - I hoped, that it could be done without
>>  separating labels and features, but that's o.k.
>> >
>> >
>> >  Another question:
>> >
>> >  What would be the easiest way to make an link within the catalog tab
>>  to provide a link to download the data (I would make them available as a
>>  zip file.)
>> >
>> >  I would like to crate a new icon for download.
>> >
>> >
>> >
>> >
>> >  Thanks,
>> >  Dieter
>> >
>> >
>> >
>> >
>> >
>> >
>> 
> ------------------------------------------------------------------------------
>> >  ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> >  GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> >  lucky parental unit.  See the prize list and enter to win:
>> >  http://p.sf.net/sfu/thinkgeek-promo
>> >  _______________________________________________
>> >  Geomoose-users mailing list
>> >  Geomoose-users at lists.sourceforge.net
>> >  https://lists.sourceforge.net/lists/listinfo/geomoose-users
>> >
>>
>>
>> 
> ------------------------------------------------------------------------------
>>  ThinkGeek and WIRED's GeekDad team up for the Ultimate
>>  GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>>  lucky parental unit.  See the prize list and enter to win:
>>  http://p.sf.net/sfu/thinkgeek-promo
>>  _______________________________________________
>>  Geomoose-users mailing list
>>  Geomoose-users at lists.sourceforge.net
>>  https://lists.sourceforge.net/lists/listinfo/geomoose-users
>>
> 





More information about the Geomoose-users mailing list