Features
Locator is an application that adds new opportunities of searching locations in a set radius from the start point. You can make your Store Locator, Places of interest Locator in the region, etc.Requirements
- EE1 - PHP 4+ with allow_url_fopen directive, ExpressionEngine 1.6.5+, SL Google Map ext.
Installation
To install the new field type please follow the simple instructions below:- Download the Locator for SL Google Map archive and extract the files.
- EE1: Copy pi.mx_locator.php to /system/plugins/
You need also add a couple additional lines to your SL Google Map or download version with modifications from my examples (it's only .php, your still need to download package from eepro.co.uk):
Line 30
//wiseupstudio
var $postpone_saves = TRUE;
//wiseupstudio
line 51
if ($from !== FALSE && $from < '1.1.0') => if ($from !== FALSE && $from < '1.5.0')
line 65
//wiseupstudio
$sql[] = "ALTER TABLE exp_weblog_data ADD COLUMN sl_latitude varchar(100) NOT NULL";
$sql[] = "ALTER TABLE exp_weblog_data ADD COLUMN sl_longitude varchar(100) NOT NULL";
foreach ($sql as $sql_r) {
$DB->query($sql_r);
}
//wiseupstudio
line 295
//wiseup
if ($entry_id)
{
// update/insert module version in DB
$sql = "UPDATE exp_weblog_data
SET sl_latitude = '$map_data[0]', sl_longitude = '$map_data[1]'
WHERE entry_id = '$entry_id'";
$DB->query($sql);
}
//wiseup
Examples
Searching result
{exp:mx_locator:search weblogs="article" reverse_geocoding= "true" adress="" log="" lat="" unit = "" api_key="" radius = "500" prec="2"}
<p>{title} - {distance}</p>
{/exp:mx_locator:search}
Form for searching
{exp:mx_locator:form log="" lat="" unit = "" result_page = "/index.php/home/map" }
<input name="address" type="text" value="">
<br/>
<span class="BodyMBold">Select all stores within</span>
<select name="radius"><option value="100">100</option>
<option value="50" selected="selected">50</option>
<option value="30">30</option>
<option value="25">25</option>
<option value="20">20</option>
<option value="15">15</option>
<option value="10">10</option></select>
<span>miles</span><br/>
<input type="submit" value="Submit" />
{/exp:mx_locator:form}
Example 2
Based on Google Maps AJAX + MySQL/PHP Example. download exampleSL Google Map
it's only .php, your still need to download package from eepro.co.uk download exampleChange Log
ExpressionEngine1
- 0.5.0 - 02/28/2010:
Initial release
Support
- discontinue