ICEfaces
  1. ICEfaces
  2. ICE-10347

ace:gMap - Add support for multiple subcomponents

    Details

    • Assignee Priority:
      P1
    • Workaround Exists:
      Yes
    • Workaround Description:
      Use c:forEach if you can. c:forEach will not work if the code populating the ace:gMapMarker components is in an f:event tag in the page. This is because all the f:events execute after c:forEach.

      Description

      Attempting to dynamically populate an ace:gMap component with ace:gMapMarker component does not work with ui:repeat:

              <ace:gMap style="height:500px; width:675px;">
                  <ui:repeat value="#{realmBean.userLocations}" var="location">
                      <ace:gMapMarker longitude="#{location.location.geometry.coordinates[0]}" latitude="#{location.location.geometry.coordinates[1]}" options="title:'#{location.username}'"/>
                  </ui:repeat>
              </ace:gMap>

      The result is an error in the browser (Firefox):

      TypeError: a is null
      ...b[r]+b.D);Sa(c,b[C]+b.I)}function Um(a){return new W(a[yb],a[Cc])};function Vm(a...
      {main,places}.js (line 44, col 1838)
      1. gMapMultipleLayers.xhtml
        2 kB
        Arturo Zambrano
      2. gMapMultipleServices.xhtml
        3 kB
        Arturo Zambrano

        Activity

        Brad Kroeger created issue -
        Brad Kroeger made changes -
        Field Original Value New Value
        Assignee Ken Fyten [ ken.fyten ]
        Brad Kroeger made changes -
        Summary ace:gMap Suuport for ui:repeat ace:gMap Support for ui:repeat
        Ken Fyten made changes -
        Assignee Ken Fyten [ ken.fyten ] Arturo Zambrano [ artzambrano ]
        Fix Version/s EE-4.0.0.GA [ 11171 ]
        Fix Version/s EE-3.3.0.GA_P03 [ 11572 ]
        Assignee Priority P2 [ 10011 ]
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Fix Version/s EE-4.0.0.GA [ 11171 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #43272 Wed Oct 29 11:16:15 MDT 2014 art.zambrano ICE-10347 added support for ui:repeat to all gMap* subcomponents
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapLayerRenderer.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapMarkerRenderer.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapOverlayRenderer.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapControlRenderer.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapServicesRenderer.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapRenderer.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapInfoWindowRenderer.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapEventRenderer.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapAutocompleteRenderer.java
        Hide
        Arturo Zambrano added a comment -

        43272: added support for ui:repeat to all gMap* subcomponents.

        Testing notes: This will require regression testing as well as creating a new test for each gMap* subcomponent, where a bunch of subcomponents are added to the page using ui:repeat. For example, the markup for the gMapMarker test would look something like this:

        <ace:gMap id="gMapMarker" style="width: 675px; height: 500px" latitude="0" longitude="0" zoomLevel="3">
        	<ui:repeat value="#{gMapMarkerBean.markerItems}" var="markerItem">
        		<ace:gMapMarker latitude="#{markerItem.lat}" longitude="#{markerItem.lon}" />
        	</ui:repeat>
        </ace:gMap>
        

        The items in the gMapMarkerBean.markerItems collection would be simple POJOs that store some of the attributes of the gMap* subcomponent, in this case latitude and longitude. The tests pass if the subcomponents are successfully displayed/applied on the map.

        Show
        Arturo Zambrano added a comment - 43272: added support for ui:repeat to all gMap* subcomponents. Testing notes: This will require regression testing as well as creating a new test for each gMap* subcomponent, where a bunch of subcomponents are added to the page using ui:repeat. For example, the markup for the gMapMarker test would look something like this: <ace:gMap id= "gMapMarker" style= "width: 675px; height: 500px" latitude= "0" longitude= "0" zoomLevel= "3" > <ui:repeat value= "#{gMapMarkerBean.markerItems}" var = "markerItem" > <ace:gMapMarker latitude= "#{markerItem.lat}" longitude= "#{markerItem.lon}" /> </ui:repeat> </ace:gMap> The items in the gMapMarkerBean.markerItems collection would be simple POJOs that store some of the attributes of the gMap* subcomponent, in this case latitude and longitude. The tests pass if the subcomponents are successfully displayed/applied on the map.
        Ken Fyten made changes -
        Fix Version/s EE-4.0.0.GA [ 11171 ]
        Fix Version/s 4.0 [ 11382 ]
        Hide
        Ken Fyten added a comment -

        ICEfaces 4 trunk r43281
        Tomcat 7, FF, 33, Chrome 38, IE 9, 10, 11 (IE 8 machine was not available during time of testing)

        ace:gmapLayer
        All browsers - Clicking on any of the links from this line "Relevant sections of the Google Maps API: Bicycling, KML, Traffic, Transit" opens the google API in the same page as the showcase demo.
        FF 33 - Navigating back to the demo causes a console error. Demo still functions.
        TypeError: this.cfg is undefined
        http://localhost:8080/showcase/javax.faces.resource/combobox/combobox.c.js.jsf?ln=icefaces.ace&v=4_0_0_141029
        Line 38

        ace:gMapInfoWindow (all browsers)
        When entering input for window 4, the input persists into windows Five, Six and Seven.
        To reproduce
        Navigate to ace:gMapInfoWindow > Overview
        Select the "Four" radioButton.
        Click the marker to display the window.
        Use the input field to enter some new text.
        Press submit.
        The text you entered will now be visible in the window.
        Press the "Five" radioButton.
        The text you entered into "four" will also be displayed in the window for "Five", "Six" and "Seven".

        Show
        Ken Fyten added a comment - ICEfaces 4 trunk r43281 Tomcat 7, FF, 33, Chrome 38, IE 9, 10, 11 (IE 8 machine was not available during time of testing) ace:gmapLayer All browsers - Clicking on any of the links from this line "Relevant sections of the Google Maps API: Bicycling, KML, Traffic, Transit" opens the google API in the same page as the showcase demo. FF 33 - Navigating back to the demo causes a console error. Demo still functions. TypeError: this.cfg is undefined http://localhost:8080/showcase/javax.faces.resource/combobox/combobox.c.js.jsf?ln=icefaces.ace&v=4_0_0_141029 Line 38 ace:gMapInfoWindow (all browsers) When entering input for window 4, the input persists into windows Five, Six and Seven. To reproduce Navigate to ace:gMapInfoWindow > Overview Select the "Four" radioButton. Click the marker to display the window. Use the input field to enter some new text. Press submit. The text you entered will now be visible in the window. Press the "Five" radioButton. The text you entered into "four" will also be displayed in the window for "Five", "Six" and "Seven".
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Fix Version/s EE-4.0.0.GA [ 11171 ]
        Ken Fyten made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #43307 Thu Oct 30 17:24:01 MDT 2014 ken.fyten ICE-10347 added support for ui:repeat to all gMap* subcomponents
        Files Changed
        Commit graph MODIFY /icefaces4/tags/icefaces-4.0.0/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapLayerRenderer.java
        Commit graph MODIFY /icefaces4/tags/icefaces-4.0.0/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapEventRenderer.java
        Commit graph MODIFY /icefaces4/tags/icefaces-4.0.0/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapRenderer.java
        Commit graph MODIFY /icefaces4/tags/icefaces-4.0.0/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapServicesRenderer.java
        Commit graph MODIFY /icefaces4/tags/icefaces-4.0.0/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapInfoWindowRenderer.java
        Commit graph MODIFY /icefaces4/tags/icefaces-4.0.0/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapAutocompleteRenderer.java
        Commit graph MODIFY /icefaces4/tags/icefaces-4.0.0/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapMarkerRenderer.java
        Commit graph MODIFY /icefaces4/tags/icefaces-4.0.0/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapOverlayRenderer.java
        Commit graph MODIFY /icefaces4/tags/icefaces-4.0.0/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapControlRenderer.java
        Hide
        Arturo Zambrano added a comment -

        Those last issues were unrelated to these changes and were fixed under ICE-10379.

        Porting these changes to the 3.3. EE maintenance branch is still pending.

        Show
        Arturo Zambrano added a comment - Those last issues were unrelated to these changes and were fixed under ICE-10379 . Porting these changes to the 3.3. EE maintenance branch is still pending.
        Hide
        Arturo Zambrano added a comment -

        r43351: added support for ui:repeat to all gMap* subcomponents in the 3.3 EE maintenance branch.

        Please test in the same way as for 4.0.

        Show
        Arturo Zambrano added a comment - r43351: added support for ui:repeat to all gMap* subcomponents in the 3.3 EE maintenance branch. Please test in the same way as for 4.0.
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Liana Munroe made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #43805 Tue Dec 09 15:18:27 MST 2014 art.zambrano ICE-10347 fixes for issues with rendering ace:gMapInfoWindow and ace:gMapOverlay
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapOverlayRenderer.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapInfoWindowRenderer.java
        Hide
        Arturo Zambrano added a comment -

        All the issues above aren't related to this fix and aren't exclusive to ui:repeat, as they also occur when using c:forEach or simply using multiple tags explicitly. The issues with ace:gMapInfoWindow and ace:gMapOverlay have already been fixed at revisions 43805 and 43806 in the 4.0 trunk and 3.3 EE maintenance branch; the fixes for the other two issues are in progress.

        Show
        Arturo Zambrano added a comment - All the issues above aren't related to this fix and aren't exclusive to ui:repeat, as they also occur when using c:forEach or simply using multiple tags explicitly. The issues with ace:gMapInfoWindow and ace:gMapOverlay have already been fixed at revisions 43805 and 43806 in the 4.0 trunk and 3.3 EE maintenance branch; the fixes for the other two issues are in progress.
        Ken Fyten made changes -
        Summary ace:gMap Support for ui:repeat ace:gMap - Add support for multiple subcomponents
        Ken Fyten made changes -
        Fix Version/s EE-4.0.0.GA [ 11171 ]
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Assignee Priority P2 [ 10011 ] P1 [ 10010 ]
        Hide
        Arturo Zambrano added a comment -

        Attaching gMapMultipleLayers.xhtml test page.

        This test page can be added to QA's test app to see how Google just doesn't support displaying multiple layers at the same time. Therefore, we can say that the issue number 1 above is invalid.

        In the test page I created a GMap using Javascript only (i.e. no use of any component; the Google Maps API was directly invoked). There you can see that if you have 2 or more layers in a map, only one will be displayed. It's impossible to display multiple layers at the same time, even if they are of the same kind. When, only one layer is declared, then, it is displayed correctly (if the current location supports it).

        Show
        Arturo Zambrano added a comment - Attaching gMapMultipleLayers.xhtml test page. This test page can be added to QA's test app to see how Google just doesn't support displaying multiple layers at the same time. Therefore, we can say that the issue number 1 above is invalid. In the test page I created a GMap using Javascript only (i.e. no use of any component; the Google Maps API was directly invoked). There you can see that if you have 2 or more layers in a map, only one will be displayed. It's impossible to display multiple layers at the same time, even if they are of the same kind. When, only one layer is declared, then, it is displayed correctly (if the current location supports it).
        Arturo Zambrano made changes -
        Attachment gMapMultipleLayers.xhtml [ 17987 ]
        Hide
        Arturo Zambrano added a comment -

        Attaching gMapMultipleServices.xhtml.

        A similar test was made to test multiple services. It was found that Google Maps does support displaying multiple services on the same map, as shown in the attached test page, but this is currently not supported on our ace:gMap.

        ICE-10459 was created to fix this specific issue.

        Show
        Arturo Zambrano added a comment - Attaching gMapMultipleServices.xhtml. A similar test was made to test multiple services. It was found that Google Maps does support displaying multiple services on the same map, as shown in the attached test page, but this is currently not supported on our ace:gMap. ICE-10459 was created to fix this specific issue.
        Arturo Zambrano made changes -
        Attachment gMapMultipleServices.xhtml [ 17988 ]
        Arturo Zambrano made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 4.1 [ 11375 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Brad Kroeger
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: