close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Start & End point placeholders

Thread began 6/19/2012 6:29 am by CraigR | Last modified 6/25/2012 1:58 pm by Jason Byrnes | 5199 views | 14 replies |

CraigRBeta Tester

Start & End point placeholders

i have added a form with a single field to my google maps page - so the user can enter a postcode for the start point for driving directions.

everything is working ok, but is there a way to display a pushpin, (or whatever) to further highlight the start and end points on the map ?

Sign in to reply to this post

Jason ByrnesWebAssist

it should show an A and B marker by default. can you send a link where i can see the map to look into the problem.

Sign in to reply to this post

CraigRBeta Tester

You need a direct link to the test page.

**url link removed**

try IP27 as a postcode

PS is there a setting to change kilometers to miles ?

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

the paths for the images aren't correct.

In the webassist/google_javascript folder, open the map php file, find all occurrences of:

MarkerImage('google_javascript/

and change it to:
MarkerImage('webassist/google_javascript/

Sign in to reply to this post

CraigRBeta Tester

thanks Jason.

is this the same issue that originally occurred with the standard placeholder path ?

Also. is there a way to display the distances in miles, instead of kilometers ?

Sign in to reply to this post

CraigRBeta Tester

Default units

I read in the api documentation that when coordinates are used, default units are always metric.
(I am using coordinates as the postcode isn't accurate enough).

I read you can explicitly set units as metric or imperial, but wasn't sure where to put it.

OK found it.

If anyone else has this issue, add a line to the block starting directionsDisplay.setPanel (.... -> (around line 183 in the map.php page)

replace

travelMode: google.maps.TravelMode.DRIVING

with

travelMode: google.maps.TravelMode.DRIVING,
unitSystem: google.maps.DirectionsUnitSystem.IMPERIAL

Sign in to reply to this post

Jason ByrnesWebAssist

in the map JS code, find the following code:

php:
var request = {

        origin: fromAddress.full,
        destination: address.full,
        travelMode: google.maps.TravelMode.DRIVING
      };



and change it to:

php:
var request = {

        origin: fromAddress.full,
        destination: address.full,
        travelMode: google.maps.TravelMode.DRIVING,
        unitSystem: google.maps.UnitSystem.IMPERIAL
      };
Sign in to reply to this post

CraigRBeta Tester

thanks Jason, I think our posts must have crossed.

Glad I got the same answer.

Sign in to reply to this post

Jason ByrnesWebAssist

ok, glad you got it working, I also logged a bug for the image paths and feature request so choose the directions units.

Sign in to reply to this post

CraigRBeta Tester

‘Confirm form Resubmission’

Following on from my earlier post...

I added a simple form with a single field, (postcode) to my page, to enable visitors to get directions using google maps.
on submit, the postcode field is used to set the starting point, and it works well.

However, if I use the back, then forward buttons on the browser, (chrome), I get an error message
‘Confirm form Resubmission’
I tried setting the form action to self and empty string, also tried saving the field value as a session variable, but I can’t get rid of the message.
Pressing F12 in chrome, I get a message saying that the page is unavailable

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...