[Geomoose-users] Linking search results to templates

Reynolds, Michael J. (DOT) mike.reynolds at state.mn.us
Tue Apr 9 13:28:06 PDT 2013


We customized the identify php to do a little more work and produce a custom output.

In the identify php script, at the point where it has found feature results, the results can be iterated over to perform the following server side php processing:
Look for photo files with matching site ID in the photo folder.
For each matching photo file generate and append to results an html img tag and photo link.

Pros and cons to this solution I won't go into but it opens a lot of possibilities and control of the output.

From: Bistrais, Bob [mailto:Bob.Bistrais at maine.gov]
Sent: Tuesday, April 09, 2013 08:11 PM
To: Brent Fraser <bfraser at geoanalytic.com>
Cc: geomoose-users at lists.osgeo.org <geomoose-users at lists.osgeo.org>
Subject: Re: [Geomoose-users] Linking search results to templates

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/f3af1858/attachment.html>


More information about the Geomoose-users mailing list