Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.2
-
Fix Version/s: EE-3.2.0.BETA, EE-3.2.0.GA, 3.3
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ICEfaces3 trunk revision# 32166
Description
When setting the mandatoryResource config for 'gMap' or 'org.icefaces.ace.component.gmap.GMap' and dynamically including ace:gMap on the page the component does not render.
Test application is located at: http://server.ice:8888/svn/repo/qa/trunk/Regression-Icefaces2/Sparkle/Manual/gMap
Test page is located at /gMapMandResConf.jsf
Activity
Migration
created issue -
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #32334 | Fri Nov 23 12:15:19 MST 2012 | art.zambrano | |
Files Changed | ||||
MODIFY
/icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapMeta.java
MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapResourceHandler.java |
Migration
made changes -
Field | Original Value | New Value |
---|---|---|
Reporter | Migration [ remote ] | Cruz Miraback [ cmiraback ] |
Migration
made changes -
Assignee | Arturo Zambrano [ artzambrano ] |
Migration
made changes -
Fix Version/s | EE-3.2.0.GA [ 10332 ] | |
Fix Version/s | 3.3 [ 10370 ] |
Arturo Zambrano
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Arturo Zambrano
made changes -
Link | This issue blocks ICE-8757 [ ICE-8757 ] |
Ken Fyten
made changes -
Fix Version/s | EE-3.2.0.BETA [ 10573 ] | |
Fix Version/s | 3.3 [ 10370 ] |
Ken Fyten
made changes -
Security | Private [ 10001 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
After extensive investigation, I finally found out that the problem has nothing to do with the mandatory resource configuration, and that the problem is caused the the google code itself.
{mapTypeId:google.maps.MapTypeId.ROADMAP, zoom:5, center: new google.maps.LatLng(0,0)}This situation only happens when trying to load a gmap component dynamically, as the gMapMandResConf.jsf page does: it dynamically includes an xhtml document, containing a gmap, when the checkbox is on. When the script snippet produced by the renderer to initialize the component is loaded to the page via a dynamic update, the google maps API fails to work properly. In particular, it fails to download a number of required javascript resources required for gmaps to work. If the script to initialize the component is already present when the page is first loaded, then the google API successfully loads all other required resources from google's servers and the map is displayed.
For now, the solution seems to be to initialize a dummy map when first loading the page, and then discarding it. This causes the gmaps API to (pre)load all external required resources as soon as the page is loaded. If the following code is either hard-coded in a script element on the page or added to the end of the gmap component scripts, it will solve the issue:
new google.maps.Map(document.createElement('div'),
);