iam4x / pokemongo-webspoof

👾 Play Pokémon Go from your Mac
2.14k stars 229 forks source link

modify the starting position of the app #393

Open tselincoln opened 8 years ago

tselincoln commented 8 years ago

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 commented 8 years ago

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

bubblelo commented 8 years ago

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

tselincoln commented 8 years ago

// geolocation API might be down, use http://ipinfo.io // source: http://stackoverflow.com/a/32338735 handleGeolocationFail = async (geolocationErr) => { Alert.warning(` Error getting your geolocation, using home location

${geolocationErr.message}

`, { timeout: 3000 })

try {
  // const { data: { loc } } = await axios({ url: 'http://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 commented 8 years ago

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

CreatingMazes commented 8 years ago

Did it work? @bubblelo

bubblelo commented 8 years ago

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. :(