Issue 11954

Leaflet map is throwing javascript errors when the map is placed inside the widget container.

11954
Reporter: fmendez
Assignee: trobertson
Type: SubTask
Summary: Leaflet map is throwing javascript errors when the map is placed inside the widget container.
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2012-09-27 17:01:45.927
Updated: 2013-08-29 14:45:18.961
Resolved: 2012-10-18 18:26:35.784
        
Description: The leaflet map contains a drawing control to select a bounding box area, this control works but is not visible when the map is inside the widget container.

The widget temaple id in occurrence/search.ftl is map-template-filter.
All the occurrence widgets are created dynamically the first time they are used.
In occurrence_filter.js contains all the widgets code, the javascript class OccurrenceWidgetManager instantiate the map widget with the following lines of code:
newWidget = new OccurrenceLocationWidget();
            newWidget.init({widgetContainer: widgetContainer,onApplyFilter: self.applyOccurrenceFilters,bindingsExecutor: self.bindMap});

 OccurrenceWidgetManager.bindMap: is the function that creates the map.

The execution of bindMap function takes place inside the function OccurrenceWidget.createHTMLWidget{...this.executeAdditionalBindings();...}
]]>
    


Author: trobertson@gbif.org
Comment: Fixed with http://code.google.com/p/gbif-portal/source/detail?r=1090
Created: 2012-10-18 18:26:35.814
Updated: 2012-10-18 18:26:35.814