Get a sneak peek at whats next for Permanent Hazards on our April 7th Office Hours!
Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.
Post by Glodenox
That's the idea behind the feature, yes. Storing the location, rotation and scaling isn't too hard. It's the "storing the image" that is currently not working as I'd expect it to.

But just to be clear: that feature is not yet part of this release.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1565
Answers: 1
Has thanked: 278 times
Been thanked: 940 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
When I made this layout I never expected those buttons to stay longer than a week or two (I thought about using handles to adjust the image size and location), so I didn't really optimize it. Both suggestions are indeed an improvement. I won't be able to work on it right now, but I've put it on the backlog.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1565
Answers: 1
Has thanked: 278 times
Been thanked: 940 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
That is indeed the idea behind that functionality. You'd export a json file which contains all the attributes as well as the image itself. It's the image which currently seems to be causing some issue in the import at the moment. Though when I say "currently", I must admit that it has been 4 months since I tried to fix anything in that code.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1565
Answers: 1
Has thanked: 278 times
Been thanked: 940 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
I was intending on working on another script today, but I found the challenge to get that feature finished too alluring and started working on that instead. The import was slightly more convoluted than I had hoped (the script has to copy over the data byte by byte), but it seems to work fine.

Version 1.3.0 finally has the much requested import/export functionality working! It is perfectly possible to share these exports with other editors, nothing in the export is user-specific.

I didn't work on compacting the image alignment controls yet, that'll be for another update.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1565
Answers: 1
Has thanked: 278 times
Been thanked: 940 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
SunDevil2213 wrote:Script appears to be broken...Once I import an image and attach it to the map, after a refresh of WME, the Image is no longer there.
Has the explanation by RichardPyne helped you? It is indeed the case that you will need to go into the tab to open up the image again. Otherwise it would become difficult to have multiple images stored, especially if some of them cover the same area.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1565
Answers: 1
Has thanked: 278 times
Been thanked: 940 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
I've just released a small update (version 1.3.1) which improves the code used to export an image. By using another API, Chrome should be able to export big images just as well as Firefox did in the past.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1565
Answers: 1
Has thanked: 278 times
Been thanked: 940 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
I didn't foresee that functionality as I assumed an image is always supposed to be positioned correctly when it gets saved and that its position doesn't change afterwards. The way the code is set up this wouldn't really easy to add, but it most certainly isn't impossible to look into it if more people want this.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1565
Answers: 1
Has thanked: 278 times
Been thanked: 940 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
Maybe I can clarify the purpose of that pencil more by adding a tooltip that says "Change name". I suppose that misunderstanding is the main reason for your question.
BtBalways wrote:If you want to start voting then I'd go for more space for the image rather than post addition adjusting.
I'm afraid I didn't fully understand that remark? Are you talking about more space on the screen while you are positioning a new image by moving the controls elsewhere? That's a known request that will probably be the next thing I change in this script (though I'm currently swamped with tons of other projects, so don't expect it any time soon).
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1565
Answers: 1
Has thanked: 278 times
Been thanked: 940 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
I could probably provide a toggle to say "lock the top left corner" (or any other corner) which makes the resize buttons only expand to the bottom and right (in the case of the top left corner). If you click one of the buttons to move the image however, it'd still move as it would before. That is indeed a use case I've run into myself, now that I think about it.

I would still love to actually provide better controls that you can drag as that would be much more intuitive, but my experiments with those didn't work as planned, probably because I'm using a custom feature type.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1565
Answers: 1
Has thanked: 278 times
Been thanked: 940 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png

Post by Glodenox
turbomkt wrote:Or a floating panel?
That would work nicely as well, indeed. I'm not 100% certain yet how I'd implement that, but it should be possible to do that.
Glodenox
Waze Global Champs
Waze Global Champs
Posts: 1565
Answers: 1
Has thanked: 278 times
Been thanked: 940 times
Send a message
Belgium & Luxembourg Coordinator • Script Writing Community Coordinator
https://www.tomputtemans.com/images/WazeBelgium.pnghttps://www.tomputtemans.com/images/WazeWMEbeta.png