项目作者: conterra

项目描述 :
The OpenWeatherMap Datastore bundle contains a store for OpenWeatherMap Data.
高级语言: JavaScript
项目地址: git://github.com/conterra/mapapps-openweathermap-datastore.git
创建时间: 2015-09-24T10:14:40Z
项目社区:https://github.com/conterra/mapapps-openweathermap-datastore

开源协议:Other

下载


OpenWeatherMap Datastore

The OpenWeatherMap Datastore bundle contains a store for OpenWeatherMap Data. It requests the OpenWeatherMap API that returns objects for each bigger city in the world. Each of this objects contains current weather data with the following parameter:

  • city name
  • weather id
  • weather description
  • temperature
  • air pressure
  • humidity
  • cloudage
  • windspeed
  • wind direction
  • rain (optional for 1h/3h)

The bundle also contains a special content viewer with charts for 5 and 16 days forecast.

Sample App

https://demos.conterra.de/mapapps/resources/apps/downloads_openweathermap/index.html

Installation Guide

  1. Register a free OpenWeatherMap account or sign in to get your own api key: http://home.openweathermap.org/users/sign_in
  2. Add the bundles “dn_openweathermapdatastore” and “c3” to your app.
  3. Add the api key to the configuration and add it to your app.json.
  4. Now you can use the OpenWeatherMap Datastore in your app.

Configuration:

  1. "bundles" {
  2. "dn_openweathermapdatastore": {
  3. "OpenWeatherMapStoreFactory": {
  4. // bounding boxes + zoom value to get data
  5. // from cities within the defined rectangle
  6. // specified by the geographic coordinates
  7. "bboxes": [
  8. // whole world
  9. "-180,90,180,-90,6",
  10. // Germany
  11. "6,55,15,47,8"
  12. ]
  13. "apikey": "*your api key*"
  14. },
  15. "OWMInfoWidgetFactory": {
  16. "apikey": "*your api key*"
  17. }
  18. },
  19. ...
  20. }

Installation Guide

In order to use the “dn_editingtypes” bundle, simply add it to your app - no further configuration is required.

Development Guide

Define the mapapps remote base

Before you can run the project you have to define the mapapps.remote.base property in the pom.xml-file:
<mapapps.remote.base>http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%</mapapps.remote.base>

Other methods to to define the mapapps.remote.base property.
  1. Goal parameters
    mvn install -Dmapapps.remote.base=http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%

  2. Build properties
    Change the mapapps.remote.base in the build.properties file and run:
    mvn install -Denv=dev -Dlocal.configfile=%ABSOLUTEPATHTOPROJECTROOT%/build.properties