Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Google Maps conflict???
Dan_O
Is anyone successfully using the JavaScript Google Maps API within the DCT to geocode an address? I think I've come up against a code conflict between the JavaScript in Google Maps and TeamSite. I am calling their API in the onSave handler. While developing and testing I made sure the handler always returned false to prevent the Save from actually happening. I was able to return the latitude and longitude properly from a submitted address.
However, when I was ready for further testing by having the handler return true on a valid geocoding, things went horribly wrong. After my alert() telling me that the geocoding was successful, I get an error box popping up that says,
Save was unsuccessful. Invalid category/type null was received.
The title of the error box says, "Save Error". The Close button that appears in the error box doesn't work, and in FireFox throws "Error: enableClosebtn is not defined" in the JavaScript Console. The link box near the top of the DCT window that normally shows Save, Save As, etc., is replaced with a semicolon. The Cancel button at the bottom of the DCT form doesn't work either, and throws "Error: top._dcWin.datacapture_buttonframe.doClose is not a function" into FF's JavaScript Console. If I comment the actual call to the Google Maps geocoding command, the Save works fine. This happens with either of Google's geocoding commands, getLatLng or getLocations.
My best guess is that some bit of Google code is stepping on TS's JavaScript.
I would greatly appreciate hearing from anyone who can shed some light on this, especially if using Google Maps.
Dan
Find more posts tagged with
Comments
Dan_O
Never mind about this post. Turns out it came down to a subtlety about JavaScript objects, strings and floats get cast that I was not familiar with. Once I got help figuring it out, it appears that Google Maps can peacefully coexist with TeamSite.
Dan