[Geomoose-users] Linking search results to templates

Brent Fraser bfraser at geoanalytic.com
Tue Apr 9 13:25:05 PDT 2013


I'm always paranoid when it comes to data, so I prefer to have a step 
where I "load" the data and confirm the result.  But as long as the data 
is consistent (when does that happen?), maybe you could just modify the 
PHP to:
     1. get the contents of a directory where the photos are stored
     2. parse the file names
     3. and generate the output HTML.

Basically doing a "join" and template process in the PHP.  Might be a 
performance issue if there are thousands of photos in the dir....

Best Regards,
Brent Fraser

On 4/9/2013 2:11 PM, Bistrais, Bob wrote:
>
> Thanks Brent,
>
> Looks like most sites have 4 photos, but not all.  I'm finding cases 
> of fewer or more than 4 photos.  Problem is, this could change as the 
> customer adds more sites, or more photos to existing sites.  So I'd 
> have to modify a table every time the customer sends data updates.  I 
> was hoping maybe I could do this through MapServer templating?
>
> *From:*Brent Fraser [mailto:bfraser at geoanalytic.com]
> *Sent:* Tuesday, April 09, 2013 3:57 PM
> *To:* Bistrais, Bob
> *Cc:* geomoose-users at lists.osgeo.org
> *Subject:* Re: [Geomoose-users] Linking search results to templates
>
> Bob,
>
>
>   Depends on the data.  Are there usually 4 photos? If so, just create 
> 4 columns in the Site table and populate them with the path to 
> photos.  If it is more variable (sometimes 1, sometimes 5 photos), 
> create a table to relate Sites to Photos:
>
> SitePhotos
> -----------
> siteID:    photoPath:
> 1234    1234Front.jpg
> 1234    1234Rear.jpg
>
> and do a table join within Mapserver's Map file (in the LAYER's DATA 
> statement) to relate sites to tables.
>
> Best Regards,
> Brent Fraser
>
> On 4/9/2013 1:14 PM, Bistrais, Bob wrote:
>
>     I'm working on an application which depicts various sites (several
>     thousand of them).  The customer has photos of the different
>     sites, each site usually has 4 pictures, from different angles. 
>     The spatial data does not have an attribute linking the photos to
>     a particular record.  But each photo has the site ID as part of
>     its name.  Example- Site 1234 has photos with names like
>     "1234Front.jpg", "1234Rear.jpg", etc.
>
>     What I'd like to do is display search/query results so that the
>     corresponding photos (actually, links to them) will appear in an
>     Identify or query result tab.  I can form the URL's based on the
>     site's ID number, but don't know how to insert these into the
>     identify/query templates.
>
>     Has anyone done something similar to this, and would have any
>     advice on how to do this?
>
>
>
>
>     _______________________________________________
>
>     Geomoose-users mailing list
>
>     Geomoose-users at lists.osgeo.org  <mailto:Geomoose-users at lists.osgeo.org>
>
>     http://lists.osgeo.org/mailman/listinfo/geomoose-users
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20130409/65e218f4/attachment-0001.html>


More information about the Geomoose-users mailing list