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

        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.
        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".
        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.
        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.
        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).
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: