[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 (WAS) 1.4.3 / 08.01.2014

Postby fmondini » Thu Jan 09, 2014 2:38 pm

berestovskyy wrote:
fmondini wrote:A little misalignment... (1.4.3)

Suggest a patch?

I mean: the opacity percent box is dropped on the line below :-)
fmondini
Waze Global Champs
Waze Global Champs
 
Posts: 323
Joined: Sat Sep 08, 2012 10:24 am
Location: Northern Italy
Has thanked: 260 times
Been thanked: 183 times

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

Postby berestovskyy » Thu Jan 09, 2014 9:04 am

fmondini wrote:A little misalignment... (1.4.3)

Suggest a patch?
berestovskyy
 
Posts: 839
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 259 times
Been thanked: 713 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
(76.69 KiB) Downloaded 1977 times
fmondini
Waze Global Champs
Waze Global Champs
 
Posts: 323
Joined: Sat Sep 08, 2012 10:24 am
Location: Northern Italy
Has thanked: 260 times
Been thanked: 183 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
 
Posts: 839
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 259 times
Been thanked: 713 times

Re: [Script] WME Aerial Shifter (WAS)

Postby JorgeARestrepo » Fri Jan 24, 2014 8:55 pm

iainhouse wrote: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 would like to reduce the opacity of GPS Points together with (or instead of) the aerial layer.
JorgeARestrepo
 
Posts: 1439
Joined: Tue Mar 20, 2012 3:19 am
Location: Medellín, Colombia
Has thanked: 1074 times
Been thanked: 1094 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...
miole67
Waze Global Champs
Waze Global Champs
 
Posts: 557
Joined: Mon Aug 01, 2011 9:25 am
Location: Monterotondo (Rm) Italy and Vatican City
Has thanked: 179 times
Been thanked: 145 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
 
Posts: 839
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 259 times
Been thanked: 713 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
});
iainhouse
Country Manager
Country Manager
 
Posts: 8072
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity
Has thanked: 1624 times
Been thanked: 5466 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
 
Posts: 839
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 259 times
Been thanked: 713 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/*
miole67
Waze Global Champs
Waze Global Champs
 
Posts: 557
Joined: Mon Aug 01, 2011 9:25 am
Location: Monterotondo (Rm) Italy and Vatican City
Has thanked: 179 times
Been thanked: 145 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: BLKTRUC, dude463, jarkaz, netguygreen