DNN Blog

Jan 4

Posted by: Michael Washington
1/4/2009  RssIcon

StoreLocator

Live example: [Click Here]

Store Locator is a DNN4/DNN5 module that allows the administrator to enter unlimited locations that are automatically Geo-coded. Each module instance has it's own list of locations and Google API key. The Module is fully integrated in DNN and does not use IFrames. The Module also uses Linq to SQL.

This module is based on Donn Felker's Store Locator project. He writes about the details of the project here. This project was suppose to be an "easy port to DNN" but the Google Map API uses a lot of JavaScript and what is normally strait-forward for a standard ASP.NET application can get complex for DNN.

You can download the source code and read an article about the module here:

http://www.adefwebserver.com/DotNetNukeHELP/Misc/StoreLocator/StoreLocator.htm

Tags:
Categories:

12 comment(s) so far...


Gravatar

Re: DotNetNuke: Store Locator

Neat module. Have you thought about linking the stores into Yahoo! Local? Their API provides rating and other description information. You can also leverage the Lng/Lat provided by Google Maps to do a related or adjacent search.

By Ben on   1/5/2009
Gravatar

Re: DotNetNuke: Store Locator

I too would like to see this leverage the Lng/Lat. It could then be multipurpose not restricted to just street addresses. Have the folks from the Map module seen this yet?

By simonduz on   1/5/2009
Gravatar

Re: DotNetNuke: Store Locator

are there plans to extend the module for international usage (I do not see a country column, nor metric distances)?

By Sebastian Leupold on   1/5/2009
Gravatar

Re: DotNetNuke: Store Locator

I have no plans to further develop this module. This is just a programming example. If anyone wants to use it in production they are free to alter it. Source code is included. Perhaps someone will start a DNN Forge project with it?

By Michael Washington on   1/5/2009
Gravatar

Re: DotNetNuke: Store Locator

International support is already reasonable.. i entered a Dutch zip code and that was recognized without any issue

By ErikVB on   1/7/2009
Gravatar

Re: DotNetNuke: Store Locator

great, thanks!

By Sebastian Leupold on   1/7/2009
Gravatar

Re: DotNetNuke: Store Locator

I have done some testing with this app and it looks as though it only works for the northern hemisphere? I have typed in various places in the southern hemisphere and it returns invalid address. Is there any reason for this? ie maths calculation etc? I would like to ammend it so that it could work in the southern places :) btw. great work!

By songofthephoenix on   8/20/2009
Gravatar

Re: DotNetNuke: Store Locator

@songofthephoenix - It should work all over the world. It is simply calling the Google Maps API. The module may not format the zip code correctly. Source is provided to anyone who wants to try and tweak it.

By Michael Washington on   8/20/2009
Gravatar

Re: DotNetNuke: Store Locator

Hi,

Just letting people know that I got it working in the southern hemisphere pretty easily for the dnn module. Lat is negative in the southern hemisphere so I just changed

line 113 of googlegeocoder.cs from:

if (Convert.ToDecimal(geocodeInfo[2]) > 0)

to:

if (Convert.ToDecimal(geocodeInfo[2]) < 0)

works great now :)

By songofthephoenix on   8/21/2009
Gravatar

Re: DotNetNuke: Store Locator

Thanks Mike! This module works great, but to get it to work in Canada, I had to futz with it a bit. Basically I had to hardcoding CA (which would normally be California) and add postal code :)
I have a wierd issue though, the markers aren't showing up and I'm point the url correctly...
Meh, I'll keep futzing with it.
littlecreekdressing.com/Products/StoreFinder.aspx if you'd like to see it in action.
Cheers, and all the best, Mike!

By tantoedge on   2/22/2010
Gravatar

Re: DotNetNuke: Store Locator

does this module work in dnn6? I tried it with dnn 6 and it use to work fine. Now i am getting an error
DotNetNuke.Services.Exceptions.PageLoadException: Index was outside the bounds of the array. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at AdefWebserver.Modules.StoreLocator.GoogleGeoCoder.Geocode.GetCoordinates(String address, String googleApiKey) at AdefWebserver.Modules.StoreLocator.View.LoadMap() at AdefWebserver.Modules.StoreLocator.View.btnSubmit_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

Please reply as early as possible ...
thank you

By sharannya on   12/15/2011
Gravatar

Re: DotNetNuke: Store Locator

@sharannya - This is an old module that was never tested on DNN 6.

By Michael Washington on   12/15/2011
Attend A Webinar
Free Demo Site
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me
Have Someone Contact Me
Charlotte DoDNN

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

r2integrated
Telerik JustCode Free
Exact Target Exec Alert

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates the DotNetNuke Store where users purchase third party apps for the platform.