Option 2:
Nearest Requirements
This
functionality requires an Internal Use PostZon License, to allow
data to be uploaded, and used internally on one machine. To
trial the system you can simply used LicenseID =
0, this will give 500
demo address in list 1 and 2 as listed on the upload spreadsheet.
[Prices]
[Click
here for live Web Demo of Option 2]
Note:
Any lists or templates that has not been used for 6 months will
deleted.
Nearest Web Data
We offer a Web based solution to allow the
location of Stores to be loaded onto our server, either by putting
the data in an Excel spreadsheet and simply importing the data using the tool
provided by us. Or for those who want total integration we
provide a Web SOAP Service which allows calls to manage list by your program/web site.
Then a simple call web page, SOAP service or HTTP request to
return the closest stores to the TargetPostCode.
[Click here to see simple web page results]
The returned results can be either returned as
XML or merged with
a template you provide to give desired HTML to produce the
list. So simply call using server side script, and pop
the returned HTML into your page . Another function will
return Google Map code, together with the HTML to display results on
a map together with the nearest store list.
If the process returns a very small number of
results, then widen the search area if need be.
[Download
Pins used in examples]
Our
"Store" database structure is:
|
Name
|
Description
|
|
YourID
|
Your identifier, you can use to get full
record from your database.
UNIQUE
REQUIRED Integer
|
|
YourData1
|
This
can be loaded with any text you want to display. This could be
loaded with the ID of your record, full address, directions,
etc.
This
data is then merged with your template to expand to full HTML
[Click
here for simple example]
|
|
YourData2
|
As YourData1
|
|
YourData3
|
As YourData1
|
|
YourData4
|
As YourData1
|
|
YourData5
|
As YourData1
|
|
YourData6
|
As YourData1
If using filters
then can stop details being shown on pin click if set to "NODETAILS".
This allows control over each Pin
|
|
YourData7
|
As YourData1
|
|
YourData8
|
As YourData1
|
|
Longitude
|
We populate this for you when added to
database
|
|
Latitude
|
We populate this for you when added to
database
|
|
PostCode
|
The Postcode of your store.
REQUIRED
|
|
DataAdded
|
Date
added to database.
We
assign this when added.
format
YYYYMMDD
|
|
Type
|
Can
be used to filter out certain kinds of locations, in nearest
list and show different icons on a map
Optional
Char
[See
Example 5]
TypeFilter
will optionally filter out records from the nearest
list. You could use "A" for major stores,
"B" small stores and "C" for Petrol
stations. Then if displayed on map they could all have
different Pins. The actual list returned could
only include "AB", so the petrol stations would not
be listed.
This field could also be loaded with codes, which
relate to qualifications. Then the service is called with
the type code (qualification code) to product a list of
nearest consultants with curtail qualifications. |
|
Area
|
Allows you to
display all Stores in a certain area.
Optional String (2)
To display a map
for Area simple call the
GetNearestToPostCodeTemplateAndMap
with
ExtraFlags="AreaCode=Area"
the TargetPostcode should be set to center the
map
[See
Example 6,7]
|
The Excel spreadsheet
allows you to upload the above data very easily
Nearest to Postcode Functions Provided are:
Common Parameters:
|
LicenseID
|
Your License ID (Account Number)
This is given to you
when you open an account with us
|
|
ListID
|
1-10, allows you to have multiple lists.
|
|
Password
|
Password to your account |
|
ErrorDesc
|
Returns any errors if they occur, other wise
“” if OK |
For Trail use set
to 0. ListID=1 and 2 which are List 1 and 2 on the
spreadsheet. When calling these lists the DataKey,
LicenseID and Password
are ignored. You will NOT be able to update
these list.
SOAP Functions to Manage nearest Stores List:
The
following functions allow you to manage your store list on our
server, but we provide an Excel spreadsheet which allows you to
easily manage the list from with Microsoft Excel.
[Download Data
Importer]
SOAP
Service URL:
http://www.simplylookupadmin.co.uk/webservicenearest.asmx
RemoveAllFromList(LicenseID
as long,_
ListID as long,_
Password as string,_
ByRef ErrorDesc as string)
as Boolean
Returns
TRUE if removed, else error in ErrorDesc
if
ListID =-1 then delete all lists
RemoveEntryFromList(LicenseID
as long,_
ListID as long,_
Password as string,_
ByRef ErrorDesc as string,_
YourID as Long)
as Boolean
Returns
TRUE if removed, else error in ErrorDesc
GetListCount(LicenseID
as long,_
ListID as long,_
Password as string,_
ByRef ErrorDesc as string,_
YourCurrentLimit as long)
as long
Returns
count, else –1 and error in ErrorDesc
YourCurrentLimit is the list limit you currently have. if
ListID =-1 then get count for all lists
AddOrUpdateEntry(LicenseID
as long,_
Datakey as string,_
ListID as long,_
Password as string,_
ByRef ErrorDesc as string,_
MachineID as string,_
Postcode as string,_
YourID as long, _
YourData1 as string,_
YourData2 as string,_
YourData3 as string,_
YourData4 as string,_
YourData5 as string,_
YourData6 as string,_
YourData7 as string,_
YourData8 as string,_
Type as string,_
Area as string) as Boolean
Returns
TRUE if added/updated, else error in ErrorDesc
MachineID
must be the Computer name of the machine calling the function
Datakey
is you datakey given to you when you opened the account
GetAllInList(LicenseID
as long,_
ListID as long,_
Password as string,_
ByRef ErrorDesc as string,_
ExtraParameters as string)
as String
Returns
XML List if set, else error in ErrorDesc
ExtraParameters
may be used to filter the results in future versions
Returns:
<list>
<errordesc></errordesc>
<recordcount>2</recordcount>
<record>
<yourid>531252</yourid>
<yourdata1>My store at Wisbech</yourdata1>
<yourdata2>Turn left at the polices station. <b>Phone
08512 251258</b></yourdata2>
<yourdata3>ShowDetails.aspx?=829835</yourdata3>
<yourdata4></yourdata4>
<yourdata5></yourdata5>
<yourdata6></yourdata6>
<yourdata7></yourdata7>
<yourdata8></yourdata8>
<type></type>
<area></area>
<postcode>PE132XQ</Postcode>
<longitude>2.3512126</longitude>
<latitude>1.2162363</latitude>
<dateadded>20070304</dateadded>
</record>
<record>
<yourid>531253</yourid>
<yourdata1>My store at Kings Lynn</yourdata1>
<yourdata2>Turn right at the polices station. <b>Phone
08512 253522</b></yourdata2>
<yourdata3>ShowDetails.aspx?=829833</yourdata3>
<yourdata4></yourdata4>
<yourdata5></yourdata5>
<yourdata6></yourdata6>
<yourdata7></yourdata7>
<yourdata8></yourdata8>
<type></type>
<area></area>
<postcode>PE132XQ</postcode>
<longitude>2.3542126</longitude>
<latitude>1.2122233</latitude>
<dateadded>20070304</dateadded>
</record>
</list>
GetEntryFromList(LicenseID
as long,_
ListID as long,_
Password as string,_
ByRef ErrorDesc as string,_
YourID as long)
as String
Returns
XML List if set, else error in ErrorDesc
SOAP Functions to Manage Nearest Templates:
The
Templates drive the system, please look at the web demo page and
tick "show template information" to examine how the system
works. [Web
Demo Page] [Template
example]
SOAP
Service URL:
http://www.simplylookupadmin.co.uk/webservicenearest.asmx
SetTempate(LicenseID
as long,_
TemplateID as long,_
Password as string,_
ByRef ErrorDesc as string,_
HeaderTemplate as string,_
DetailsTemplate as string,_
FooterTemplate as string,_
NextPageURL as string) as Boolean
SetTempateWithGoogleDetails(LicenseID
as long,_
TemplateID as long,_
Password as string,_
ByRef ErrorDesc as string,_
HeaderTemplate as string,_
DetailsTemplate as string,_
FooterTemplate as string,_
NextPageURL as string,_
MapIconsLocation as string,_
ShowTargetPin as boolean,_
ShowShadowOnPins as boolean,_
UseNumberedPins as boolean,_
UseTypeFilterPins as boolean,_
MapTargetPin_Details as string,_
Target_PinIcon_Details as string,_
Included_PinIcon_Details as string,_
FilteredOut_PinIcon_Details as string,_
MapTabTemplate1 as string,_
MapTabTemplate2 as string,_
MapTabTemplate3 as string,_
MapTabTemplate4 as
string,_
ExtraFlags as string) as Boolean
Returns
TRUE if set template for List, else error in ErrorDesc
The HeaderTemplate,DetailsTemplate
and FooterTemplate
can be any text which contains a series of tags, which will
be replaced by the data in your table
Header Tags for use in Templates
For
DetailsTemplate:
| Tag |
Description |
|
_yourid_
|
Replaced with Your ID,from the database |
|
_yourdata1_
|
Replaced with Your Data1, from the database |
|
_yourdata2_
|
Replaced with Your Data2, from the database |
|
_yourdata3_
|
Replaced with Your Data3, from the database |
|
_yourdata4_
|
Replaced with Your Data4, from the database |
|
_yourdata5_
|
Replaced with Your Data5, from the database |
|
_yourdata6_
|
Replaced with Your Data6, from the database
If using filters
then can stop details being shown on pin if "NODETAILS"
|
|
_yourdata7_
|
Replaced with Your Data7, from the database |
|
_yourdata8_
|
Replaced with Your Data8, from the database |
|
_postcode_
|
Replaced with postcode,from the database |
|
_longitude_
|
Replaced with Longitude,from the database |
|
_latitude_
|
Replaced with Latitude,from the database |
|
_km_ or _mile_
|
Distance from target |
|
_dateadded_
|
Replaced with date added to the database |
|
_rank_
|
Replaced with rank count for page of results |
|
_type_
|
Replaced with type |
|
_alphcount_
|
Replaced with A,B,C... count for page of results |
For HeaderTemplate
and FooterTemplate:
| Tag |
Description |
|
_recordcount_
|
Replaced with record count of results
found in list. |
|
_pincount_
|
Replaced with map pin count of results
found in list. |
|
_listcount_
|
Replaced with number of items in
list on current page |
|
_nopages_
|
Replaced with number of pages of results |
|
_pageno_
|
Replaced with page number |
|
_pageselection_
|
Replaced with link to pages [1] [2]
[3]... |
|
_previouspage_
|
Replaced with link to previous page
if on page 2 onwards |
|
_nextpage_
|
Replaced with link to next page if
on page 1 to last but one. See example below... |
For NextPageURL:
| Tag |
Description |
|
_targetpostcode_
|
Replaced with Target Postcode in
link |
|
_page_
|
Replaced with
Target Page in link
See example
below... |
All must be in lower case
All the other parameters are used by mapping
functions, and can be left blank if map is not needed.
IconsLocation
is optional, but should point to web directory where pin icons can
be found. Icons should be named "icon" &
type & ".png" so different icons can be used for
different types of nearest property. Such as schools etc. If
blank will use default Google pin. If type is not used you
should give a "icon.png", and "shadicon.png" if
shadows are on. [See
Example 5 shows type icons]
if
ShowTargetPin
then displays a ping for the Target Postcode "icontarget.png",
and "shadicontarget.png" if shadows are on.
[See
Example 2 and 3]
TargetPin_Details
show if user clicks on pins. Leave blank if not needed.
Click on target pin in example 2 and 3.
ShowShadowOnPins,
if true then uses shadow pins. Uses the same names as other
icon with prefix "shad". Therefore "icontarget.png"
becomes "shadicontarget.png". If using filter
on types then icon for shadow is called "shadiconfilterout.png".
All examples use shadows.
UseNumberedPins
if True then uses "iconx.png" where x is the rank
in the results. This allows you to create pins representing
1-10 (or A-Z) and display them which match the text results (using
_rank_ or
_alphcount_ tag to match).
[See
Example 4 and 5]
Target_PinIcon_Details,Included_PinIcon_Details
and
FilteredOut_PinIcon_Details
should
be a list of co-ordinates for each type of icon. IconsSizeX,
IconSizeY, ShadowSizeX, ShadowSizeY, IconAnchorX, IconAnchorY,
InfoWindowAnchorX and InfoWindowAnchorY
TabTemplate1
template to merge with your data to show details when user clicks on
pin. Leave blank to just show pins. [See
Example 2]
TabTemplate2-4
extra tabs on pins. Leave blank if not needed. Use tag <tabname>Tab
Name</tabname> to define tab names within TabTemplate1-4.
[See
Example 3]
ExtraFlags
allows extra functionality, as listed below:
|
if contains
|
Description |
|
NOSCALE
|
removes scale on Google map. |
| |
|
| |
|
| |
|
Each
value should be separated by comma
Template Example:
Please
look at the web demo page and tick "show template
information" to examine how the system works.
[Web
Demo Page]
You have loaded:
YourData1=Store
name
YourData2=Simple
Directions
YourData3=Phone
Number
Template
Header:
<h1>_recordcount_
Stores Found</h1>
Template
Details:
<b> _rank_ _km_km Store: </b>_postcode_ _yourdata1_<br>
<b>Details:</b>_yourdata2_ <font color=blue><b>Phone:_yourdata3_</b></font><br>
<a
href="http://www.mypage.com/details.aspx?id=_yourid_">Click here for more information</a><hr>
Template
Footer:
page _pageno_ of
_nopages_ _pageselection_ _previouspage_ _nextpage_
HeaderTemplate
and FooterTemplate
can be left blank if not required
Next Page URL:
http://www.mypage.com/GetPage.aspx?postcode=_targetpostcode_&page=_page_
If you
need to pass your own parameters to this page, simply insert your
own parms using a text replace function e.g HTML=HTML.replace("?postcode=","?userid=3552&postcode="),
before displaying page.
Results:
TargetPostcode=PE13
2QL
29 Stores Found
1 0km Store: PE13 2QL Wisbech Cambridgeshire
Details:Turn right at the roundabout Phone:3235-2312494
Click here for more information
2 1.2km Store: PE13 2XQ Wisbech Cambridgeshire
Details:Turn left at the roundabout Phone:3235-2312495
Click here for more information
3 21km Store: PE30 2JG King`s Lynn Norfolk
Details:Turn left at the roundabout Phone:3235-2312497
Click here for more information
...
8 53.6km Store: CB3 9NN Cambridge Cambridgeshire
Details:Turn right at the roundabout Phone:3235-2312280
Click here for more information
9 64km Store: NN9 5SY Wellingborough Northamptonshire
Details:Turn left at the roundabout Phone:3235-2312473
Click here for more information
10 68.5km Store: SG8 0PD Royston Herts
Details:Turn left at the roundabout Phone:3235-2312555
Click here for more information
page 1 of 3 [2] [3] [Next]
GetListRecordWithTemplate(ByVal
LicenseID As Long, _
ByVal ListID As Long, _
ByVal TemplateID As Long, _
ByVal Password As String, _
ByRef ErrorDesc As String, _
ByRef YourID As Long) As String
This
function gets a list entry an merges it with a template DetailsTemplate
field. Therefore can be use to show the Store details
using the same data from the nearest list
SOAP/HTTP Functions to Get Addresses Nearest PostCode:
HTTP
call
http://www.simplylookupadmin.co.uk/nearest/GetNearestToPostCodeTemplate.aspx
?licenseid=0&templateid=1&listid=1&password=&datakey=YOURDATAKEY
&targetpostcode=PE132QL&withinkm=100&pagesize=10&pageno=1&typefilter=
&extraflags=
HTTP
calls should only be made by server side script since they contain
your password.
If
error then returns error description:
<errordesc>"Postcode
not found</errordesc>
SOAP
Service URL:
http://www.simplylookupadmin.co.uk/webservicenearest.asmx
The
above call returns the JavaScript to generate a Google Map similar
to the SOAP call below:
SOAP
Function
GetNearestToPostCodeTemplate(LicenseID
as long,_
TemplateID as integer,_
ListID as integer,_
Password as string,_
DataKey as string,_
ErrorDesc as string,_
MachineID as string,_
TargetPostcode as string,_
WithinKM as double,_
PageSize as integer,_
PageNumber as integer,_
ReturnedNumberOfRecords as integer,_
ExtraFlags as string,_
TypeFilter as string) as String
Returns
nearest Stores to PostCode
within WithinKM,
else error in ErrorDesc
MachineID
must be the Computer name of the machine calling the function if for
internal use. Should be left blank if for Web use.
PageSize
and PageNumber
allow pages of results to be displayed. [See
Example 1]
TemplateID
is the template you have uploaded to merge with to show
results
ListID is the list of stores you have uploaded (1-10 or 99
for example data)
ReturnedNumberOfRecords
is the number of records returned
ExtraFlags
allows us to add extra functionality in the future, each
value will be separated by comma. if it contain "XML" then
the results of
GetNearestToPostCodeTemplate.aspx
will have a header content ="XML".
ExtraFlags
allows extra functionality, as listed below:
|
if contains |
Description |
|
XML |
the results of
GetNearestToPostCodeTemplate.aspx
will have a header content ="XML". |
Each
value should be separated by comma
TypeFilter
will optionally filter out records from the nearest list.
Leave blank or "ABC" will include all entries with type
A,B or C.
This
returns a sorted list of nearest stores, with paging functionality
Template
Example:
HTML_TO_Display=GetNearestToPostCodeTemplate(0,1,99,"DEMO",_
ErrorDesc,"PE132XQ",50,10,1,NumberOfRecords,_
"")
Gives
the stores closest to postcode "PE132XQ", with the first
10 results (page1) [See
Example 1]
HTML_TO_Display=GetNearestToPostCodeTemplate(0,1,99,"DEMO",_
ErrorDesc,"PE132XQ",50,10,2,NumberOfRecords,_
"")
Gives
the stores closest to postcode "PE132XQ", with the first
11-20 results (page2)
Calling
this function uses 1 PostZon lookup credit if used on the Web
HTTP
call
http://www.simplylookupadmin.co.uk/nearest/GetNearestToPostCodeXML.aspx
?licenseid=0&templateid=1&listid=1&password=&datakey=YOURDATAKEY
&targetpostcode=PE132QL&withinkm=100&pagesize=10&pageno=1
&typefilter=&extraflags=
HTTP
calls should only be made by server side script since they contain
your password.
If
error then returns error description
The
above call returns the JavaScript to generate a Google Map similar
to the SOAP call below:
SOAP
Function
GetNearestToPostCodeXML(LicenseID
as long,_
ListID as integer,_
Password as string,_
DataKey as string,_
ErrorDesc as string,_
MachineID as string,_
TargetPostcode as string,_
WithinKM as double,_
PageSize as integer,_
PageNumber as integer,_
ReturnedNumberOfRecords as integer,_
ExtraFlags as string,_
TypeFilter as string) as String
Returns
nearest Stores to nearest TargetPostCode within
WithinKM, else error in
ErrorDesc
MachineID
must be the Computer name of the machine calling the function if for
internal use. Should be left blank if for Web use.
PageSize
and PageNumber allow pages of results to be displayed.
[See
Example 1]
ListID is the list of stores you have uploaded (1-10 or 99
for example data)
ReturnedNumberOfRecords
is the number of records returned
ExtraFlags
allows us to add extra functionality in the future, each
value will be seperated by comma.
TypeFilter
will optionally filter out records from the nearest list.
Leave blank or "ABC" will include all entries with type
A,B or C. [See
Example 5]
The functionality of this is the same as GetNearestToPostCodeTemplate
but returns XML.
Calling this function uses 1 PostZon lookup
credit if used on the Web
Returns:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<!DOCTYPE list [
<!ELEMENT recordcount (#PCDATA)>
<!ELEMENT errordesc (#PCDATA)>
<!ELEMENT record
(yourid,yourdata1,yourdata2,yourdata3,yourdata4,
yourdata5,yourdata6,yourdata7,yourdata8,type,postcode,longitude,
latitude,dateadded,rank,rankchar,km,mile )>
<!ELEMENT yourid (#PCDATA)>
<!ELEMENT yourdata1 (#PCDATA)>
<!ELEMENT yourdata2 (#PCDATA)>
<!ELEMENT yourdata3 (#PCDATA)>
<!ELEMENT yourdata4 (#PCDATA)>
<!ELEMENT yourdata5 (#PCDATA)>
<!ELEMENT yourdata6 (#PCDATA)>
<!ELEMENT yourdata7 (#PCDATA)>
<!ELEMENT yourdata8 (#PCDATA)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT postcode (#PCDATA)>
<!ELEMENT longitude (#PCDATA)>
<!ELEMENT latitude (#PCDATA)>
<!ELEMENT dateadded (#PCDATA)>
<!ELEMENT rank (#PCDATA)>
<!ELEMENT rankchar (#PCDATA)>
<!ELEMENT km (#PCDATA)>
<!ELEMENT mile (#PCDATA)>
]>
<list>
<recordcount>2</recordcount>
<errordesc></errordesc>
<record>
<yourid>285</yourid>
<yourdata1>Wisbech Cambridgeshire</yourdata1>
<yourdata2>Turn right at the roundabout</yourdata2>
<yourdata3>3235-2312494</yourdata3>
<yourdata4></yourdata4>
<yourdata5></yourdata5>
<yourdata6></yourdata6>
<yourdata7></yourdata7>
<yourdata8></yourdata8>
<type></type>
<postcode>PE132QL</postcode>
<longitude>0.161667</longitude>
<latitude>52.659888</latitude>
<dateadded>20070828</dateadded>
<rank>1</rank>
<rankchar>A</rankchar>
<km>0</km>
<mile>0.0</mile>
</record>
<record>
<yourid>286</yourid>
<yourdata1>Wisbech Cambridgeshire</yourdata1>
<yourdata2>Turn left at the roundabout</yourdata2>
<yourdata3>3235-2312495</yourdata3>
<yourdata4></yourdata4>
<yourdata5></yourdata5>
<yourdata6></yourdata6>
<yourdata7></yourdata7>
<yourdata8></yourdata8>
<type></type>
<postcode>PE132XQ</postcode>
<longitude>0.155272</longitude>
<latitude>52.650114</latitude>
<dateadded>20070828</dateadded>
<rank>2</rank>
<rankchar>B</rankchar>
<km>1.2</km>
<mile>0.7</mile>
</record>
</list>
SOAP/HTTP Functions to Get Nearest with Google Map Code:
The
following generates a list of nearest stores and the code to display
a Google map.
HTTP
call
http://www.simplylookupadmin.co.uk/nearest/GetNearestToPostcodeMapXML.aspx
?licenseid=0&templateid=1&listid=1&password=&datakey=YourDataKey
&targetpostcode=PE132QL&withinkm=100&pagesize=10&pageno=1&typefilter=
&extraflags=&nopins=1000&mapkey=YourGoogleMapKey
&zoomlevel=10&showcontrols=1&showoverview=1&showmaptype=1
HTTP
calls should only be made by server side script since they contain
your password.
If
error then returns error description:
<errordesc>"Postcode
not found!</errordesc>
This
call returns both the merged template data (list of stores) and the Google map
code in XML. This returned code is then simply displayed
on your own page, using your own Google Map key.
See the PHP
or classic ASP example, in the "nearest" directory of our example
code, to see how to use this.
SOAP
Service URL:
http://www.simplylookupadmin.co.uk/webservicenearest.asmx
The
above call returns the JavaScript to generate a Google Map similar
to the SOAP call below:
SOAP
Function
GetNearestToPostCodeTemplateAndMap(LicenseID
as Long,_
TemplateID as integer,_
ListID as integer,_
Password as string,_
DataKey as string,_
ErrorDesc as string,_
MachineID as string,_
TargetPostcode as string,_
WithinKM as double,_
PageSize as integer,_
PageNumber as integer,_
MaximumPinNumber as integer,_
ReturnedNumberOfRecords as long,_
TypeFilter as string,_
YourGoogleMapKey as string,_
ZoomLevel as integer,_
ShowControls as boolean,_
ShowOverViewWindow as boolean,_
ShowTypeControls as boolean,_
ExtraFlags as string,_
ByRef GoogleMapCode as string) as String
Returns
nearest Stores to nearest to TargetPostCode
within WithinKM,
else error in ErrorDesc
MachineID
must be the Computer name of the machine calling the function if for
internal use. Should be left blank if for Web use.
TemplateID
is the template you have uploaded to merge with to show
results. Set to -1 if only a map is required.
ListID is the list of stores you have uploaded (1-10 or 99
for example data)
PageSize
and PageNumber
allow pages of results to be displayed. If just want a
map then set PageSize
=0
[See
Example 1]
MaximumPinNumber
is the maximum number of pins to put on map. Therefore the Map
can contain more results than the list.
TypeFilter
will optionally filter out records from the nearest list.
Leave blank or "ABC" will include all entries with type
A,B or C.
[See
Example 5]
YourGoogleMapKey
should be your Google map key, which is given to you by
Google
ZoomLevel
Google zoom level (8 or 9 is a good value)
11=5km per inch
10=10km per inch
9=20km per inch
8=40km per inch
7=50km per 3/4 inch
6=100km per 3/4 inch
ShowControls
shows zoom and pan controls
ShowOverViewWindow
shows a small overview of map in corner of map
ShowTypeControls
allows the use to switch between map and satellite picture
ReturnedNumberOfRecords
is the number of records returned
ExtraFlags
allows extra functionality, as listed below:
|
if contains |
Description |
|
AreaCode=S |
then
gets all in list with AreaCode is "S", this will be
sorted by Postcode. nopins
should be 10000, and Paging is not available
WithinKm
is ignored also [See
Example 5] |
|
SORTBYYOURDATA6 |
When using AreaCode,
Sort results by YourData6 instead of PostCode |
|
|
|
|
|
|
Each
value should be separated by comma
GoogleMapCode
returns code for displaying result in Google map.
This should be included in your page header.
Example code returned:
<script src="http://maps.google.com/maps?file=api&v=2&key=abcdefg"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
Javascript to give map for nearest store found...
//]]>
</script>
Code to
display map on your page is:
<body onload="load()" onunload="GUnload()">
<div id="map" style="width: 500px; height: 300px"></div>
</body>
Simple Map Example, no pins:
Nearest_List_HTML_TO_Display=GetNearestToPostCodeTemplateAndMap(0,1,99,"DEMO",_
ErrorDesc,"PE132XQ",50,10,1,NumberOfRecords,_
"","GoogleMapKey",16,true,true,true,"","","","",_
"","","","",GoogleMapCode)
Simple Map Example, with pins, with details:
Nearest_List_HTML_TO_Display=GetNearestToPostCodeTemplateAndMap(0,1,99,"DEMO",_
ErrorDesc,"PE132XQ",50,10,1,NumberOfRecords,_
"","GoogleMapKey",16,true,true,true,_
"www.mysite.com/pins","www.mysite.com/pins/target.png",_
"_yourdata6_",_
"<b>Store:
_yourdata1_<b><br>_yourdata3_<br><a
href”_yourdata2_”>Click here for more information</a>",_
"","","","",GoogleMapCode)
[Google
map with Pins API]