>From a select box I am selecting a single vehicle or all vehicles and pass
the parameter to a second template which determines my vairables type of
existence,

<cfif not isdefined("form.callsign")>
        <cflocation url="mapTest.cfm" addtoken="No">
<cfelseif isdefined("form.callsign") and form.callsign eq "all">

<!--- here I loop through my query and pass the multable parameters for each
--->
<cfloop index="item" list="#form.callsign#">
        <cfquery name="qry_getVeichle" datasource="#application.dsn#"
username="#application.gateway#" password="#application.key#">
                SELECT  callsign, vowner, dt, Lat, Lon, Speed, Direction,
Veh_Reg
                FROM    dbo.vehicles
                WHERE   vowner = 222
</cfquery>
</cfloop>

<!--- else just a normal single vehicle --->
<cfelse>
<cfquery name="qry_getVeichle" datasource="#application.dsn#"
username="#application.gateway#" password="#application.key#">
                SELECT  callsign, vowner, dt, Lat, Lon, Speed, Direction,
Veh_Reg
                FROM    dbo.vehicles
                WHERE   callsign = '#form.callsign#'
</cfquery>
</cfif>

Then I am passing to a second server to get the vehicle positioning,
I wanted to do this the proper way with cfhttp, but due to buggy problems
with 4.5.1 and cfhttp

I have done it this way,
<cfset start = 1>
<cfset max = qry_getVeichle.recordCount>
<cfset zoom = "10">
<cfset data = "world">
<cfset mode = "init">

<cfoutput>
        <tr><td colspan="11">
<img
src="http://maps.whereonearth.com/cgi-bin/mapview.exe?mode=#mode#&data=#data
#&zoom=#zoom#&x=#qry_getVeichle.lon#&y=#qry_getVeichle.lat#&symbol=#qry_getV
eichle.lon#,#qry_getVeichle.lat#,target,#callsign#"></td></tr>
</cfoutput>

This is fine for one vehicle, but for multable I still only get the first
vehicle in the recordset, even though I loop through my query for the
existence of all.

If I test my looped query like so,

<cfset start = 1>
<cfset max = qry_getVeichle.recordCount>

<cfloop query="qry_getVeichle" startrow="#start#" endrow="#max#">
        <cfoutput>
        <tr><td colspan="11">
<img
src="http://maps.whereonearth.com/cgi-bin/mapview.exe?mode=#mode#&data=#data
#&zoom=#zoom#&x=#qry_getVeichle.lon#&y=#qry_getVeichle.lat#&symbol=#qry_getV
eichle.lon#,#qry_getVeichle.lat#,target,#callsign#"></td></tr>
        </cfoutput>
</cfloop>

the obvious happens I get multable vehieles displayed but on multible maps,
(I know, duuu!!)

so I think that my problem lies somewhere around

startrow="#start#" endrow="#max#" which works fine when outputting to html

or else the problems with the 'mapview.exe' which would be a completely
different issue.

If some one could send me in the right direction with my cfloop though, it
would be mighty appreciated.

Thanx world..



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to