ionic-openweathermap v0.1.3
#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 openweathermapcity
: (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 codeunitFormat
: (metric,imperial), by default is "metric"lang
: parameter to get the output in your language, by default isen
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.
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago