Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Map API, need suggestions for how to execute ideas
-
@cvp just a note: since the current location is replaced with a trash, It is causing there to be "too many values to unpack" on line 281. I assume this is due to the nature of the other pins.
I'll check in again tomorrow. Thanks.
Edit: In regards to the message below: Yes in your github script. It occurs after you mark the person's location as trash and then attempt to place a second red pin on the map.
-
-
@cvp to clarify what I said above:
Here is the order that causes the issue:
- Place a red pin
- Mark user location as trash
- Attempt to place another red pin
-
@RocketBlaster05 thanks to identify "how to generate the bug", I'll check it tomorrow in my afternoon, not before, sorry
-
@cvp all good. see you tomorrow.
-
@RocketBlaster05 the problem occurs even if the pin to trash is a green, not only the user pin.
Red/trash/red
Identified, correction tomorrow -
@RocketBlaster05 GitHub corrected for crash "red, set trash user or green, red"
-
@RocketBlaster05 Github corrected for bug "the trash pin on the face removes the face... Is it meant to do so?"
-
@cvp Code works great! For the time being I need to test the accuracy of the pins dropped on the person’s location, so I commented all of the long press function and just had it pass. No errors so that’s good.
Whenever you get the time, could you show me how to make it so that the map type button only allows you to use “hybrid” or “standard”? Thanks
-
@RocketBlaster05 GitHub updated, or
def maptype_button_action(self,sender): x = self.x + sender.x + sender.width/2 y = 70 + self.y + sender.y + sender.height sub_menu_dict = {'standard':0, 'hybrid':2} #sub_menu_dict = {'standard':0, 'satellite':1, 'hybrid':2, 'satelliteFlyover':3, 'hybridFlyover':4, 'mutedStandard':5} sub_menu = [] for k in [*sub_menu_dict]: sub_menu.append(k) tv = ui.TableView() tv.frame = (0,0,180,85) #tv.frame = (0,0,180,280)
-
@cvp hm.... got the new github code and it’s causing the iPad to crash... only happened after the map type change.
I've done some poking around... I have an old version of the map saved which runs with no issues. If I run the github version, it causes the iPad to crash. However, if I run the old version of the map first, then run the github version, the github version runs fine. This doesn't make any sense to me but I'm looking for any reason as to why this is happening.
-
@cvp Also, when the code is shortened to just 'standard':0 and 'hybrid':2, when the user selects hybrid it actually shows the 'satellite' view...
-
@RocketBlaster05 sorry for these bugs, GitHub corrected
-
@cvp works great!
-
@RocketBlaster05 😅 ready for next request....
-
@cvp won’t be anything for a couple days. Got some data to collect. Hope you find some other fun codes to do in the meantime! Thanks as always
-
@cvp sorry been busy so testing has been an issue. Finally got around to it. My iPad doesn’t have an automatic connection (needs WiFi) but it is still able to give locations on the map. I brought a WiFi hotspot with me and it didn’t seem to help. The locations are mostly accurate, but the updating is extremely inconsistent.
I had the update_interval set to values like 0.2, 0.5, 2, 5, and 10. None of them updated on their set intervals. Do you know if this is due to the lack of connection on my iPad or maybe something else is causing the error?
Thanks! -
@RocketBlaster05 don't forget that an iPad without cellular does not have any gps, thus the only location you can get is approximately this one of the router, based on known (by Apple) wifi networks. If you have an iPhone, try with it.
-
@cvp alright. I transferred my files to my iPhone and the tracking works much better. Not sure if this is because of the code or the map API but the app cannot track the person while moving at a speed beyond walking.
The Map only updated when coming to stops, and often times the map would not update after coming to a stop. I would have to reopen the map for it to begin trying to update again.
If you have any ideas I’ll be glad to hear them!Thanks as always!
-
@RocketBlaster05 no idea. Perhaps too much updates asked. Increase interval?