Class MapArea

    • Field Detail

      • CRS84

        protected static final org.gwtopenmaps.openlayers.client.Projection CRS84
      • FORMATTER

        protected static final com.google.gwt.i18n.client.NumberFormat FORMATTER
      • maxFeatures

        public int maxFeatures
      • map

        protected org.gwtopenmaps.openlayers.client.Map map
      • animLayer

        protected org.gwtopenmaps.openlayers.client.layer.Image animLayer
      • currentProjection

        protected String currentProjection
      • transectLayer

        protected String transectLayer
      • wmsNorthPolarOptions

        protected org.gwtopenmaps.openlayers.client.layer.WMSOptions wmsNorthPolarOptions
      • wmsSouthPolarOptions

        protected org.gwtopenmaps.openlayers.client.layer.WMSOptions wmsSouthPolarOptions
      • wmsStandardOptions

        protected org.gwtopenmaps.openlayers.client.layer.WMSOptions wmsStandardOptions
      • wmsWebMercOptions

        protected org.gwtopenmaps.openlayers.client.layer.WMSOptions wmsWebMercOptions
      • loadStartListener

        protected org.gwtopenmaps.openlayers.client.event.LayerLoadStartListener loadStartListener
      • loadCancelListener

        protected org.gwtopenmaps.openlayers.client.event.LayerLoadCancelListener loadCancelListener
      • loadEndListener

        protected org.gwtopenmaps.openlayers.client.event.LayerLoadEndListener loadEndListener
      • baseUrlForExport

        protected String baseUrlForExport
      • layersForExport

        protected String layersForExport
      • overlaysForExport

        protected String overlaysForExport
      • getFeatureInfo

        protected org.gwtopenmaps.openlayers.client.control.WMSGetFeatureInfo getFeatureInfo
      • editingToolbar

        protected org.gwtopenmaps.openlayers.client.control.EditingToolbar editingToolbar
      • proxyUrl

        protected String proxyUrl
      • opacity

        protected float opacity
      • converters

        protected Map<String,​UnitConverter> converters
        Map of unit conversions to be applied to each layer
      • animLayerLoading

        protected boolean animLayerLoading
        We keep track of this because animations can be turned off before they've finished loading. This means the loading bar stays present.
    • Method Detail

      • addAnimationLayer

        public void addAnimationLayer​(String wmsUrl,
                                      String layerId,
                                      String timeList,
                                      String currentElevation,
                                      String palette,
                                      String style,
                                      String scaleRange,
                                      String aboveMaxString,
                                      String belowMinString,
                                      String noDataString,
                                      int nColorBands,
                                      boolean logScale,
                                      String frameRate)
        Adds an animation layer to the map
        Parameters:
        wmsUrl - The WMS URL
        layerId - The WMS layer ID
        timeList - A comma separated list of times for the animation
        currentElevation - The elevation for the animation
        palette - The palette name
        style - The style name
        aboveMaxString - A string representing the colour for data above the max scale range
        belowMinString - A string representing the colour for data below min scale range
        noDataString - A string representing the colour when there is no data
        scaleRange - The scale range, of the form "[min],[max]"
        nColorBands - The number of colour bands to use
        logScale - Whether to use a logarithmic colour scale
        frameRate - The frame rate of the final animation
      • stopAnimation

        public void stopAnimation()
      • addLayer

        public void addLayer​(String wmsUrl,
                             String internalLayerId,
                             String wmsLayerName,
                             String time,
                             String targetTime,
                             String elevation,
                             String targetElevation,
                             String style,
                             String palette,
                             String aboveMaxString,
                             String belowMinString,
                             String noDataString,
                             String scaleRange,
                             int nColourBands,
                             boolean logScale,
                             boolean queryable,
                             boolean downloadable,
                             boolean multipleElevations,
                             boolean multipleTimes)
        Adds a WMS layer to the map
        Parameters:
        wmsUrl - The WMS URL
        internalLayerId - An internal layer ID. This allows us to add multiple WMS layers to this map
        wmsLayerName - The WMS layer ID
        time - The time (or time range) at which we want data
        targetTime - If we have a continuous time axis, what time should we try and colour the data's value at
        elevation - The elevation (or elevation range) at which we want data
        targetElevation - If we have a continuous elevation axis, what elevation should we try and colour the data's value at
        style - The style name for this layer
        palette - The palette name for this layer
        aboveMaxString - The string defining the colour to display when values are above the max
        belowMinString - The string defining the colour to display when values are below the min
        scaleRange - The scale range (as a string: "[min],[max]")
        nColourBands - The number of colour bands in the palette
        logScale - Whether to use a logarithmic scale
        multipleElevations - Whether we have multiple elevations available
        multipleTimes - Whether we have multiple times available
      • doAddingOfLayer

        protected void doAddingOfLayer​(String wmsUrl,
                                       String internalLayerId,
                                       org.gwtopenmaps.openlayers.client.layer.WMSParams params,
                                       org.gwtopenmaps.openlayers.client.layer.WMSOptions options,
                                       boolean queryable,
                                       boolean downloadable,
                                       boolean multipleElevations,
                                       boolean multipleTimes)
      • removeLayer

        public void removeLayer​(String layerId)
      • setGetFeatureInfoDetails

        protected void setGetFeatureInfoDetails​(String wmsUrl,
                                                boolean multipleElevations,
                                                boolean multipleTimes,
                                                boolean downloadable,
                                                String layerId)
      • displayImagePopup

        protected void displayImagePopup​(String url,
                                         String title)
        Used to display an image in a new window. This is used for showing vertical profiles or time series plots
        Parameters:
        url - The absolute URL of the image
        title - The title of the popup box
      • zoomToExtent

        public void zoomToExtent​(String extents)
      • getKMZUrl

        public String getKMZUrl()
        Returns:
        The URL used to get a KMZ of the currently displayed layer
      • getDefaultMapOptions

        protected static org.gwtopenmaps.openlayers.client.MapOptions getDefaultMapOptions()
      • setOpacity

        public void setOpacity​(String layerId,
                               float opacity)
      • setUnitConverter

        public void setUnitConverter​(String layerId,
                                     UnitConverter converter)
        Sets a UnitConverter for a specified layer. This will allow GetFeatureInfo requests to display the correct value
        Parameters:
        layerId - The internal layer to apply the conversion to
        converter - The UnitConverter to use
      • getBaseLayerUrl

        public String getBaseLayerUrl()
      • getBaseLayerLayers

        public String getBaseLayerLayers()
      • getOverlaysForExport

        public String getOverlaysForExport()
      • getBackgroundMapName

        public String getBackgroundMapName()
      • setBackgroundMap

        public void setBackgroundMap​(String layerName)
      • getOptionsForCurrentProjection

        protected org.gwtopenmaps.openlayers.client.layer.WMSOptions getOptionsForCurrentProjection()
      • addDrawingLayer

        protected void addDrawingLayer()
      • getTransectLayerId

        protected String getTransectLayerId()
      • setTransectLayerId

        public void setTransectLayerId​(String transectLayer)
      • setAllowTransects

        public void setAllowTransects​(boolean allowTransects)
      • updatePos

        public void updatePos()
        This should be called when the position/size of the map has changed. Failing to do so will lead to e.g. incorrect positions for GetFeatureInfo