On Directory homepage how do I to set default map location? We do not want it geo mapped to users location. What we do want is to have the map zoomed in on the local business within the city on first load.

For faster issue resolution please provide:
URL to your website:
Browser version:
Theme version:
October 23, 2013, 12:15am
AIT Supportpeter
Hello, for map there are 2 possible options. You can display whole map which will be zoomed on level in the way it can display all items.
Second option is with geolocation. You can enable it in ait dashboard/general/map or in local settings of each page under section for title and content (edit page screen). Also you can set radius. Then each user will see map focused in his location and items in mentioned radius.
October 23, 2013, 7:14pm

Please there has to be a way to set a default map location for the home page as neither of those 2 options above work for us since you do not have the option of a listing not appearing on the map.
October 23, 2013, 7:27pm

AIT Supportpeter
Hi, I played a while with javascript and only possibility is to fix gps in code. But I have really no idea if this will not break functionality of theme. So you are doing it on your own risk. Anyway, you can set gps coordinates in file: templates/snippets/map-javascript.php
Search for section
map: {
options: {
{foreach parseMapOptions($themeOptions->directoryMap) as $key => $value}
{if $iterator->first}{$key}: {!$value}{else},{$key}: {!$value}{/if}
{/foreach}
{if (isset($items)) && (count($items) == 1) && (!isset($isGeolocation))}
,center: [{ifset $items[0]->optionsDir['gpsLatitude']}{!$items[0]->optionsDir['gpsLatitude']}{else}0{/ifset},{ifset $items[0]->optionsDir['gpsLongitude']}{!$items[0]->optionsDir['gpsLongitude']}{else}0{/ifset}]
,zoom: {!$themeOptions->directory->setZoomIfOne}
{/if}
}
}and change center parameter to:
map: {
options: {
{foreach parseMapOptions($themeOptions->directoryMap) as $key => $value}
{if $iterator->first}{$key}: {!$value}{else},{$key}: {!$value}{/if}
{/foreach}
{if (isset($items)) && (count($items) == 1) && (!isset($isGeolocation))}
,center: [0, 0]
,zoom: {!$themeOptions->directory->setZoomIfOne}
{/if}
}
}It might be necessary also to adjust zoom parameter. And probably important to disable geolocation on homepage. This will not work on single item page or category page.
October 23, 2013, 7:58pm

I really appreciate your help on this. I tried changing the center parameter to

,center: [0, 0]
and also tried:
,center: [48.4598545, -115.89380219999998]

and it did not make any difference.

I also disabled geolocation on home page... any other ideas?
October 23, 2013, 8:20pm

AIT Supportpeter
Hello, I tried this solution on my localhost installation. But after discussion with other member of support we realize that it doesn't work on his installation. It can be caused by some kind of plugin or simply cache. My installation was totally new without any modifications and previous plugins. Try to delete all cache from browsers, check if you have no caching plugin, etc. I really can't reproduce the problem when it doesn't work, because in my case it works perfectly. I really can't do more
October 24, 2013, 1:26pm

I am working off of a fresh install. No modifications and No cache plugins. I even went to another computer to assure there are no cache issues. Please we absolutely have to have a default map location on the front page or this whole system is useless to us. In our small town geo-mapping users location will show them in another town entirely 20 miles away. Please help. There must be a solution.
October 24, 2013, 7:02pm

AIT Supportpeter
I am really sorry. I can't reproduce a conditions on my installation. Seems like it works only on localhost I use. On other servers it didn't work. In this case I can't find a simple solution that will work for everyone and it is not in my best to provide complex modification and rewrite the code of template for feature which isn't supported in default.
October 26, 2013, 6:46pm

Its too bad. It seems that if your program can Geo-map someones location it shouldn't be that hard to just change the variable to a set longitude and latitude. It is unfortunate that we cannot use this Directory portal since Geo-mapping doesn't work here. If we could just set a default location this solution would be perfect.
Please let me know what steps to take to get a refund as we cannot use this portal. Thanks.
October 28, 2013, 4:48pm

AIT Supportpeter
Hello, I am sorry for your disappointment. This theme was designed to use geolocation as powerful feature and it works for most of users as you can see here on this forum. As it is written in our conditions it is not in our best to provide modifications on personal demand. For refund issues please contact directly envato company.
October 30, 2013, 12:25am