Help with WME API to add roundabout helping

The place to get information and ask questions about everything to do with properly and successfully editing the Waze Map.

Use this forum for all general editing questions, and the sub-forums for specific types of Waze Map Editor features.

Moderators: krankyd, Unholy

Re: Help with WME API to add roundabout helping

Postby AlanOfTheBerg » Wed Jul 31, 2013 7:23 pm

beersh wrote:It dosen't work for me on Chrome with Tampermonkey.
I must work with Tampermonkey since all the script's ignore the fact that the Israel map editor URL is http://www.waze.co.il/editor

Didn't those script monkeys put in the Israeli map editor URL? Geez. :shock:

:P
Wiki Resources: Map Editing Manual | Oregon Project/To-Do List
Oregon-based US Country Manager | iPhone5 - VZ - iOS 7.1 | Waze v3.7.9.925
AlanOfTheBerg
Waze Global Champs
Waze Global Champs
 
Posts: 19501
Joined: Sat Aug 28, 2010 8:48 pm
Location: US Country Manager - Oregon, USA
Has thanked: 654 times
Been thanked: 2260 times

Re: Help with WME API to add roundabout helping

Postby beersh » Wed Jul 31, 2013 7:02 pm

It dosen't work for me on Chrome with Tampermonkey.
I must work with Tampermonkey since all the script's ignore the fact that the Israel map editor URL is http://www.waze.co.il/editor
LG Nexus 4 - Waze 3.7.8.0 - Android 4.4.2
Israel Country Manager, Localization and Android Client expert
Image
beersh
Waze Local Champs
Waze Local Champs
 
Posts: 20
Joined: Fri Sep 09, 2011 7:53 am
Location: Israel
Has thanked: 24 times
Been thanked: 0 time

Re: Help with WME API to add roundabout helping

Postby beersh » Wed Jul 31, 2013 7:41 pm

Forget it It's working fine.
The landmark layer was turn off :mrgreen:
LG Nexus 4 - Waze 3.7.8.0 - Android 4.4.2
Israel Country Manager, Localization and Android Client expert
Image
beersh
Waze Local Champs
Waze Local Champs
 
Posts: 20
Joined: Fri Sep 09, 2011 7:53 am
Location: Israel
Has thanked: 24 times
Been thanked: 0 time

Help with WME API to add roundabout helping

Postby davipt » Fri Nov 23, 2012 11:53 am

Hello all,

I need some help from any WME API experts to try to implement a helping function for roundabouts. The end result is to be offered to an existing script or released as a standalone script.

The idea is to provide a visual guidance to the roundabout rules at the wiki, so editors can put the nodes at the right place to obtain the right instructions.

The problem is that at the moment I'm trying to change the highlights script and trying to draw some lines when a node is selected, as the node selection binding is already implemented there, but I don't know yet how to draw the lines.

For the first version I'd like to assume the roundabout is a pure circle, and draw 6 lines from the selected node to the opposite directions of the roundabout, marking the 3x2 relevant angles - 90+-30, 180+-30, 270+-30, so one can know where to put the other nodes to obtain the "straight ahead/turn left/turn right" or, when it's not perpendicular, the right "take the nth exit".

For completeness, the context is that in Portugal we have hundreds, if not some thousands of roundabouts, and after struggling with broken roundabouts, now I'm struggling to get the right instructions and have the script help me instead of putting a ruler over the screen.

Any WME script expert out there to help me?

PS: I've already pinged timbone to ask him this feature and offer my help and keep him posted of my progress.
Image
Bruno D. Rodrigues | Global Champ | Coordinator and Manager for Portugal | Expert iPhone and others
Forum PT | Wiki PT | Facebook PT | Twitter PT
davipt
Global Champ Mentor
Global Champ Mentor
 
Posts: 2416
Joined: Tue Nov 02, 2010 8:51 am
Location: Oeiras, Portugal
Has thanked: 248 times
Been thanked: 405 times

Re: Help with WME API to add roundabout helping

Postby davipt » Fri Nov 23, 2012 4:02 pm

Status update: based on the existing scripts, I can now understand a node click, understand it's a roundabout, collect all roundabout nodes and segments. Now I'll try to understand the OpenLayers from the UR script...
Image
Bruno D. Rodrigues | Global Champ | Coordinator and Manager for Portugal | Expert iPhone and others
Forum PT | Wiki PT | Facebook PT | Twitter PT
davipt
Global Champ Mentor
Global Champ Mentor
 
Posts: 2416
Joined: Tue Nov 02, 2010 8:51 am
Location: Oeiras, Portugal
Has thanked: 248 times
Been thanked: 405 times

Re: Help with WME API to add roundabout helping

Postby davipt » Fri Nov 23, 2012 4:29 pm

Status Update: as a side effect, I can now automatically create roundabout junction landmarks based on the roundabout geometry >:) Maybe I should keep this as a secondary feature :lol:

Screen Shot 2012-11-23 at 4.28.18 PM copy.jpg
Screen Shot 2012-11-23 at 4.28.18 PM copy.jpg (27.98 KiB) Viewed 1767 times
Image
Bruno D. Rodrigues | Global Champ | Coordinator and Manager for Portugal | Expert iPhone and others
Forum PT | Wiki PT | Facebook PT | Twitter PT
davipt
Global Champ Mentor
Global Champ Mentor
 
Posts: 2416
Joined: Tue Nov 02, 2010 8:51 am
Location: Oeiras, Portugal
Has thanked: 248 times
Been thanked: 405 times

Re: Help with WME API to add roundabout helping

Postby davipt » Fri Nov 23, 2012 6:21 pm

And we have a prototype!

Screen Shot 2012-11-23 at 6.19.51 PM copy.jpg
Screen Shot 2012-11-23 at 6.19.51 PM copy.jpg (25.22 KiB) Viewed 1754 times
Image
Bruno D. Rodrigues | Global Champ | Coordinator and Manager for Portugal | Expert iPhone and others
Forum PT | Wiki PT | Facebook PT | Twitter PT
davipt
Global Champ Mentor
Global Champ Mentor
 
Posts: 2416
Joined: Tue Nov 02, 2010 8:51 am
Location: Oeiras, Portugal
Has thanked: 248 times
Been thanked: 405 times

Re: Help with WME API to add roundabout helping

Postby davipt » Tue Nov 27, 2012 11:51 am

Here's a first version, please handle with care and provide as much feedback as possible ;)

http://userscripts.org/scripts/show/152981
Image
Bruno D. Rodrigues | Global Champ | Coordinator and Manager for Portugal | Expert iPhone and others
Forum PT | Wiki PT | Facebook PT | Twitter PT
davipt
Global Champ Mentor
Global Champ Mentor
 
Posts: 2416
Joined: Tue Nov 02, 2010 8:51 am
Location: Oeiras, Portugal
Has thanked: 248 times
Been thanked: 405 times

Re: Help with WME API to add roundabout helping

Postby davipt » Sun Jan 06, 2013 7:10 pm

Dennis_Halmstad wrote:Its a gr8 start.

It seams that it dont work if u use tampermonkey in chrome.
Its the way this script get acces to WME that causes problems. Other scripts with unsafeWindow works.


I've just copied verbatim what the other scripts were doing. I don't use chrome (I hate a browser that consumes 300MB every other week of my limited disk space) but I'll have a look at it when I can. I've tested it without any tampermonkey extension, and it was working out of the box.
Image
Bruno D. Rodrigues | Global Champ | Coordinator and Manager for Portugal | Expert iPhone and others
Forum PT | Wiki PT | Facebook PT | Twitter PT
davipt
Global Champ Mentor
Global Champ Mentor
 
Posts: 2416
Joined: Tue Nov 02, 2010 8:51 am
Location: Oeiras, Portugal
Has thanked: 248 times
Been thanked: 405 times

Re: Sv: Re: Help with WME API to add roundabout helping

Postby davipt » Sun Jan 06, 2013 7:22 pm

Dennis_Halmstad wrote:It works gr8 when installed directly into chrome. But tampermonkey gives the same functionality as greasmonkey with updates and other functionality. With tampermonkey its a hole lot easier to install scripts from userscripts.org.


No idea what is wrong, I have no idea about the inners of greasemonkey or that tamper monkey, just copied the top lines from other scripts and it worked.

Please give me a WME script that works with your Chrome/tampermonkey configuration so I can copy from it. I've noticed the latest color highlights does something different, but I can't see any difference from all the other ones, the street to river, extended tools, junction node fixed, select roundabout segments and livemap nav.
Image
Bruno D. Rodrigues | Global Champ | Coordinator and Manager for Portugal | Expert iPhone and others
Forum PT | Wiki PT | Facebook PT | Twitter PT
davipt
Global Champ Mentor
Global Champ Mentor
 
Posts: 2416
Joined: Tue Nov 02, 2010 8:51 am
Location: Oeiras, Portugal
Has thanked: 248 times
Been thanked: 405 times

Next

Return to Waze Map Editor

Who is online

Users browsing this forum: foxxymito, Google [Bot]