close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

having trouble setting the initial zoom

Thread began 10/09/2011 7:51 pm by JBWebWorks | Last modified 12/06/2011 7:43 am by JBWebWorks | 3038 views | 10 replies |

JBWebWorks

having trouble setting the initial zoom

here is my page
store-locator.php

Used the info from support on how to set the zoom and have added this line to
wagmp_map_1.php 3different places.

map.setZoom(5);

When the page loads in browser (checked IE 9, firefox, chrome and IE compatibility view)
the zoom is correct for a second and then it changes to the least zoom viewing the US.

thanks for your help,
-Jim Balthrop

Sign in to reply to this post

JBWebWorks

Disregard my previous post, i found the solution in another post concerning the permissions for directory, _promaps_cache.
Once i set the correct permissions, the page with the map starting loading faster and the zoom setting is now corrected.

-Jim Balthrop

Sign in to reply to this post

JBWebWorks

I spoke too soon; i am now having the same problem. Not sure if it is the zoom setting, my DB structure or my recordset.

here is my page
store-locator.php

I have 2 recordsets from the same table. 1 supplies the map, the other populates a repeat region with the store listings.

the map recordset-
mysql_select_db($database_connsecret, $connsecret);
$query_rs_storelocation = "SELECT store_locator.store_name, store_locator.store_address, store_locator.store_city, store_locator.store_state, store_locator.store_zip, store_locator.store_phone, store_locator.store_active FROM store_locator WHERE store_locator.store_active = 'yes'";
$rs_storelocation = mysql_query($query_rs_storelocation, $connsecret) or die(mysql_error());
$row_rs_storelocation = mysql_fetch_assoc($rs_storelocation);
$totalRows_rs_storelocation = mysql_num_rows($rs_storelocation);

the repeat region store listings recordset-
mysql_select_db($database_connsecret, $connsecret);
$query_rs_stores = "SELECT store_locator.store_name, store_locator.store_link, store_locator.store_address, store_locator.store_city, store_locator.store_state, store_locator.store_zip, store_locator.store_phone, store_locator.store_active FROM store_locator WHERE store_locator.store_active = 'yes' ORDER BY store_locator.store_state, store_locator.store_city, store_locator.store_name";
$query_limit_rs_stores = sprintf("%s LIMIT %d, %d", $query_rs_stores, $startRow_rs_stores, $maxRows_rs_stores);
$rs_stores = mysql_query($query_limit_rs_stores, $connsecret) or die(mysql_error());
$row_rs_stores = mysql_fetch_assoc($rs_stores);

I am in the process of loading more store information into the db and i started having the problem today.
Page takes a long time to load and then the zoom jumps back and forth a few times and many of the locations are not shown on the map. Not consistant that i can see.

Sign in to reply to this post

Jason ByrnesWebAssist

one thing i see is in the _promaps_cache/_promaps_geocache.xml file, there is a bad tag at the end.

at the very end of that file change:
</geocode_data>
geocode_data>


to:
</geocode_data>



when the zoom of the map starts to flicker, it usually means that there are some addresses that the google geocoder is not able to find. if the address lookup fails, this code:
if (wagmp_map_1_obj.addressFailed) {
map.setCenter(new GLatLng(30, -98), 3);
}

will center the map on lat long: 30, -98, using the zoom level of 3


one address i can see being a problem is:
107 Harmony Crossing No 3, Eatonton, GA, 31024


if i go to maps.google.com to search for that address, it cannot find Harmony Crossing, but it can find Harmony Rd. The google maps website will return alternates, but the geocoder will not.

Sign in to reply to this post

JBWebWorks

thanks Jason.

I corrected the code tag in the _promaps_cache/_promaps_geocache.xml file and have tested the page in all browsers and it works fine.
The address, 107 Harmony Crossing No 3, Eatonton, GA, 31024 shows on the map as Harmony Road, so i won't change the address.

Question- what generates the _promaps_geocache.xml file and if i don't delete the file, should it ever be updated and possibly have the same bad tag problem?
If so, i can just correct it again on the server and i will know what to look for.

Thanks again, Jason

Sign in to reply to this post

Jason ByrnesWebAssist

the geocache.xml file is generated by the map js file.

it is updated any time there are new addresses.

If a new address is added to the database, the map js file will connect top the google geocoder to lookup the the latitude and longitude for that address, then update the XML file so it will not need to connect to the geocoder the next time the page is loaded.

I cant say how that line got messed up to be honest, but you should be able to go to the xml file in the browser:
_promaps_geocache.xml


and not see any errors.

Sign in to reply to this post

JBWebWorks

Jason,

I am still having problems with the XML file getting the wrong code tags.
I am not adding any more addresses at the present and have a little over 200 addresses at the present.
When i see the problem with the map zooming in and out on page load, i go to the file manager and correct the code in the XML file; always a bad tag at the bottom of the file.

I have checked the permission settings of 755.
Anything else i should check?

thanks for your help,
-Jim Balthrop

Sign in to reply to this post

Dani Chankhour

I have created a support ticket to further debug the issue. Most Likely It is an issue with one of the addresses. I will ask for more information in the ticket.

supporthistory.php

Sign in to reply to this post

JBWebWorks

What you did corrected the problem with that site. Thanks!

I am having a similar problem with another site but there are no special characters in the addresses for this one.
The only similarity is they are both hosted on GoDaddy and both pull locations from a recordset.

Let me know if you need the ftp access for this page

property.php

thanks,
-Jim Balthrop

Sign in to reply to this post

Jason ByrnesWebAssist

when i view source of your page, i see the following code for the first address:

var address_0_0 = {
street: 'Click on Push Pins for Property Information',
city: '',
state: '',
zip: '',
country: '',
infowindow: 'custom',
infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong><a href="propertydetail.php?property_ID=1"></a></strong><br/><strong>Address:</strong><br />Click on Push Pins for Property Information<br />, </span>',
full: 'Click on Push Pins for Property Information, , , ,',
isdefault: true,
addressType: 'address',
loop: 'rs_property',
latitude: '',
longitude: '',
markerStyle: 'Push-Pin',
markerColor: 'Moab'
};




i think this is causing the issue,

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...