Shared Samples

Build, modify and run workflows on geospatial data using Spatial Modeler SDK. Build complex algorithms or run routine tasks, and build add-ons to ERDAS IMAGINE and GeoMedia.
Showing results for 
Search instead for 
Do you mean 

Weather Plugin

by Technical Evangelist ‎09-30-2019 02:39 AM - edited ‎09-30-2019 06:19 AM (136 Views)

Abstract

The weather plugin sample is intended to show how to connect to external services.

The plugin calls a restful web service to retrieve weather information of the current location and displays the result in a dock panel.

Bitbucket Link

https://bitbucket.org/HGDN/hgdn_mae/src/master/Desktop/WeatherPlugin/

Description

The weather plugin sample contains one plugin to communicate with the World Weather Online restful web services. To successfully execute the sample please obtain a free license and add the key to the environment properties:

WeatherPluginEnvProperties.JPG

 

The plugin contains one action to display the forecast panel. 

 

@Action(actionLocation = ActionLocation.PluginTab.class, actionOrder = 100)
  public void showWeatherForecast(DispatcherAction action) {
    showDock();
    showCapture();
  }

 

To get the location information, a GeometryCapture instance is started and as soon as the user captures a point on the map, this location is used to call the service. The result is shown as a dock panel on the right top of the map. 

 

 

 

 

Overview
Contributors