Find Jobs
Hire Freelancers

373929 Modify googlemap store locator

N/A

In Progress
Posted over 14 years ago

N/A

Paid on delivery
I have made a Store Locator that uses Googlemap to show where stores are near a postcode that the user types in. The code is Javascript. The Google Maps Store Locator code I used for the UK is from here: [login to view URL] But I want to also find stores in Europe and America. To do this I got instructions (which I have posted BELOW), and I need you to this for me. I understand that there would need to be two buttons, one for people looking from the UK, and one for people looking for shops outside the UK. Stuff about Geocode addressing is here: [login to view URL] There is a 'helpful code example' of a Javascipt function on that page too The UK Store Finder I set up is here: [login to view URL];=en You can see the script in the Page Source code. Let me know if you can do this. INSTRUCTIONS: There are several bits of coding involved with implementing the current international store locator solution. Firstly, you will need some way of determining whether the user is searching form inside the UK (therefore using the already implemented function) or from outside the UK. This could be achieved through a check box or radial button or such like. This checkbox must on selection select a separate set of entry fields to allow for street address, town address, and country, variables to be set. Then on click of a find button you will need to write a function to call our international geocode function, an example request for this would be: [login to view URL] Campbell Avenue, Revelstoke&country=Canada Obviously the URL would be built to feed the set variables from the input fields into the sections of the URL labelled in red. (The account_code and Licence_code variables having been set on click of button.) Following this URL call, our service will respond with data, as shown below: <?xml version="1.0" encoding="UTF-8" ?> - <PostcodeAnywhere Server="WEB01" Version="3.0" Date="08/12/2009 10:45:40" Duration="0.906s"> - <Schema Items="8"> <Field Name="line1" /> <Field Name="line2" /> <Field Name="city" /> <Field Name="state" /> <Field Name="postal_code" /> <Field Name="country" /> <Field Name="longitude" /> <Field Name="latitude" /> </Schema> - <Data Items="1"> <Item line1="204 Campbell Ave" city="Revelstoke" state="BC" postal_code="V0E" country="Canada" longitude="-118.196364" latitude="50.999765" /> </Data> </PostcodeAnywhere> This data will need to be handled in order to extract the Longitude and latitude values from the dataset (highlighted in red). These variables will then need to be added into the stored nearest request URL, an example of this is here: [login to view URL], -118.196364&items=5 The items variable can be altered to return as many results as you wish. This request URL will return the following dataset: <?xml version="1.0" encoding="UTF-8" ?> - <PostcodeAnywhere Server="WEB01" Version="3.0" Date="08/12/2009 10:52:12" Duration="0.000s"> - <Schema Items="13"> <Field Name="origin_postcode" /> <Field Name="destination_postcode" /> <Field Name="distance" /> <Field Name="id" /> <Field Name="description" /> <Field Name="grid_east_m" /> <Field Name="grid_north_m" /> <Field Name="longitude" /> <Field Name="latitude" /> <Field Name="os_reference" /> <Field Name="wgs84_longitude" /> <Field Name="wgs84_latitude" /> <Field Name="name" /> </Schema> - <Data Items="3"> <Item origin_postcode="WR2 6NJ" destination_postcode="B495HH" distance="16.7" id="B495HH" grid_east_m="408500" grid_north_m="257200" longitude="-1.87558247025747" latitude="52.2125516607223" os_reference="SP 08500 57200" wgs84_longitude="-1.87702611910997" wgs84_latitude="52.2129184249234" /> <Item origin_postcode="WR2 6NJ" destination_postcode="B153DH" distance="22.0" id="B153DH" grid_east_m="405200" grid_north_m="285800" longitude="-1.92344286017311" latitude="52.4697413397962" os_reference="SP 05200 85800" wgs84_longitude="-1.92489025672413" wgs84_latitude="52.4700828279181" /> <Item origin_postcode="WR2 6NJ" destination_postcode="W1A1AA" distance="103.4" id="W1A1AA" grid_east_m="528800" grid_north_m="181600" longitude="-0.14344480938139" latitude="51.5181352363838" os_reference="TQ 28800 81600" wgs84_longitude="-0.145030558293944" wgs84_latitude="51.5185906315023" /> </Data> </PostcodeAnywhere> This data can then be handled in the same way as the stored nearest results are in the google maps example which I already made. See The UK Store Finder I set up here: [login to view URL];=en You can see the script in the Page Source code.
Project ID: 2119774

About the project

Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of
London,
0.0
0
Member since Dec 11, 2009

Client Verification

Other jobs from this client

374073 Modify googlemap store finder
N/A
Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.