alibaba / weex

A framework for building Mobile cross-platform UI
https://weexapp.com/
Apache License 2.0
18.28k stars 2.13k forks source link

Geolocation API supported #422

Closed JakeLin closed 3 years ago

JakeLin commented 8 years ago

I have looked through the documentation at http://alibaba.github.io/weex/doc/ and can't find how weex can support Geolocation. I am making a Weather app using Weex like

I need to get the current location to display the weather info. In React Native, we can do it like https://github.com/JakeLin/ReactNativeWeather/blob/master/src/components/WeatherView.js#L75

 startLocationSearch() {
    navigator.geolocation.getCurrentPosition(
      location => {
        this.queryOpenWeatherMap(location);
      },
      error => {
        this.setState({
          message: error.message || error
        });
      },
      {enableHighAccuracy: true, timeout: 2000, maximumAge: 1000}
    );
  }

Thanks Jake

YorkShen commented 5 years ago

This PR/issue doesn't receive response since Weex migrated to Apache two years ago and this repository is no longer active yet.

Feel free to ask question in new repository and thanks for your contribution.

Hanks10100 commented 3 years ago

This issue is outdated for a long time and will be closed now. You can create a new one if you still have questions.

Hanks10100 commented 3 years ago

This issue is outdated for a long time and will be closed now. You can create a new one if you still have questions.