Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify the starting position of the app #393

Open
tselincoln opened this issue Aug 22, 2016 · 6 comments
Open

modify the starting position of the app #393

tselincoln opened this issue Aug 22, 2016 · 6 comments

Comments

@tselincoln
Copy link

Hi your project is really amazing! Since I am just a starter in making application run on mac platform, I am trying to modify the code of your project by changing the package content in your app but seems like it doesn't work. I am trying to fix the starting position of the map to my real location instead of using ip location. How may I do that? Thank you very much!

@tselincoln
Copy link
Author

Oh I fixed it in the src/view/map/index.js thx a lot!

@bubblelo
Copy link

Hi. I am very new to programming. Can you show me what to change in index.js? Thanks a lot!

@tselincoln
Copy link
Author

// geolocation API might be down, use http:https://ipinfo.io
// source: http:https://stackoverflow.com/a/32338735
handleGeolocationFail = async (geolocationErr) => {
Alert.warning(<strong>Error getting your geolocation, using home location</strong> <div class='stack'>${geolocationErr.message}</div>, { timeout: 3000 })

try {
  // const { data: { loc } } = await axios({ url: 'http:https://ipinfo.io/' })
  // const [ latitude, longitude ] = loc.split(',').map(coord => parseFloat(coord))
  const latitude = xx.xxx(the latitude you want)
  const longitude =xxx.xxx(the longitude you want)
  this.handleGeolocationSuccess({ coords: { latitude, longitude } })

//hope it helps!

@bubblelo
Copy link

I will give it a try. Thanks a lot!!

@CreatingMazes
Copy link

Did it work? @bubblelo

@bubblelo
Copy link

bubblelo commented Sep 7, 2016

Hi, it did not work. I keep having Error autoclick Xcode - Code 2 (-1728) issue. Tried hint at #5:comment and it still does not work. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants