[Script] WME Aerial Shifter 1.5 / 10.09.2014

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.

Moderator: Unholy

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 (WAS)

Postby paulkok_my » Wed Aug 28, 2013 9:16 am

berestovskyy wrote:Things change rapidly: v1.3.1 updated to new WME beta path

So fast? :shock:
And I just updated it to 1.3 half hour ago only.
ImageImageImageImageImage
Area Manager: Shah Alam / Klang, Southern Region, Malaysia
Asus Zenfone 2 on Android 5.0 (ZE551ML)

Join our FB group: Peninsular Malaysia, Sabah/Sarawak
or Google+ group: Waze in Malaysia on Google+
paulkok_my
Waze Local Champs
Waze Local Champs
 
Posts: 932
Joined: Thu Jul 19, 2012 4:34 am
Location: Selangor, Malaysia
Has thanked: 170 times
Been thanked: 177 times

Re: [Script] WME Aerial Shifter (WAS)

Postby berestovskyy » Wed Aug 28, 2013 10:20 am

paulkok_my wrote:So fast? :shock:
And I just updated it to 1.3 half hour ago only.

Previous version (1.3) still works fine. But now in beta WME it hides part of About menu item due to the new URL path :(
berestovskyy
Waze Global Champs
Waze Global Champs
 
Posts: 924
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 248 times
Been thanked: 688 times

Re: [Script] WME Aerial Shifter (WAS)

Postby berestovskyy » Mon Oct 07, 2013 8:49 am

Minor color/path fixes.

Please find v1.3.2 in my original post.
berestovskyy
Waze Global Champs
Waze Global Champs
 
Posts: 924
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 248 times
Been thanked: 688 times

Re: [Script] WME Aerial Shifter (WAS)

Postby miole67 » Tue Oct 22, 2013 8:08 am

Your script on 1.3.2 Beta WME works fine. But on the WME does not work. There seems to be a problem with the links.
Code: Select all
https://www.waze.com/editor/editor/*
https://www.waze.com/*/editor/editor/*
Maria Iole
Italian Global Champ
ImageImageImageImageImage ↖ Docs Waze Italia
miole67
Country Administrator: Italy, Madagascar, Liberia, Ivory Coast
FTW Italy Country Administrator
miole67
Waze Global Champs
Waze Global Champs
 
Posts: 490
Joined: Mon Aug 01, 2011 9:25 am
Location: Monterotondo (Rm) Italy and Vatican City
Has thanked: 142 times
Been thanked: 117 times

Re: [Script] WME Aerial Shifter (WAS)

Postby berestovskyy » Tue Oct 22, 2013 6:53 pm

miole67 wrote:Your script on 1.3.2 Beta WME works fine. But on the WME does not work. There seems to be a problem with the links.

Sorry, I didn't test it on Firefox :( Fixed and uploaded, please update.
berestovskyy
Waze Global Champs
Waze Global Champs
 
Posts: 924
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 248 times
Been thanked: 688 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
});
UK Country Administrator
AM: London (DELETED), S Wales
Waze 3.7.3 • iPhone 4S (iOS 6.1.3) • Chrome/W7x64
ImageImage
UK WikiWaze FAQ
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: 6357
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity
Has thanked: 984 times
Been thanked: 3191 times

Re: [Script] WME Aerial Shifter (WAS)

Postby berestovskyy » Fri Dec 06, 2013 10:19 am

Thanks iainhouse,
WAS v1.4.1:
- opacity of satellite imagery by iainhouse
- spinners for the inputs (seems does not work in Firefox)
- settings are now in local storage rather than cookies
- autoupdates

The download links are in my original post: link
berestovskyy
Waze Global Champs
Waze Global Champs
 
Posts: 924
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 248 times
Been thanked: 688 times

Re: [Script] WME Aerial Shifter (WAS)

Postby miole67 » Wed Jan 08, 2014 2:27 pm

With the release of the new beta version of WME 1.4.206 your script WAS is no longer visible...
Maria Iole
Italian Global Champ
ImageImageImageImageImage ↖ Docs Waze Italia
miole67
Country Administrator: Italy, Madagascar, Liberia, Ivory Coast
FTW Italy Country Administrator
miole67
Waze Global Champs
Waze Global Champs
 
Posts: 490
Joined: Mon Aug 01, 2011 9:25 am
Location: Monterotondo (Rm) Italy and Vatican City
Has thanked: 142 times
Been thanked: 117 times

Re: [Script] WME Aerial Shifter (WAS) 1.4.2 / 08.01.2014

Postby berestovskyy » Wed Jan 08, 2014 6:35 pm

v1.4.2:
- fixed script position/size
- added labels
- elements' classes changed to IDs

See my original post for the download links.
berestovskyy
Waze Global Champs
Waze Global Champs
 
Posts: 924
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 248 times
Been thanked: 688 times

Re: [Script] WME Aerial Shifter (WAS) 1.4.3 / 08.01.2014

Postby fmondini » Thu Jan 09, 2014 8:45 am

A little misalignment... (1.4.3)

WAS-ma.jpg
WAS-ma.jpg (76.69 KiB) Viewed 1646 times
Global Champ, Country Manager for Italy and Scripting Expert
Waze.Tools Suite (now in beta) author, check it out!
Wme-Tools Suite author, check it out!


ImageImageImageImage
fmondini
Waze Global Champs
Waze Global Champs
 
Posts: 317
Joined: Sat Sep 08, 2012 10:24 am
Location: Northern Italy
Has thanked: 258 times
Been thanked: 179 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: Google [Bot]