[Mapserver-users] linked photos

Lowther, David W dlowther at ou.edu
Thu Apr 17 10:32:20 EDT 2003


Kevin,

Maybe a bit more thorough read of the docs on the mapserver site would
clarify some of these relationships for you. 

Each layer in your mapfile can have a template which is the file mapserver
uses when you query the map. If you target your mapserv form to another
frame when your mode is query then your query results will go to that frame
and be presented using the template you specified in that layer of your
mapfile. So, if the layer you are querying has a template called photo.html
and the photo.html template has enough info from the attributes to open a
new window with the photo in it then you'll be good to go.

Here's a template I use for this kind of thing:

<html>
<body onload="javascript:document.someform.submit();">
	<form target=new name=someform method=post
action=http://domain/path/[FIELDLINKINGTOPHOTO]>
	</form>
</body>
</html>


But, again, I suggest you have a look at the docs online so you can get a
good feel for the relationships of all these documents.

http://mapserver.gis.umn.edu/doc36/mapfile-reference.html

http://mapserver.gis.umn.edu/doc36/template-reference.html

Dave

> -----Original Message-----
> From: Kevin Flanders [mailto:kevinflanders at rcn.com] 
> Sent: Thursday, April 17, 2003 9:23 AM
> To: Lowther, David W
> Subject: RE: [Mapserver-users] linked photos
> 
> 
> Hi Dave,
> 
> I should admit here that I am not an expert yet with 
> Mapserver, and templates still puzzle me, as have html 
> legends as you have seen.  The legends are making more and 
> more sense as I play with the various options....and I hope 
> the query templates do as well.
> 
> For one, I have seen this basic query template for my 
> applications called "ttt_query.html" which I cannot find 
> anywhere....and know that all I really need there is "ttt", 
> but I don't know why this is, or how to get ahold of this 
> template to alter it.  I am assuming that I can create a 
> "photo.html" into which this script you mention can place the 
> appropriate photo?  Or are you saying that I would need to 
> prepare seperate html pages for all photos in advance?
> 
> TIA
> 
> 
> Kevin
> 
> 
> 
> 
> -----Original Message-----
> From: Lowther, David W [mailto:dlowther at ou.edu]
> Sent: Thursday, April 17, 2003 10:12 AM
> To: 'kevin at peoplegis.com'; Lowther, David W; mapservermailing
> Subject: RE: [Mapserver-users] linked photos
> 
> 
> Kevin,
> 
> The way I handle this is to put an script in the onload event 
> of the body tag in the wuery template and jump to a page with 
> the photo based on the link you created from the attribute data.
> 
> Dave
> 
> > -----Original Message-----
> > From: Kevin Flanders [mailto:kevinflanders at rcn.com]
> > Sent: Thursday, April 17, 2003 9:03 AM
> > To: Lowther, David W; mapservermailing
> > Subject: RE: [Mapserver-users] linked photos
> >
> >
> > Thanks David.....yes, I can put the relative path in the 
> datasource, 
> > but can I simply click on the point feature and bring up 
> the photo (or 
> > photos) directly?
> >
> >
> > Kevin
> >
> >
> >
> > -----Original Message-----
> > From: mapserver-users-admin at lists.gis.umn.edu
> > [mailto:mapserver-users-admin at lists.gis.umn.edu]On Behalf 
> Of Lowther, 
> > David W
> > Sent: Thursday, April 17, 2003 9:14 AM
> > To: 'kevin at peoplegis.com'; mapservermailing
> > Subject: RE: [Mapserver-users] linked photos
> >
> >
> > Kevin,
> >
> > If you've got attribute information in your datasource that 
> gets you 
> > to a path to the photo, or if you can generate that path from 
> > attributes then you can just build a HREF into your query 
> template for 
> > that layer and then a user can click the link to view the photo.
> >
> > Dave Lowther
> >
> > > -----Original Message-----
> > > From: Kevin Flanders [mailto:kevinflanders at rcn.com]
> > > Sent: Tuesday, April 15, 2003 2:47 PM
> > > To: mapservermailing
> > > Subject: [Mapserver-users] linked photos
> > >
> > >
> > > Is there a general explanation somewhere as to how to hotlink and 
> > > access photos in MapServer using a point shapefile?
> > >
> > >
> > > Kevin
> > >
> > >
> > > _______________________________________________
> > > Mapserver-users mailing list Mapserver-users at lists.gis.umn.edu 
> > > http://lists.gis.umn.edu/mailman/listinfo/maps> erver-users
> > >
> > _______________________________________________
> > Mapserver-users mailing list Mapserver-users at lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/maps> erver-users
> >
> >
> 
> 



More information about the mapserver-users mailing list