View Full Version : newbie to google maps pro
caswebsolutions
03-30-2009, 09:43 AM
Hi guys,
new to google maps and struggling with my first foray!
have form (on a page of its own) which gets postcode for start journey point, this is in a session variable which then gets 'grabbed' by the promaps wizard as the start location when the map page loads from the postcode location page being submitted.
on map load the end default position is shown, but no directions from the start location!
don't know what i'm doing wrong, any ideas from anyone??
to see what i mean please check out this! (http://www.pitairliegarage.co.uk/findus.asp) when you enter a postcode and submit you'll see what I mean, also any idea why the pan/zoom function is so unclear??
regards
Chris
Ray Borduin
03-30-2009, 10:09 AM
When I view the source, I see:
var fromAddress = {
enabled: true,
street: '',
city: '',
state: '',
zip: '',
country: '',
full: ''
};
So the address settings for the start address are not being passed in properly. Maybe the session isn't started or you are referring to the wrong variable for the start address.
caswebsolutions
03-30-2009, 11:17 AM
yeah i see what you mean ray, dunno where i'm going wrong with it!
is there any alternative way of doing it? maybe a tutorial?? the one i've gone through doesn't really go into things in much detail.
Cheers
Chris.
Ray Borduin
03-30-2009, 11:22 AM
What does that look like on your php page in the code itself before browsing? That is where the reference must be wrong.
caswebsolutions
04-02-2009, 05:47 AM
hi ray, using asp not php.
using wa cookies kit to set the session value, but for whatever reason, when i try to apply that session value to another page, it doesn't pick up the value.
i've got this page which has the form for entering the postcode and on clicking the button fires over to what would be the promaps page
<%@LANGUAGE="VBSCRIPT"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/PitairlieGarage.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>HOW TO FIND US - Pitairlie Garage</title>
<!-- InstanceEndEditable -->
<style type="text/css" media="all">
<!--
@import url("css/pitairliescreen.css");
-->
</style>
<style type="text/css" media="print">
<!--
@import url("css/pitairlieprint.css");
-->
</style>
<!--[if IE 5]>
<style type="text/css">
/* IE 5 does not use the standard box model, so the column widths are overidden to render the page correctly. */
#outerWrapper #contentWrapper #leftColumn1 {
width: 220px;
}
</style>
<![endif]-->
<!--[if IE]>
<style type="text/css">
/* The proprietary zoom property gives IE the hasLayout property which addresses several bugs. */
#outerWrapper #contentWrapper #content {
zoom: 1;
}
</style>
<![endif]-->
<!-- InstanceBeginEditable name="head" -->
<script type="text/javascript" src="CSSMenuWriter/cssmw/menu.js"></script>
<style type="text/css" media="all">
<!--
@import url("CSSMenuWriter/cssmw/menu.css");
-->
</style>
<!--[if lte IE 6]>
<style type="text/css" media="all">
@import url("../CSSMenuWriter/cssmw/menu_ie.css");
</style>
<![endif]-->
<!-- InstanceEndEditable -->
</head>
<body>
<div id="outerWrapper">
<div id="header"><a href="contact.asp"><img src="images/headerimage.jpg" width="780" height="250" alt="headerimage" /></a></div>
<div id="topNavigation">
<!--#include file="CSSMenuWriter/cssmw/menu.asp" --></div>
<!-- InstanceBeginEditable name="editable area" -->
<div id="contentWrapper">
<div id="leftColumn1">
<h2>OPENING HOURS</h2>
<p>Monday to Friday:<br />
07:30 - 17:30</p>
<p>Saturday:<br />
07:30 - 16:00 (Sales)<br />
07:30 - 13:00 (Workshop) </p>
<p>Sunday (Sales & fuel only):<br />
12:00 - 16:00</p>
<p> </p>
<p align="center"><a href="http://www.smta.co.uk"><img src="images/smta.gif" alt="smta" width="92" height="55" id="smta" /></a></p>
<p align="center"><a href="http://www.blackhorse.co.uk/motor/motor_index.aspx"><img src="images/black_horse.jpg" alt="Blackhorse finance" width="176" height="80" id="blackhorse" /></a></p>
<p align="center"><a href="http://www.uccc.co.uk"><img src="images/ucccsign.gif" alt="UCCC" width="76" height="100" id="uccc" /></a></p>
</div>
<div id="content">
<h1>HOW TO FIND US</h1>
<p> </p>
<p>enter your postcode and submit to get directions to find us!</p>
<form id="postcodesubmit" method="post" action="directions.asp">
<input name="postcodefield" type="text" id="postcodefield" value="enter postcode here" onclick="this.value''" />
<input name="postcodesubmitbutton" type="submit" id="postcodesubmitbutton" value="Get Directions!" />
<%
if (cStr(cStr(Request.Form("postcodesubmitbutton"))) <> "") then
Session("promapspostcode") = "" & cStr(cStr(Request.Form("postcodefield"))) & ""
end if
%>
</form>
<p> </p>
</div>
<br class="clearFloat" />
</div>
<!-- InstanceEndEditable -->
<div id="footerlogos">
<div align="center"><a href="http://validator.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-xhtml10-blue"
alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
<a href="Templates/www.caswebsolutions.net"><img src="images/casweb.jpg" width="150" height="38" alt="caswebsolutions" /></a></div>
</div>
<div id="footer">© Pitairlie Garage 2009</div>
</div>
</div>
</body>
<!-- InstanceEnd --></html>
instead of all the promaps just now i've got got an area of text which should show up what the session value is, but nothings showing when it loads the page.
the code for the loading page is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/PitairlieGarage.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Pitairlie Garage - TEMPLATE</title>
<!-- InstanceEndEditable -->
<style type="text/css" media="all">
<!--
@import url("css/pitairliescreen.css");
-->
</style>
<style type="text/css" media="print">
<!--
@import url("css/pitairlieprint.css");
-->
</style>
<!--[if IE 5]>
<style type="text/css">
/* IE 5 does not use the standard box model, so the column widths are overidden to render the page correctly. */
#outerWrapper #contentWrapper #leftColumn1 {
width: 220px;
}
</style>
<![endif]-->
<!--[if IE]>
<style type="text/css">
/* The proprietary zoom property gives IE the hasLayout property which addresses several bugs. */
#outerWrapper #contentWrapper #content {
zoom: 1;
}
</style>
<![endif]-->
<!-- InstanceBeginEditable name="head" -->
<script type="text/javascript" src="CSSMenuWriter/cssmw/menu.js"></script>
<style type="text/css" media="all">
<!--
@import url("CSSMenuWriter/cssmw/menu.css");
-->
</style>
<!--[if lte IE 6]>
<style type="text/css" media="all">
@import url("../CSSMenuWriter/cssmw/menu_ie.css");
</style>
<![endif]-->
<!-- InstanceEndEditable -->
</head>
<body>
<div id="outerWrapper">
<div id="header"><a href="contact.asp"><img src="images/headerimage.jpg" width="780" height="250" alt="headerimage" /></a></div>
<div id="topNavigation">
<!--#include file="CSSMenuWriter/cssmw/menu.asp" --></div>
<!-- InstanceBeginEditable name="editable area" -->
<div id="contentWrapper">
<div id="leftColumn1">
<h2>OPENING HOURS</h2>
<p>Monday to Friday:<br />
07:30 - 17:30</p>
<p>Saturday:<br />
07:30 - 16:00 (Sales)<br />
07:30 - 13:00 (Workshop) </p>
<p>Sunday (Sales & fuel only):<br />
12:00 - 16:00</p>
<p> </p>
<p align="center"><a href="http://www.smta.co.uk"><img src="images/smta.gif" alt="smta" width="92" height="55" id="smta" /></a></p>
<p align="center"><a href="http://www.blackhorse.co.uk/motor/motor_index.aspx"><img src="images/black_horse.jpg" alt="Blackhorse finance" width="176" height="80" id="blackhorse" /></a></p>
<p align="center"><a href="http://www.uccc.co.uk"><img src="images/ucccsign.gif" alt="UCCC" width="76" height="100" id="uccc" /></a></p>
</div>
<div id="content">
<h1>WELCOME TO PITAIRLIE GARAGE</h1>
<p><%= Session("promapspostcode") %></p>
</div>
<br class="clearFloat" />
</div>
<!-- InstanceEndEditable -->
<div id="footerlogos">
<div align="center"><a href="http://validator.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-xhtml10-blue"
alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
<a href="Templates/www.caswebsolutions.net"><img src="images/casweb.jpg" width="150" height="38" alt="caswebsolutions" /></a></div>
</div>
<div id="footer">© Pitairlie Garage 2009</div>
</div>
</div>
</body>
<!-- InstanceEnd --></html>
Ray Borduin
04-02-2009, 11:35 AM
So it sounds like the problem is your session variable isn't being stored?
Where and how do you store it?
caswebsolutions
04-02-2009, 11:58 AM
I assumed dw/wa took care of that? There's no mention of where to store session variable when creating it or in the help files I had a quick look at
Ray Borduin
04-02-2009, 12:01 PM
I'm not familiar with the tutorial... What is the tutorial that told you to use: Session("promapspostcode")
caswebsolutions
04-03-2009, 12:27 AM
haven't dealt with any tutorial for session values
the tutorial i referred to earlier was the one for promaps when i was asking if there was any better tutorial that goes into more detail than the one that i'd been looking at.
Session("promapspostcode") - promapspostcode is the name i gave to the session value when creating it with DW/WA
Ray Borduin
04-03-2009, 07:32 AM
You would need to set that Session variable somewhere first before you could use it. It sounds like you might need to set that session variable on the page specified as the form action where the value is entered.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.