0.1.3 • Published 7 years ago

ionic-openweathermap v0.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

#An OpenWeatherMap Component for Ionic2

An Angular2 component to visualize the current weather data for any location on Earth using OpenWeatherMap.

##Weather parameters in API respond

  • Group of weather parameters (Rain, Snow, Extreme, etc)
  • Weather description within the group
  • Temperature
  • Atmospheric pressure
  • Humidity
  • Minimum temperature at the moment
  • Maximum temperature at the moment
  • Wind speed

API data information in OpenWeatherMap

##Installation

Make sure you have Ionic and Angular installed.

npm install --save ionic-openweathermap

Add the OpenWeatherMapComponent in the declarations of your app.module.ts

import { OpenWeatherMapModule } from 'ionic-openweathermap';
@NgModule({
  declarations: [
  ],
  imports: [
    IonicModule.forRoot(MyApp),
    OpenWeatherMapModule
  ]
  ...
})
export class AppModule {}

The Weather Box use the OpenWeatherMapProvider

##Usage

Add the openweathermap property in your HTML .

<openweathermap [options]="options"></openweathermap>

options is an array which should contains:

  • apikey: apikey from openweathermap
  • city: (the city name to get the data) - By city name - Parameters: name: city name and country code divided by comma, use ISO 3166
    - By geographic coordinates: - Parameters: geo lat & lon coordinates of the location - By ZIP code - Parameters: zip zip code
  • unitFormat: (metric,imperial), by default is "metric"
  • lang: parameter to get the output in your language, by default is en

Some examples:

options = {
	apikey: "",
	city: {"name":["Granada"]},
	unitFormat: "metric",
	lang: "en"
}
options2 = {
	apikey: "",
	city: {"geo":[{"lat":34,"lon":-23}]},
	unitFormat: "metric",
	lang: "es"
}
options3 = {
	apikey: "",
	city: {"zip":[{"code":94040,"country":"us"}]},
	unitFormat: "metric",
	lang: "uk"
}

##Styles

The following styles are available to customize:

#weatherDescription {

}

#weatherGroup {

}

#temperature {

}

#windSpeed {

}

#humidity {

}

#maxTemp {

}

#minTemp {

}
#pressure {

}

.content-box {

}

##Authors

Ismael Morales

##License

This project is licensed under the terms of the MIT license.

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.27

7 years ago

0.0.26

7 years ago

0.0.24

7 years ago

0.0.23

7 years ago

0.0.22

7 years ago

0.0.21

7 years ago

0.0.20

7 years ago

0.0.19

7 years ago

0.0.18

7 years ago

0.0.17

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.1

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

1.0.0

7 years ago