[Script] WME Aerial Shifter 1.6.5 / 06.06.2016

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.

Moderators: Unholy, bextein

Forum rules
Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

DO NOT START a new thread unless it is about a new idea. Keep discussion of existing tools within the main thread for that tool.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Re: [Script] WME Aerial Shifter 1.5 / 10.09.2014

Postby james890526 » Wed Sep 24, 2014 10:27 am

wlodek76 wrote:Sometimes we need to do a small correction of sat images, so steps ± 10 are too large and we need to enter values manually then.

±1 is more handy here

max="100" min="-100" step="1"

Regards,
Włodzimierz


Good suggestion. Was wondering why the step size is +-10 and not 1.
james890526

ImageImageImageImageImage

Waze in Malaysia
  • Area Manager : Penang mainland, Kulim
  • Beta Tester
james890526
Wiki Master
Wiki Master
 
Posts: 172
Joined: Sun Jun 22, 2014 7:00 pm
Has thanked: 49 times
Been thanked: 30 times

Re: [Script] WME Aerial Shifter 1.6.5 / 06.06.2016

Postby iainhouse » Wed Jun 29, 2016 12:09 am

As I suggested above, I have now incorporated the functionality of this script into my WME Fix UI script and will undertake to try and keep it going through future WME updates.

Please note that I am not taking over this script. I couldn't have written my own version without the work already done by berestovskyy (and the updates by ragacs), but I don't have access to update the original version. Also, I am handling the interface in a different way (as part of a tab rather than in the header bad) and I wouldn't want to be maintaining 2 different scripts.
ImageImageImage
UK AdminsUK WikiWaze FAQWMEFU Script :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season
iainhouse
Country Manager
Country Manager
 
Posts: 8684
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity, with Waze HQ in the driving seat
Has thanked: 1836 times
Been thanked: 6304 times

Re: [Script] WME Aerial Shifter 1.5 / 10.09.2014

Postby iainhouse » Thu Jun 02, 2016 12:58 pm

Since I made my last post here, I have become a script author and I'm working on my own script to fix the WME UI.

I have contributed a fix to this script in the past and, as I recall, it's pretty simple. It also affects the UI, so I see no reason I couldn't look at incorporating it. :mrgreen:
ImageImageImage
UK AdminsUK WikiWaze FAQWMEFU Script :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season
iainhouse
Country Manager
Country Manager
 
Posts: 8684
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity, with Waze HQ in the driving seat
Has thanked: 1836 times
Been thanked: 6304 times

Re: [Script] WME Aerial Shifter 1.5 / 10.09.2014

Postby iainhouse » Tue May 24, 2016 8:36 pm

james890526 wrote:iainhouse, I understand that you're busy with your life, but ragacs has done a good job here updating the script. Hopefully you can update this to the newer version

As I mentioned above, I'm not the author of this script, so I can't update the original version!

However, ragac's version seems to be working fine with the latest WME version.
ImageImageImage
UK AdminsUK WikiWaze FAQWMEFU Script :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season
iainhouse
Country Manager
Country Manager
 
Posts: 8684
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity, with Waze HQ in the driving seat
Has thanked: 1836 times
Been thanked: 6304 times

Re: [Script] WME Aerial Shifter 1.5 / 10.09.2014

Postby iainhouse » Mon Feb 15, 2016 8:39 pm

james890526 wrote:iainhouse, I just realised that some icons and buttons e.g. reset button are missing/not found in WME Beta. Could you kindly counter check if it's only happening in my PC?

I can't really do that! I don't know what scripts you have running, or how any of them may be affected by changes in WME Beta.

As far as this script, WME Aerial Shifter, is concerned, I can confirm that it is no longer functional in WME Beta. It is probably still possible to make it work, but the script places it's controls in the top bar of the editor - where you can access your editor settings, change server etc. This top bar is what can be hidden/shown by pressing SHIFT-F in the current production editor.

Looking at WME Beta, this bar no longer exists: the "official" contents of it are now a tab in the left-hand pane. That means the element that WAS tries to add it's controls to no longer exists. I've just spent about 40 minutes trying to hack the script to display somewhere else but, frankly, I don't really know what I'm doing and I haven't had any success. It's even possible that the script is failing to load entirely: I can't find it in the list of sources when I load WME Beta.

I'm afraid you might have to wait until the original author can update the script.
ImageImageImage
UK AdminsUK WikiWaze FAQWMEFU Script :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season
iainhouse
Country Manager
Country Manager
 
Posts: 8684
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity, with Waze HQ in the driving seat
Has thanked: 1836 times
Been thanked: 6304 times

Re: [Script] WME Aerial Shifter 1.5 / 10.09.2014

Postby iainhouse » Thu Jan 28, 2016 8:05 pm

It's only you and it hasn't stopped working. :lol:

I saw something on the Toolbox thread about the "force full-screen" option being removed because it's not needed any more. WME Aerial Shifter places it's inputs on the top part of the screen. which is hidden when WME is in full-screen mode.

If you press SHIFT-F to toggle full-screen mode, you should find your inputs and they should still be working. :)
ImageImageImage
UK AdminsUK WikiWaze FAQWMEFU Script :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season
iainhouse
Country Manager
Country Manager
 
Posts: 8684
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity, with Waze HQ in the driving seat
Has thanked: 1836 times
Been thanked: 6304 times

Re: [Script] WME Aerial Shifter 1.5 / 10.09.2014

Postby iainhouse » Mon Jan 26, 2015 9:27 pm

It appears to be working OK here. ROW, but I would be pretty surprised if that made a difference.

Normally what breaks this script is when Waze change the name of the aerials layer so the script can no longer reference it.
ImageImageImage
UK AdminsUK WikiWaze FAQWMEFU Script :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season
iainhouse
Country Manager
Country Manager
 
Posts: 8684
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity, with Waze HQ in the driving seat
Has thanked: 1836 times
Been thanked: 6304 times

Re: [Script] WME Aerial Shifter (WAS)

Postby iainhouse » Fri Dec 06, 2013 1:08 am

I had a question posed to me today by dknight212 as to whether the opacity of the aerial layer could be reduced. Having referenced this script to find the name of the layer so I could experiment, I decided to go further. I edited my local copy of the script to include an entry for opacity (as a percentage).

Now I've done it for someone else, I've found it useful myself. Some of the new Google images are quite sharp and detract somewhat from the visibility of the roads - not to mention the difficulty in seeing city polygons.

I don't have the experience to package this as a separate script and it seems to be a good fit for the current script. I was wondering if you would consider incorporating the new functionality in the current script?

The code is below - the lines I have added all end with a //yy comment.

Code: Select all
$(function() {
   var nav = $('<div style="position:absolute;right:5px;bottom:36px">'
      + 'shift: <input type="text" style="width:30px;height:10px;vertical-align:baseline" class="sx" value="0"/> x '
      + '<input type="text" style="width:30px;height:10px;vertical-align:baseline" class="sy" value="0"/> m'
      + '   opacity: <input type="text" style="width:25px;height:10px;vertical-align:baseline" class="so" value="100"/> %' //yy
      + '</div>')
   ;
   var sx = nav.find('.sx');
   var sy = nav.find('.sy');
   var so = nav.find('.so'); //yy
   $('#site-navigation').append(nav);

   var cookiePrefix = 'WAS_';

   function loadFromCookies() {
      var val = $.cookie(cookiePrefix + 'sx');
      if (val !== null)
         sx.val(val);
      val = $.cookie(cookiePrefix + 'sy');
      if (val !== null)
         sy.val(val);
      val = $.cookie(cookiePrefix + 'so'); //yy
      if (val !== null) //yy
         so.val(val); //yy
   }

   function saveToCookies() {
      $.cookie(cookiePrefix + 'sx', sx.val(), {
         expires : 20 * 365
      });
      $.cookie(cookiePrefix + 'sy', sy.val(), {
         expires : 20 * 365
      });
      $.cookie(cookiePrefix + 'so', so.val(), { //yy
         expires : 20 * 365 //yy
      }); //yy
   }

   function update() {
      // Calculate meters per pixel factor of current map
      var ipu = OpenLayers.INCHES_PER_UNIT;
      var metersPerPixel = wazeMap.getResolution() * ipu['m']
         / ipu[wazeMap.getUnits()];
      var shiftX = parseInt(sx.val(), 10);
      var shiftY = parseInt(sy.val(), 10);

      // Apply the shift
      wazeMap.baseLayer.div.style.left =
         Math.round(shiftX / metersPerPixel) + 'px';
      wazeMap.baseLayer.div.style.top =
         Math.round(shiftY / metersPerPixel) + 'px';
      wazeMap.baseLayer.div.style.opacity = so.val()/100; //yy

      saveToCookies();
   }
   loadFromCookies();

   update();

   wazeMap.events.on({
      zoomend : update,
      moveend : update
   });
   wazeMap.baseLayer.events.on({
      loadend : update,
   });
   sx.change(update);
   sy.change(update);
   so.change(update); //yy
});
ImageImageImage
UK AdminsUK WikiWaze FAQWMEFU Script :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season
iainhouse
Country Manager
Country Manager
 
Posts: 8684
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity, with Waze HQ in the driving seat
Has thanked: 1836 times
Been thanked: 6304 times

Re: [Script] Waze Aerial Shifter Extension for Chrome

Postby iainhouse » Mon Aug 26, 2013 3:42 pm

I can offer some help. I can't fix the script proper, but I have identified the changes necessary and you can patch your own script until the author can update the proper script.

You will need to locate the un-packaged script where it is stored on your computer. First, open your Chrome Extensions tab. Each extension tab has a long ID: for my Waze Aerial Shifter, that ID is mjbppgkbhhfenndnpmblmdkegklllppk.

You then need to locate the script. I found it at %userprofile%\Local Settings\Application Data\Google\Chrome\User Data\Default\Extensions\mjbppgkbhhfenndnpmblmdkegklllppk\1.2.13_0 - on Windows, obviously! If you have a version other than XP, I'm not sure where it would be. It might be easier to search for a file containing the string "@name Waze Aerial Shifter" that appears in a similar location.

Once you've found the script, the change is relatively simple using a text editor such as Notepad. There are 2 instances of the string "OpenLayers.Layer.Bing_43" - change them both to "OpenLayers.Layer.Google_47". Save the script & refresh your browser.
ImageImageImage
UK AdminsUK WikiWaze FAQWMEFU Script :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season
iainhouse
Country Manager
Country Manager
 
Posts: 8684
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity, with Waze HQ in the driving seat
Has thanked: 1836 times
Been thanked: 6304 times

Re: [Script] Waze Aerial Shifter Extension for Chrome (fixed

Postby iainhouse » Mon Jun 24, 2013 6:01 pm

OK, definitely still reverting back to an un-shifted state after panning the map.

What I said above (not shifting when the values in the input boxes are changed) - not a real problem. It was caused by the other (non-working) script.

I do have a solution. Since I freely admit I only have a vague idea what I'm messing with, this could be elegant or it could be a major kludge. :lol:

I have added the following code to force a shift update after panning:
Code: Select all
   wazeMap.events.on({
      moveend : update
   });


There's probably a proper syntax to combine it with the "zoomend" event trigger, but I don't know what it is. :oops:
ImageImageImage
UK AdminsUK WikiWaze FAQWMEFU Script :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season
iainhouse
Country Manager
Country Manager
 
Posts: 8684
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity, with Waze HQ in the driving seat
Has thanked: 1836 times
Been thanked: 6304 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: No registered users