User:PesachZ/SyncScratch View history

m (Copying text of wiki page for coparison with the "Arizona/Resources" page)
m (Copying text of wiki page for coparison with the "Bookmarklets" page)
Line 1: Line 1:
<!-- This page is only viewed directly through a link from the state's "unique portion" page. Content on this page will be viewed in its entirety.--><noinclude>{{:USA/CommonState/ReturnPurge|{{SubPage2}}}}<br/></noinclude><!--
<!--if the section parameter is defined, do not place the visible banner, only as the code block for the top of a section-->{{GlobalMark/visible}}
------ DO NOT MODIFY ABOVE THIS LINE -------- DO NOT MODIFY ABOVE THIS LINE ------>
<!--
#####-----#####-----#####-----#####-----#####-----#####-----#####-----#####-----
####    This page has been curated  ####
####    to be included in the new    ####
####    Wazeopedia - GLOBAL Wiki.  ####
####    Please do not make any      ####
####    edits on this page without  ####
####    PRIOR CONSENSUS in the Wiki  ####
####    Updates and Discussions      ####
####    forum thread for this page.  ####
####    If a specific forum thread  ####
####    for this page doesn't exist  ####
####    please start one.            ####
####        www.waze.com/forum/     ####
####        viewforum.php?f=276      ####
#####-----#####-----#####-----#####-----#####-----#####-----#####-----#####-->


{{construction
| contact    = http://www.waze.com/forum/viewtopic.php?f=276&t=94974
| contacttype = forum
| draft      = yes
| open        = yes}}


'''Mapping and GIS Systems'''
A bookmarklet is a bookmark stored in a web browser that contains JavaScript commands to extend the browser's functionality through a single mouse click. For instance, a bookmarklet might enable the user to select an editor username on a page, click the bookmarklet, and be taken directly to the private message page with the username already entered.


The following are statewide and county mapping and GIS links. For each county, countywide resources are listed first. City-specific resources are then listed alphabetically by city name. This list is not comprehensive. If a city is not listed, then search for its official site. If you find a mapping or GIS resource, then please consider adding it to this page.
== Adding to a browser ==


== Mapping and GIS Links ==
=== Chrome ===
To add a bookmarklet to Google Chrome, you must open the Bookmark Manager. There are three methods to do this:


<imagemap>Image:ArizonaCountymap.gif|500px|
'''METHOD 1:''' Via Chrome's Menu option
poly 64 5 149 3 145 18 145 28 141 35 143 47 99 73 96 205 83 202 78 209 49 203 35 190 34 183 31 182 30 169 19 159 21 146 25 143 20 112 20 84 19 70 29 66 36 68 47 77 53 76 60 60 [[#Mohave_County|Mohave County]]
poly 157 5 258 3 261 203 256 205 231 193 217 193 215 164 199 165 200 153 166 152 165 137 160 138 158 131 152 133 147 126 127 123 110 108 104 108 104 75 149 48 147 37 150 31 151 16 153 10 [[#Coconino_County|Coconino County]]
poly 265 4 308 4 310 105 319 109 319 110 316 115 320 244 315 252 315 260 312 260 312 228 265 227 [[#Navajo_County|Navajo County]]
poly 367 5 371 243 353 243 351 249 346 250 342 258 333 261 327 268 320 258 319 253 323 247 322 117 327 112 322 104 313 104 312 5 [[#Apache_County|Apache County]]
poly 372 249 374 348 369 349 365 340 366 328 347 298 344 259 357 247 [[#Greenlee_County|Greenlee County]]
poly 101 228 102 168 104 112 108 113 123 126 145 133 151 138 156 137 154 142 161 142 162 157 196 157 196 170 211 171 212 193 203 200 201 217 216 223 216 227 207 228 206 230 173 224 165 237 139 228 [[#Yavapai_County|Yavapai County]]
poly 11 297 13 287 11 279 11 273 24 264 25 231 30 225 31 221 51 207 80 215 86 208 96 209 95 274 61 273 60 265 35 267 36 299 13 299 [[#La_Paz_County|La Paz County]]
poly 4 342 2 335 8 328 18 328 27 317 23 303 39 303 38 270 56 269 56 277 95 278 94 377 [[#Yuma_County|Yuma County]]
poly 99 344 101 233 137 232 167 241 176 229 210 234 211 231 215 230 220 235 222 253 232 261 236 260 241 271 209 271 207 290 180 290 170 283 167 284 166 344 [[#Maricopa_County|Maricopa County]]
poly 282 346 169 345 170 289 178 295 212 295 213 276 243 274 262 310 264 309 273 299 281 296 [[#Pinal_County|Pinal County]]
poly 289 351 284 296 288 294 285 283 287 279 313 273 313 265 319 265 327 273 329 273 335 264 341 261 344 303 361 330 361 342 367 349 [[#Graham_County|Graham County]]
poly 99 349 282 349 281 404 235 405 234 419 219 419 219 425 97 379 [[#Pima_County|Pima County]]
poly 281 434 241 434 222 425 225 424 238 423 238 408 280 408 [[#Santa_Cruz_County|Santa Cruz County]]
poly 285 434 287 353 373 354 374 433 [[#Cochise_County|Cochise County]]
poly 220 220 204 215 208 201 215 197 225 201 233 199 256 211 262 211 263 232 310 234 309 270 283 278 283 293 269 297 263 305 239 254 236 256 234 259 225 250 223 233 220 229 [[#Gila_County|Gila County]]
desc none
</imagemap>


Click within the borders of any county in the map to jump to that county's resource list.
[[File:Chrome bookmark manager menu.png|right|400px|Click image to enlarge]]
* Left click on the Chrome menu [[File:Chrome-menu-button.png]] on the browser toolbar.  


=== Countrywide ===
* Hover over the "Bookmarks" menu and a drop-down menu will display
----


* [http://pe.usps.gov/text/pub28/28apc_002.htm '''United States Postal Service''']
* Left click on "Bookmark Manager"
<blockquote>The table lists examples of suffix forms that are primary street suffix names, common street suffixes or suffix abbreviations, and recommended official Postal Service standard suffix abbreviations. See also [https://wiki.waze.com/wiki/Abbreviations_and_acronyms#Standard_suffix_abbreviations '''Waze Standard Suffix Abbreviations]</blockquote>
{{clear}}


=== Statewide ===
'''METHOD 2:''' Bookmark menu
----


* [http://www.arcgis.com/home/webmap/viewer.html?webmap=b560059ae13b49d9b9161e4c6abda509&extent=-119.3098,28.2181,-103.083,37.2136 '''ArcGIS Functional Classification''']
[[File:Bookmark Bar menu.png|right|border]]
<blockquote>This is the Arizona Department of Transportation APLAN ArcGIS Functional Classification map. This is the interactive map that all Arizona editors are to use when establishing FC implementation into the Waze Map Editor.</blockquote>
* If you have the Bookmark Bar enabled, right-click anywhere on the Bookmark Bar


*[http://adot.maps.arcgis.com/apps/OnePane/basicviewer/index.html?appid=b9a50654100c456a87d9aa3624c11a2e '''Arizona's State Highway System''']
* Scroll down to Bookmark Manager and left-click
<blockquote>An interactive map showing Arizona's highways.</blockquote>
{{clear}}


*[http://adot.maps.arcgis.com/apps/OnePane/basicviewer/index.html?appid=b2169f9dbfcb469b99f754b080868c3e '''RailRoads of Arizona''']
'''METHOD 3:''' Shortcut key
<blockquote>An interactive map showing all of Arizona's RailRoad network.</blockquote>


*[http://adot.maps.arcgis.com/apps/OnePane/basicviewer/index.html?appid=ffc7de383a2d424cb28221bec8bcc51b '''Arizona Mileposts''']
[[File:Bookmark Manager.png|right|border]]  
<blockquote>An interactive map showing the location of all the Arizona Highway mileposts.</blockquote>
* Just use the shortcut {{key press|Ctrl|Shift|O}} or {{key press|Cmd|Option|B}}


*[http://adot.maps.arcgis.com/apps/Viewer/index.html?appid=f38fd1d129ce4c85aaac5b1e906f07de '''Arizona Highway Rest Area''']
After Opening the Bookmark menu:
<blockquote>An interactive map showing all of the Arizona Rest Stops location.</blockquote>


*[http://ctutools.azda.gov/dwm/pv/inspection_search.asp '''Arizona Department of Weights and Measures''']
* In the left window pane, navigate to where you want to add the bookmarklet.
<blockquote>Useful for verifying current Gas Station statuses.</blockquote>
{{clear}}


=== Counties ===
[[File:Bookmark Manager dropdown menu.png|right|border]]
----
* In the main window pane, right click to see the context menu.
==== Apache County ====


* [http://gis.co.apache.az.us/mapserver2014/mapviewerajax/?WEBLAYOUT=Library://Steve/Web+layouts/ApacheCounty.WebLayout&LOCALE=en&USERNAME=Anonymous '''''Apache County'' Maps''']
* Left click on "Add page"
<blockquote>Provides street names, and other information through various layers.</blockquote>
{{clear}}


==== Cochise County ====
[[File:Bookmark Manager add page.png|right|border]]
* In the "Name" box, enter any name you prefer to assist in identifying the bookmarklet. You could also leave it empty.


* [http://www.cochise.az.gov/information-technology/gis '''''Cochise County'' Maps''']
* In the "URL" box, paste the code your previously copied.
<blockquote>Access the '''Subdivision Plats & Surveys''' map for street names and other information through various layers.</blockquote>


==== Coconino County ====
When finished, it should look something like this:
[[File:Bookmark Manager Add page 02.jpg|border]]


* [http://gismaps.coconino.az.gov/parcelviewer/ '''''Coconino County'' Parcel Viewer''']
{{clear}}
<blockquote>Provides street names, house number assignments, parcel ownership, names of natural features, names of city facilities, and names of educational, medical, and religious institutions.</blockquote>


* [http://www.flagstaff.az.gov/QuickLinks.aspx?FID=47&NID=1720 '''''Flagstaff'' GIS Quick Links''']
Shortcut keys can be added with external add-on tools. One example is [http://www.howtogeek.com/127162/how-to-create-custom-keyboard-shortcuts-for-browser-actions-and-extensions-in-google-chrome/ this tool].
<blockquote>Flagstaff does not freely provide direct access to its GIS interactive map. They do make a [http://www.flagstaff.az.gov/DocumentCenter/View/15136 ''Street Map''], and other maps available in PDF format.</blockquote>


==== Gila County ====
=== Firefox ===
* Ensure the Bookmarks toolbar is visible with a Right-click in a blank area of the Firefox tab row or menu bar area. Alternately you can open the Bookmarks window with Ctrl-B.


<blockquote>'''''Gila County''''' does not currently have transportation-related maps on its [http://gis.gilacountyaz.gov/ ''Gila County GIS Center''] page.</blockquote>
* Right-click the bookmark bar or window and select '''New Bookmark.'''


==== Graham County ====
* Enter a name for the bookmarklet in the '''Name''' field.


* [http://72.165.8.69/PropertyInfo/ParcelBase/BingMap.aspx# '''''Graham County'' Maps''']
* The '''Location''' field is where you copy and paste the javascript code from one of the code boxes below. Be sure to include everything from the code box.
<blockquote>Provides Street names, and additional information through various layers. (Scroll down to find the link to the current map application.)</blockquote>


==== Greenlee County ====
* The other fields are not required. Press '''Add''' to save the changes.


<blockquote>'''''Greenlee County''''' does not appear to make map products freely available.</blockquote>
* Repeat the process for each bookmarklet desired.


==== La Paz County ====
== Running Bookmarkets ==
'''Desktops:'''


* [http://www.co.la-paz.az.us/Community_Development.html '''''La Paz County'' Community Development''']
Bookmarklets are easiest to use if you have your browser’s bookmarks toolbar enabled. Just click the bookmarklet and your browser will run it on the current page.
<blockquote>Click on the ''GIS Mapping Website'' link in the lower right side of the page to access the current mapping application. Provides street names, property ownership, addresses, and other information through various layers.</blockquote>


==== Maricopa County ====
'''Mobile Safari:'''


* [http://maps.mcassessor.maricopa.gov '''''Maricopa County'' Assessors Office Parcel Viewer''']<br/>''<small>(requires Microsoft Silverlight plugin)</small>''
If you don’t have a bookmarks toolbar — such as on Safari on an iPad or another mobile browser — just open your browser’s bookmarks pane and tap or click the bookmark.
<blockquote>Provides street names, house number assignments, and parcel ownership. Note that street names for private streets can be highly inaccurate, as can the directional designation (N, E, S, W) in some areas.</blockquote>


* [http://www.avondale.org/index.aspx?NID=2963 '''''Avondale'' OpenMaps''']
'''Mobile Chrome:'''
<blockquote>Links to several prepared maps in PDF format. None seem to provide street names or house numbers, but several contain information valuable for other mapping tasks.</blockquote>
#Pick a good name for it that you can get to auto-complete quickly.
#Type the name into the search bar when you want to run it.
#Tap the bookmarklet when it shows up in the drop-down.


* [http://www.buckeyeaz.gov/developers/map-resources/ '''''Buckeye'' Map Resources''']
== Defined scripts ==
<blockquote>Including links to a few PDF maps, plus their [http://www.buckeyeaz.gov/map-anything/ ''Map Anything''] map which provides street names and city boundaries.</blockquote>
The following bookmarklet scripts could be helpful to map editors. Following the instructions above for adding a bookmarklet based on your browser, select the code below with your mouse, highlighting all the code inside the box. Use that code to paste into the bookmark as the target or location.


* [http://infomap.chandleraz.gov/ '''''Chandler'' InfoMap''']<br/>''<small>(requires Microsoft Silverlight plugin)</small>''
''Formatted (viewable) code can be seen on the [[Talk:Bookmarklets#Expanded views|talk page]].''
<blockquote>Provides street names, and house number assignments.</blockquote>


* [http://www.fh.az.gov/220/Planning-Zoning '''''Fountain Hills'' Development Services Maps''']
<!-- this link has a script that needs to be added. http://www.waze.com/forum/viewtopic.php?f=12&t=17684#p431249 -->
<blockquote>Non-interactive prepared maps in PDF format listed on the left side. Also, their ''2009 Street Map Index'' is available in both [http://www.fh.az.gov/documentcenter/view/266 large] and [http://www.fh.az.gov/documentcenter/view/265 small] editions, which include street names but not house number assignments.</blockquote>
=== Map location ===


* [http://www.gilbertmapping.com/xslmaps/imapstestpage.aspx?T=CX '''''Gilbert'' CIP Interactive Map''']<br/>''<small>(requires Microsoft Silverlight plugin)</small>''
==== Open Waze Map Editor from LiveMap ====
<blockquote>Provides street names, and house number assignments. Note that some minor streets might not be represented graphically, but with a sufficiently close zoom setting will be named.</blockquote>
A script is no longer necessary. Click click the "Edit the map" link when viewing Livemap.


* [http://cog-gis.maps.arcgis.com/apps/Solutions/s2.html?appid=aac760ab1e8e498f99091c14f6bd06d1 '''''Glendale'' Address Finder''']
==== Open LiveMap from Waze Map Editor ====
<blockquote>Provides street names, and house number assignments.</blockquote>
This script opens a window with [[Live Map]] when currently viewing Waze Map Editor.


* [http://gis.mesaaz.gov/mTrac/ '''''Mesa'' Traffic Restriction Alerts and Closures (mTrac)''']
<!-- Do not modify this code directly. Go to the talk page to modify the formatted code and then compress it and paste the result below -->
<blockquote>Provides street names, construction information, street closures, and house number assignments. This is a more accurate resource for private street names within the City of Mesa.</blockquote>
{{pre2|<nowiki>
javascript:(function(){var center_lonlat=OpenLayers.Layer.SphericalMercator.inverseMercator(g_map.getCenter().lon,g_map.getCenter().lat);var mapZoom=(window.location.hostname=='www.waze.com'?(g_map.zoom>6?(g_map.zoom>7?g_map.zoom-5:g_map.zoom-6):0):(g_map.zoom>10?g_map.zoom-11:0));window.open('http://'+window.location.hostname+'/editor/?zoom='+mapZoom+'&lon='+center_lonlat.lon+'&lat='+center_lonlat.lat,'Waze Map Editor')})();
</nowiki>}}


* '''''Phoenix'''''
''A drag-n-drop link can be copied from [http://dl.dropbox.com/u/1437031/waze_bookmarklets.html this dropbox page] (AlanOfTheBerg's dropbox).''
** [http://phoenix.maps.arcgis.com/apps/webappviewer/index.html?id=37027b930d8340f1976824cbb605d92c '''Planning and Zoning Maps''']<br />Provides street names, addresses and parcel information. (New mapping application for Phoenix as of 2015.)
=== Map editing ===
** [http://www.phoenix.gov/streets/construction-projects/7th-street-and-7th-avenue-reverse-lanes '''7th St and 7th Ave Reversible Lane Information''']<br />Information on the center reversible lanes that run on 7th Ave between McDowell and Northern, and on 7th St between McDowell and Dunlap. The project information is out of date (the noted projects are complete), but the information on restrictions and signage is current.
{{Throttle warn}}
** [http://www.phoenix.gov/streetssite/Pages/Planned-Street-Restrictions.aspx '''Planned Street Closures''']<br />Motorists should be aware of the following City of Phoenix roadway restrictions and closures and are encouraged to allow for additional travel time.
==== Custom location scripts ====
** [http://www.phoenix.gov/update/street-closures '''Emergency Street Closures''']<br />When the City of Phoenix has to close a street due to an emergency situation, such as flooding or a utility emergency, closure information will appear on this page.
If you know of a script for a specific area, please add it to this list or request help from [http://www.waze.com/forum/viewforum.php?f=276 this forum] for it to be added.


* {{anchor|Queen_Creek}}[http://gisweb.queencreek.org/mapcentral/map.html?webmap=d96d44f824844daaa3df0efd4250709a '''''Queen Creek'' CIP Projects'']
* [[Michigan mapping resources|Michigan]]
<blockquote>Provides street names, and house number assignments.</blockquote>
* [[New York/Resources|New York]]


* [http://eservices.scottsdaleaz.gov/maps/parcel-information '''''Scottsdale'' Parcel Information]
==== Enable Pinch-to-Zoom Navigation ====
<blockquote>Provides street names, and house number assignments.</blockquote>
For mobile devices and tablets, this will enable two-fingered pinch zoom.


* '''''Tempe'''''
{{pre2|<nowiki>
** [http://www.tempe.gov/city-hall/public-works/transportation/street-closures-restrictions/-toggle-allupcoming '''Street Closures & Restrictions''']<br />Lists current, upcoming and past street closures and restrictions for both construction projects and other events. Closures and restrictions for ASU sporting events are typically listed here.
javascript:(function(){ol=function(n){var s=document.createElement('script');s.setAttribute('src','https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/lib/OpenLayers/'+n+'.js');document.body.appendChild(s);};ol('Control/PinchZoom');ol('Handler/Pinch');ol('Control/TouchNavigation');window.setTimeout(function(){Waze.map.addControl(new OpenLayers.Control.TouchNavigation);}, 100)}());
** [http://arcgis.com/apps/OnePane/basicviewer/index.html?appid=15abed81bb36408280c183a77959ddc6 '''Zoning Map''']<br />Provides street names, and house number assignments.
</nowiki>}}
<!-- contributed by Timbones -->


==== Mohave County ====
==== Reselect Segments from Permalink ====
This simply gets the list of segments IDs from the URL, and selects them again in WME.


* [http://mcgis.mohavecounty.us/Silverlight_1_9/?Viewer=moh '''''Mohave County'' Interactive Map Viewer''']
{{pre2|<nowiki>
<blockquote>Provides street names, property ownership, house number assignments, and other information through various layers.</blockquote>
javascript:if(q=window.location.search.match(new RegExp("[?&]segments?=([^&]*)"))){s=q[1].split(',');o=[];for(i=0;i<s.length;i++){n=Waze.model.segments.objects[s[i]];if(typeof n!='undefined')o.push(n);}Waze.selectionManager.select(o);}
</nowiki>}}
<!-- contributed by Timbones -->


==== Navajo County ====
==== Set segment locks in area ====
This script will set the lock rank on various segment types in the visible area of the WME. Current configuration listed:


* [http://www.navajocountyaz.gov/Departments/Treasurer/Property-Taxes/Property-Tax-Map-Search '''''Navajo County'' Property Information Map''']
* It will only update up to 150 segments
<blockquote>Provides street names, property ownership, house number assignments, and other information through various layers.</blockquote>
* It only modifies what can be modified by the user's current rank and area
**If the user's current rank is lower than the defined lock level, it will lock the roads at the user's rank
* It will not lower a rank less than it is currently set
* Freeways and Ramps are set to 4
* Major Highways are set to 3
* Minor Highways are set to 2
* Primary Streets are set to 2
* Railroads are set to 2
* Ferries are set to 5


==== Pima County ====
<!-- Do not modify this code directly. Go to the talk page to modify the formatted code and then compress it and paste the result below -->
{{pre2|<nowiki>
javascript:(function(){var fwy_lvl=4;var rmp_lvl=3;var maj_lvl=2;var min_lvl=1;var pri_lvl=1;var rr_lvl=1;var fer_lvl=4;var absolute=false;var count=0;var thisUser=Waze.loginManager.user;if(thisUser===null)return;var usrRank=thisUser.normalizedLevel;var UpdateObject;if(typeof(require)!=="undefined"){UpdateObject=require("Waze/Action/UpdateObject")}else{UpdateObject=Waze.Action.UpdateObject}if(fwy_lvl>(usrRank-1))fwy_lvl=usrRank-1;if(rmp_lvl>(usrRank-1))rmp_lvl=usrRank-1;if(maj_lvl>(usrRank-1))maj_lvl=usrRank-1;if(min_lvl>(usrRank-1))min_lvl=usrRank-1;if(pri_lvl>(usrRank-1))pri_lvl=usrRank-1;function onScreen(obj){if(obj.geometry){return(W.map.getExtent().intersectsBounds(obj.geometry.getBounds()))}return(false)}Object.forEach(W.model.segments.objects,function(k,v){if(count<150&&onScreen(v)&&v.isGeometryEditable()){if(v.attributes.roadType==3&&(v.attributes.lockRank<fwy_lvl||(absolute&&v.attributes.lockRank!=fwy_lvl))){count++;W.model.actionManager.add(new UpdateObject(v,{lockRank:fwy_lvl}))}if(v.attributes.roadType==4&&(v.attributes.lockRank<rmp_lvl||(absolute&&v.attributes.lockRank!=rmp_lvl))){count++;W.model.actionManager.add(new UpdateObject(v,{lockRank:rmp_lvl}))}if(v.attributes.roadType==6&&(v.attributes.lockRank<maj_lvl||(absolute&&v.attributes.lockRank!=maj_lvl))){count++;W.model.actionManager.add(new UpdateObject(v,{lockRank:maj_lvl}))}if(v.attributes.roadType==7&&(v.attributes.lockRank<min_lvl||(absolute&&v.attributes.lockRank!=min_lvl))){count++;W.model.actionManager.add(new UpdateObject(v,{lockRank:min_lvl}))}if(v.attributes.roadType==2&&(v.attributes.lockRank<pri_lvl||(absolute&&v.attributes.lockRank!=pri_lvl))){count++;W.model.actionManager.add(new UpdateObject(v,{lockRank:pri_lvl}))}if(v.attributes.roadType==18&&(v.attributes.lockRank<rr_lvl||(absolute&&v.attributes.lockRank!=rr_lvl))){count++;W.model.actionManager.add(new UpdateObject(v,{lockRank:rr_lvl}))}if(v.attributes.roadType==14&&(v.attributes.lockRank<fer_lvl||(absolute&&v.attributes.lockRank!=fer_lvl))){count++;W.model.actionManager.add(new UpdateObject(v,{lockRank:fer_lvl}))}}})})();
</nowiki>}}


* [https://pimamaps.pima.gov/Html5Viewer/index.html?configBase=https://pimamaps.pima.gov/Geocortex/Essentials/REST/sites/mainsite/viewers/mainmap/virtualdirectory/Resources/Config/Default '''''Pima County'' PimaMaps''']<br/>
==== Extraneous node remover ====
<blockquote>Provides a significant amount of information through various layers, including street names, house number assignments, property ownership, and the names of various types of institutions.  Additional maps are available on the [http://webcms.pima.gov/cms/one.aspx?portalId=169&pageId=22235 ''GIS Maps''] page, including several transportation maps.</blockquote>
This script will remove extraneous junction nodes that are not required. It will not remove nodes that prevent the problems related to loops with too few segments. This function is similar to the feature built into the Toolbox, but it operates as a stand alone script from other tools.


* [http://maps.tucsonaz.gov/tdot/ '''''Tucson'' Transportation Department Map''']
<!-- Do not modify this code directly. Go to the talk page to modify the formatted code and then compress it and paste the result below -->
<blockquote>Provides street names and house number assignments. Additional maps are available on the [http://it.tucsonaz.gov/gis/map-resources ''Map Resources''] page, and of particular interest to Waze map editors, on the [http://tdot.tucsonaz.gov/tdot/tdot-resource-center ''TDOT Resource Center''] page.</blockquote>
{{pre2|<nowiki>


==== Pinal County ====
javascript:(function(){var count=0;var geo=W.map.getExtent().toGeometry();Object.forEach(W.model.nodes.objects,function(k,v){if(count<10){if(v.areConnectionsEditable()&&geo.containsPoint(v.geometry)){if(v.attributes.segIDs.length==2){var seg1=W.model.segments.get(v.attributes.segIDs[0]);var seg2=W.model.segments.get(v.attributes.segIDs[1]);if(seg1&&seg2&&seg1.attributes.primaryStreetID==seg2.attributes.primaryStreetID&&seg1.attributes.roadType==seg2.attributes.roadType&&seg1.isOneWay()==seg2.isOneWay()&&seg1.isDrivable()&&seg2.isDrivable()){var update=true;if(seg1.attributes.fwdRestrictions&&seg1.attributes.revRestrictions&&seg2.attributes.fwdRestrictions&&seg2.attributes.revRestrictions&&v.attributes.restrictions){if(seg1.attributes.fwdRestrictions.length==0&&seg1.attributes.revRestrictions.length==0&&seg2.attributes.fwdRestrictions.length==0&&seg2.attributes.revRestrictions.length==0){for(var obj in v.attributes.restrictions){update=false;break}if(seg1.attributes.toNodeID==seg1.attributes.fromNodeID||seg2.attributes.toNodeID==seg2.attributes.fromNodeID){update=false}if(seg1.attributes.toNodeID!=v.fid&&(seg1.attributes.toNodeID==seg2.attributes.toNodeID||seg1.attributes.toNodeID==seg2.attributes.fromNodeID)){update=false}if(seg1.attributes.fromNodeID!=v.fid&&(seg1.attributes.fromNodeID==seg2.attributes.toNodeID||seg1.attributes.fromNodeID==seg2.attributes.fromNodeID)){update=false}if(update){var n1;var n2;if(seg1.attributes.toNodeID==v.fid){n1=W.model.nodes.get(seg1.attributes.fromNodeID)}else{n1=W.model.nodes.get(seg1.attributes.toNodeID)}if(seg2.attributes.toNodeID==v.fid){n2=W.model.nodes.get(seg2.attributes.fromNodeID)}else{n2=W.model.nodes.get(seg2.attributes.toNodeID)}for(var i=0;i<n1.attributes.segIDs.length;i++){for(var j=0;j<n2.attributes.segIDs.length;j++){if(n1.attributes.segIDs[i]==n2.attributes.segIDs[j]){console.log("Merge on",v.fid,"would cause two or more segments connected to same nodes.");update=false}if(update==false){break}}if(update==false){break}}}if(update){W.model.actionManager.add(new W.Action.MergeSegments(null,v));count++;console.log("merged("+count+") "+seg1.fid+" with "+seg2.fid+" at "+v.fid)}}}}}}}})})();</nowiki>}}


* [https://gismaps-test.pinalcountyaz.gov/webmap/webmap3.aspx?XML=parcelviewer.xml '''''Pinal County'' General Interactive GIS Map (Parcel Viewer)''']<br/>''<small>(requires Microsoft Silverlight plugin)</small>''
==== Geometry Node Wiper (GeoWipe) ====
<blockquote>Provides street names, and house number assignments.</blockquote>
Completely straightens all selected segments by removing all geometry nodes. DO NOT USE this on segments which are supposed to curve or have doglegs on them for navigational aids.
{{pre2|<nowiki>
javascript:(function() {var UpdateSegmentGeometry=require("Waze/Action/UpdateSegmentGeometry");  Object.forEach(Waze.selectionManager.selectedItems, function(k, va) {v=va.model;if (v && v.type == "segment" && v.geometry.components.length > 2) {var geo = v.geometry.clone();        geo.components.splice(1,geo.components.length-2);geo.components[0].calculateBounds();        geo.components[1].calculateBounds();Waze.model.actionManager.add(new UpdateSegmentGeometry(v, v.geometry, geo));}});})();</nowiki>}}


* [http://www.ajcity.net/DocumentCenter/Home/View/3784 '''''Apache Junction'' 2011 City Street Map''']
==== Segment Length ====
<blockquote>PDF map of city street names in AJ.</blockquote>
Displays the selected segment's length (similar to the Toolbox Measure tool) in both imperial and metric values, rounded to 2 decimals. This is intended for editors that are not able to use scripts on their PC, therefore can only see the segment length in whole meters (which when viewing in imperial is therefore rounded incorrectly) in the left panel of WME.
{{pre2|<nowiki>
javascript: (function() { var length = 0; if(W.selectionManager.selectedItems.length === 1){ var segment = W.selectionManager.selectedItems[0]; var line = new OpenLayers.Geometry.LineString(segment.geometry.components); length = line.getGeodesicLength(W.map.getProjectionObject()); alert(Math.round((length * 100))/100 + "m" + "\n" + Math.round((length * 3.28084 * 100))/100 + "ft"); } })();</nowiki>}}


* [http://amethyst.ci.casa-grande.az.us/general_plan_search/General_Plan_Search.html '''''Casa Grande'' General Plan Map''']
=== User information and communication ===
<blockquote>Provides street names. Parcels link to the Pinal County Assessor's web site record for the property, which can be used to obtain house number assignments.</blockquote>


* [http://www.coolidgeaz.com/index.asp?Type=B_BASIC&SEC={F5105E51-4C9C-4D13-A129-954A6FCB28F5} '''''Coolidge'' Maps''']
==== Create private message to user ====
<blockquote>Non-interactive maps in PDF format. The [http://www.coolidgeaz.com/vertical/sites/%7BAE188E70-DD7F-47BE-99EF-B58B70641DF9%7D/uploads/%7BE3D8A060-4C04-4576-BAC2-F552564A0483%7D.PDF ''City Street Map''] privides street names. Also included is the [http://www.coolidgeaz.com/vertical/sites/%7BAE188E70-DD7F-47BE-99EF-B58B70641DF9%7D/uploads/%7B78E966A8-79EE-4BDD-B4C4-BBB7AF991F51%7D.PDF ''Coolidge Portion Proposed North-South Freeway''] map.</blockquote>
This script will use the mouse-selected (highlighted) text on the page to prepare a private message page with the username already populated. If you don't highlight a username, the script will ask for one to be entered.


* [http://tof.maps.arcgis.com/apps/OnePane/basicviewer/index.html?appid=b8be4b53c1ed4075bfcc7a368044573d '''''Florence'' Interactive Map''']
<!-- Do not modify this code directly. Go to the talk page to modify the formatted code and then compress it and paste the result below -->
<blockquote>Provides street names, and and names of parks.</blockquote>
{{pre2|<nowiki>
javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username for sending PM (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://www.waze.com/forum/ucp.php?i=pm&mode=compose&username="+s}})();
</nowiki>}}


* '''''Queen Creek'''''
==== Display user's forum posts ====
<blockquote>See [[#Queen_Creek|''Queen Creek'']] in [[#Maricopa_County|''Maricopa County'']].</blockquote>
This script will use the mouse-selected (highlighted) text on the page to display the user's forum posts. If you don't highlight a username, the script will ask for one to be entered.


==== Santa Cruz County ====
Once on that page, selecting any entry of the user's name will move to the user's forum profile data.


* [http://gis.santacruzcountyaz.gov/index.html '''''Santa Cruz'' Maps''']
<!-- Do not modify this code directly. Go to the talk page to modify the formatted code and then compress it and paste the result below -->
<blockquote>Access the '''Assessors''' map for street names and other information through various layers.</blockquote>
{{pre2|<nowiki>
javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username to view forum posts (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://www.waze.com/forum/search.php?keywords=&terms=all&sv=0&sc=1&sf=all&sr=posts&sk=t&sd=d&st=0&ch=300&t=0&submit=Search&author="+s}})();
</nowiki>}}


==== Yavapai County ====
==== Display user's Wiki page ====
This script will use the mouse-selected (highlighted) text on the page to display the user's Wiki page. If you don't highlight a username, the script will ask for one to be entered.


* [http://gis.yavapai.us/v4/ '''''Yavapai County'' Interactive Map''']
<!-- Do not modify this code directly. Go to the talk page to modify the formatted code and then compress it and paste the result below -->
<blockquote>Provides street names, and a significant amount of additional information by enabling various layers. For example, turn on the ''Address Labels'' under ''Property Features'' for house number assignments, or ''Topo Features'' under ''Land Features'' for the names of natural features, park names, city facilities, educational institution names, religious institution names, etc.</blockquote>
{{pre2|<nowiki>
javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username for Wiki user page (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://wiki.waze.com/wiki/User:"+s}})();
</nowiki>}}


* [http://www.chinoaz.net/mis_gis/maps.shtml '''''Chino Valley'' Town Maps''']
==== Display user's Wiki contributions ====
<blockquote>Chino Valley does not freely provide direct access to its GIS interactive map. They do make a [http://www.chinoaz.net/mis_gis/pdf/StreetMap.pdf ''Street Map''], a [http://www.chinoaz.net/mis_gis/pdf/streetnames.pdf ''Street Name List''], and other maps available in PDF format. The ''Street Map'' provides street names.</blockquote>
This script will use the mouse-selected (highlighted) text on the page to display the user's Wiki contributions. If you don't highlight a username, the script will ask for one to be entered.


* [http://www.pvaz.net/Index.aspx?page=309 '''''Prescott Valley'' Map Gallery''']
<!-- Do not modify this code directly. Go to the talk page to modify the formatted code and then compress it and paste the result below -->
<blockquote>Prescott Valley does not freely provide direct access to its GIS interactive map. They do make a [http://www.pvaz.net/Modules/ShowDocument.aspx?documentid=186 ''Street Map''], and other maps available in PDF format. The ''Street Map'' includes street names, and the names of parks, some city facilities, and educational institutions.</blockquote>
{{pre2|<nowiki>
javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username for Wiki contributions (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://wiki.waze.com/wiki/Special:Contributions/"+s}})();
</nowiki>}}


==== Yuma County ====


* [http://gis.yumacountyaz.gov/SilverlightViewer_1_5 / '''''Yuma County'' GIS Map Viewer (requires Silverlight)''']
==== Get user's Editor profile ====
<blockquote>Provides street names, property ownership, house number assignments, and ot
This script will use the mouse-selected (highlighted) text on the page to display the user's Editor profile on the forum. If you don't highlight a username, the script will ask for one to be entered. This script opens a new browser tab.
 
<!-- Do not modify this code directly. Go to the talk page to modify the formatted code and then compress it and paste the result below -->
{{pre2|<nowiki>
javascript:(function(){var s='';if(window.getSelection){s= window.getSelection();}else if(document.getSelection){s= document.getSelection();}else if(document.selection){s= document.selection.createRange().text;}if(s==''){s=prompt("Enter Wazer name here or highlight name before using this bookmarklet.");}if((s != '')&&(s !=null)){window.open('http://www.waze.com/user/editor/'+s);}})();
</nowiki>}}
 
==== Get user's forum profile ====
This script will use the mouse-selected (highlighted) text on the page to display the user's forum profile on the forum. If you don't highlight a username, the script will ask for one to be entered.
 
<!-- Do not modify this code directly. Go to the talk page to modify the formatted code and then compress it and paste the result below -->
{{pre2|<nowiki>
javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username to view profile (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://www.waze.com/forum/memberlist.php?do=getall&username="+s}})();
</nowiki>}}
 
=== Wiki and support pages ===
==== Glossary Entries ====
This script will take you directly to the Waze [[Glossary]] entry for a highlighted or entered term. '''''Note:''' This BM will open the glossary in the USA local Wazeopedia, to have it redirect to a different local wiki, you can modify the begining of the url to the correct locale.''
{{Pre2|<nowiki>javascript:(function() {var s=new String(''); /* BM V6 2016-08-26 */ if (window.getSelection) {s=window.getSelection().toString();} else if (document.getSelection) {s=document.getSelection().toString();} else if (document.selection) {s=document.selection.createRange().text.toString();} if (!s) {s=prompt('No text selected. Enter a Glossary Entry term here:');} if (s) {window.open('https://wazeopedia.waze.com/wiki/USA/Glossary#'+encodeURIComponent(s.replace(/ /g,'_')).replace(/%/g,'.').replace(/\(/g,'.28').replace(/\)/g,'.29'));}})();</nowiki>}}
 
==== Purge Current Wiki Page ====
This Bookmarklet will purge the cached version of the current wiki page, causing it reload any included images, or transcluded templates. It has been updated to work on both the old wiki, and the new USA Wazeopedia.
{{Pre2|<nowiki>javascript: (function() /* BM V4 purge wiki page 2016-08-05 */ { var url = window.location.href;  var test = url.search("index.php"); var wazeopedia = url.search("wazeopedia.waze.com"); if (test <1) { if (wazeopedia <1) { window.open(url.replace(/\/wiki\//,'\/wiki\/index.php?action=purge&forcelinkupdate&title=')); } else { window.open(url.replace(/\/wiki\/([\w ]*\/)/,'\/wiki\/$1index.php?action=purge&forcelinkupdate&title=')); } } else { window.open(url.replace(/\?.*(title=[^&]*).*/,'?action=purge&forcelinkupdate&$1')); }})();</nowiki>}}
 
==== Open in Wazeopedia ====
This bookmarklet when deployed on any page in the legacy wiki (http://wiki.waze.com/wiki/), will open that same page in the USA local Wazeopedia (http://wazeopedia.waze.com/wiki/USA/). If deployed on a page in any Wazeopedia, it will open that page in the legacy wiki. If it detects that it's not on a legacy wiki or Wazeopedia page, it will prompt you to enter a <code><nowiki>{{PAGENAME}}</nowiki></code>, which it will then open in the USA local Wazeopedia.
 
This code can be modified for use by any country by simply replacing <code>USA</code> with the correct code for the Wazeopedia links off your country.
 
{{Pre2|<nowiki>javascript: (function() /* BM V2 view wiki page in USA Wazeopedia page or vice versa 2016-08-12 */ { var url = window.location.href; var wiki = url.search("wiki.waze.com/wiki"); var wazeopedia = url.search("wazeopedia.waze.com/wiki"); if (wiki < 1 && wazeopedia < 1) { var response = prompt('This is not a page on the legacy Waze wiki. Please enter a PAGENAME here.'); if (response) { wiki = 1; url="https://wiki.waze.com/wiki/"+response; } else { return; } } if (wazeopedia < 1) { window.open(url.replace(/wiki.waze.com\/wiki\//i,"wazeopedia.waze.com/wiki/USA/")); } else { window.open(url.replace(/wazeopedia.waze.com\/wiki\/.*?\//i,"wiki.waze.com/wiki/")); } })();</nowiki>}}
 
=== Device ===
====Geocaching====
 
by {{username|davipt}}
 
''Geocaching-Waze bookmarklet'' is a iOS Safari bookmarklet that allows driving to a given Geocaching coordinate with Waze. It assumes a fixed flow within iOS and the official Geocaching client, but it could be adapted to other situations.
 
Open the iOS Geocaching app, pick up a cache, click on '''Open on external map''', which will open Google Maps on the browser. From this page, click on the bookmarklet which will display the lat+lon; then open Waze on that point, ready to drive there.
 
Set up:
* open safari and open any webpage
* add the page as a bookmark, call it something ("Waze"?). At this point one can't change the location.
* open the bookmarks list, edit the bookmark, and change the location to the following text:
{{pre2|<nowiki>javascript:l=document.location.href;l=l.replace(/.*?(@|%40|%2540)/,"");l=l.replace(/.*?(-?[0-9.]*,-?[0-9.]*).*/,"$1");alert(l);document.location.href='waze://?ll='+l;</nowiki>}}
 
Then once this is set up, here's how to use it:
* on the Geocaching client, pick the cache you want to drive to, and click on the "open on external map", which will open Safari and maps.google.com
* click on safari bookmarks and the waze bookmark
* an alert will show the "lat,lon", just in case, to ensure the value was parsed correctly (waze crashes if this value is incorrect btw)
* Waze will open with a marker at the cache's coordinate. click on the marker and drive there. Or manually pick a road nearby in case it's a cache with no access by car ;)
 
Feedback is welcomed.
{{Mbox|type=forum|text=Comments or questions on this bookmarklet can be brought up in the [http://www.waze.com/forum/viewtopic.php?f=3&t=36866 ''Geocaching-Waze bookmarklet'' forum thread]}}
 
[[Category:Bookmarklets]]

Revision as of 05:54, 13 November 2016

This new page is currently undergoing modifications. The information presented should be considered a draft, not yet ready for use. This content is open to changes from anyone during construction. If you would like to make changes or have questions, please post a message in this forum.

A bookmarklet is a bookmark stored in a web browser that contains JavaScript commands to extend the browser's functionality through a single mouse click. For instance, a bookmarklet might enable the user to select an editor username on a page, click the bookmarklet, and be taken directly to the private message page with the username already entered.

Adding to a browser

Chrome

To add a bookmarklet to Google Chrome, you must open the Bookmark Manager. There are three methods to do this:

METHOD 1: Via Chrome's Menu option

Click image to enlarge
Click image to enlarge
  • Left click on the Chrome menu on the browser toolbar.
  • Hover over the "Bookmarks" menu and a drop-down menu will display
  • Left click on "Bookmark Manager"

METHOD 2: Bookmark menu

  • If you have the Bookmark Bar enabled, right-click anywhere on the Bookmark Bar
  • Scroll down to Bookmark Manager and left-click

METHOD 3: Shortcut key

  • Just use the shortcut Ctrl+ Shift+O or Cmd+ Option+B

After Opening the Bookmark menu:

  • In the left window pane, navigate to where you want to add the bookmarklet.
  • In the main window pane, right click to see the context menu.
  • Left click on "Add page"
  • In the "Name" box, enter any name you prefer to assist in identifying the bookmarklet. You could also leave it empty.
  • In the "URL" box, paste the code your previously copied.

When finished, it should look something like this:

Shortcut keys can be added with external add-on tools. One example is this tool.

Firefox

  • Ensure the Bookmarks toolbar is visible with a Right-click in a blank area of the Firefox tab row or menu bar area. Alternately you can open the Bookmarks window with Ctrl-B.
  • Right-click the bookmark bar or window and select New Bookmark.
  • Enter a name for the bookmarklet in the Name field.
  • The Location field is where you copy and paste the javascript code from one of the code boxes below. Be sure to include everything from the code box.
  • The other fields are not required. Press Add to save the changes.
  • Repeat the process for each bookmarklet desired.

Running Bookmarkets

Desktops:

Bookmarklets are easiest to use if you have your browser’s bookmarks toolbar enabled. Just click the bookmarklet and your browser will run it on the current page.

Mobile Safari:

If you don’t have a bookmarks toolbar — such as on Safari on an iPad or another mobile browser — just open your browser’s bookmarks pane and tap or click the bookmark.

Mobile Chrome:

  1. Pick a good name for it that you can get to auto-complete quickly.
  2. Type the name into the search bar when you want to run it.
  3. Tap the bookmarklet when it shows up in the drop-down.

Defined scripts

The following bookmarklet scripts could be helpful to map editors. Following the instructions above for adding a bookmarklet based on your browser, select the code below with your mouse, highlighting all the code inside the box. Use that code to paste into the bookmark as the target or location.

Formatted (viewable) code can be seen on the talk page.

Map location

Open Waze Map Editor from LiveMap

A script is no longer necessary. Click click the "Edit the map" link when viewing Livemap.

Open LiveMap from Waze Map Editor

This script opens a window with Live Map when currently viewing Waze Map Editor.

javascript:(function(){var center_lonlat=OpenLayers.Layer.SphericalMercator.inverseMercator(g_map.getCenter().lon,g_map.getCenter().lat);var mapZoom=(window.location.hostname=='www.waze.com'?(g_map.zoom>6?(g_map.zoom>7?g_map.zoom-5:g_map.zoom-6):0):(g_map.zoom>10?g_map.zoom-11:0));window.open('http://'+window.location.hostname+'/editor/?zoom='+mapZoom+'&lon='+center_lonlat.lon+'&lat='+center_lonlat.lat,'Waze Map Editor')})();

A drag-n-drop link can be copied from this dropbox page (AlanOfTheBerg's dropbox).

Map editing

You may not be granted edit points for making a large number of edits in a short time (usually only possible using scripts to edit).
See the Map protection page for detailed information.

Custom location scripts

If you know of a script for a specific area, please add it to this list or request help from this forum for it to be added.

Enable Pinch-to-Zoom Navigation

For mobile devices and tablets, this will enable two-fingered pinch zoom.

javascript:(function(){ol=function(n){var s=document.createElement('script');s.setAttribute('src','https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/lib/OpenLayers/'+n+'.js');document.body.appendChild(s);};ol('Control/PinchZoom');ol('Handler/Pinch');ol('Control/TouchNavigation');window.setTimeout(function(){Waze.map.addControl(new OpenLayers.Control.TouchNavigation);}, 100)}());

Reselect Segments from Permalink

This simply gets the list of segments IDs from the URL, and selects them again in WME.

javascript:if(q=window.location.search.match(new RegExp("[?&]segments?=([^&]*)"))){s=q[1].split(',');o=[];for(i=0;i<s.length;i++){n=Waze.model.segments.objects[s[i]];if(typeof n!='undefined')o.push(n);}Waze.selectionManager.select(o);}

Set segment locks in area

This script will set the lock rank on various segment types in the visible area of the WME. Current configuration listed:

  • It will only update up to 150 segments
  • It only modifies what can be modified by the user's current rank and area
    • If the user's current rank is lower than the defined lock level, it will lock the roads at the user's rank
  • It will not lower a rank less than it is currently set
  • Freeways and Ramps are set to 4
  • Major Highways are set to 3
  • Minor Highways are set to 2
  • Primary Streets are set to 2
  • Railroads are set to 2
  • Ferries are set to 5
javascript:(function(){var fwy_lvl=4;var rmp_lvl=3;var maj_lvl=2;var min_lvl=1;var pri_lvl=1;var rr_lvl=1;var fer_lvl=4;var absolute=false;var count=0;var thisUser=Waze.loginManager.user;if(thisUser===null)return;var usrRank=thisUser.normalizedLevel;var UpdateObject;if(typeof(require)!=="undefined"){UpdateObject=require("Waze/Action/UpdateObject")}else{UpdateObject=Waze.Action.UpdateObject}if(fwy_lvl>(usrRank-1))fwy_lvl=usrRank-1;if(rmp_lvl>(usrRank-1))rmp_lvl=usrRank-1;if(maj_lvl>(usrRank-1))maj_lvl=usrRank-1;if(min_lvl>(usrRank-1))min_lvl=usrRank-1;if(pri_lvl>(usrRank-1))pri_lvl=usrRank-1;function onScreen(obj){if(obj.geometry){return(W.map.getExtent().intersectsBounds(obj.geometry.getBounds()))}return(false)}Object.forEach(W.model.segments.objects,function(k,v){if(count<150&&onScreen(v)&&v.isGeometryEditable()){if(v.attributes.roadType==3&&(v.attributes.lockRank<fwy_lvl||(absolute&&v.attributes.lockRank!=fwy_lvl))){count++;W.model.actionManager.add(new UpdateObject(v,{lockRank:fwy_lvl}))}if(v.attributes.roadType==4&&(v.attributes.lockRank<rmp_lvl||(absolute&&v.attributes.lockRank!=rmp_lvl))){count++;W.model.actionManager.add(new UpdateObject(v,{lockRank:rmp_lvl}))}if(v.attributes.roadType==6&&(v.attributes.lockRank<maj_lvl||(absolute&&v.attributes.lockRank!=maj_lvl))){count++;W.model.actionManager.add(new UpdateObject(v,{lockRank:maj_lvl}))}if(v.attributes.roadType==7&&(v.attributes.lockRank<min_lvl||(absolute&&v.attributes.lockRank!=min_lvl))){count++;W.model.actionManager.add(new UpdateObject(v,{lockRank:min_lvl}))}if(v.attributes.roadType==2&&(v.attributes.lockRank<pri_lvl||(absolute&&v.attributes.lockRank!=pri_lvl))){count++;W.model.actionManager.add(new UpdateObject(v,{lockRank:pri_lvl}))}if(v.attributes.roadType==18&&(v.attributes.lockRank<rr_lvl||(absolute&&v.attributes.lockRank!=rr_lvl))){count++;W.model.actionManager.add(new UpdateObject(v,{lockRank:rr_lvl}))}if(v.attributes.roadType==14&&(v.attributes.lockRank<fer_lvl||(absolute&&v.attributes.lockRank!=fer_lvl))){count++;W.model.actionManager.add(new UpdateObject(v,{lockRank:fer_lvl}))}}})})();

Extraneous node remover

This script will remove extraneous junction nodes that are not required. It will not remove nodes that prevent the problems related to loops with too few segments. This function is similar to the feature built into the Toolbox, but it operates as a stand alone script from other tools.


javascript:(function(){var count=0;var geo=W.map.getExtent().toGeometry();Object.forEach(W.model.nodes.objects,function(k,v){if(count<10){if(v.areConnectionsEditable()&&geo.containsPoint(v.geometry)){if(v.attributes.segIDs.length==2){var seg1=W.model.segments.get(v.attributes.segIDs[0]);var seg2=W.model.segments.get(v.attributes.segIDs[1]);if(seg1&&seg2&&seg1.attributes.primaryStreetID==seg2.attributes.primaryStreetID&&seg1.attributes.roadType==seg2.attributes.roadType&&seg1.isOneWay()==seg2.isOneWay()&&seg1.isDrivable()&&seg2.isDrivable()){var update=true;if(seg1.attributes.fwdRestrictions&&seg1.attributes.revRestrictions&&seg2.attributes.fwdRestrictions&&seg2.attributes.revRestrictions&&v.attributes.restrictions){if(seg1.attributes.fwdRestrictions.length==0&&seg1.attributes.revRestrictions.length==0&&seg2.attributes.fwdRestrictions.length==0&&seg2.attributes.revRestrictions.length==0){for(var obj in v.attributes.restrictions){update=false;break}if(seg1.attributes.toNodeID==seg1.attributes.fromNodeID||seg2.attributes.toNodeID==seg2.attributes.fromNodeID){update=false}if(seg1.attributes.toNodeID!=v.fid&&(seg1.attributes.toNodeID==seg2.attributes.toNodeID||seg1.attributes.toNodeID==seg2.attributes.fromNodeID)){update=false}if(seg1.attributes.fromNodeID!=v.fid&&(seg1.attributes.fromNodeID==seg2.attributes.toNodeID||seg1.attributes.fromNodeID==seg2.attributes.fromNodeID)){update=false}if(update){var n1;var n2;if(seg1.attributes.toNodeID==v.fid){n1=W.model.nodes.get(seg1.attributes.fromNodeID)}else{n1=W.model.nodes.get(seg1.attributes.toNodeID)}if(seg2.attributes.toNodeID==v.fid){n2=W.model.nodes.get(seg2.attributes.fromNodeID)}else{n2=W.model.nodes.get(seg2.attributes.toNodeID)}for(var i=0;i<n1.attributes.segIDs.length;i++){for(var j=0;j<n2.attributes.segIDs.length;j++){if(n1.attributes.segIDs[i]==n2.attributes.segIDs[j]){console.log("Merge on",v.fid,"would cause two or more segments connected to same nodes.");update=false}if(update==false){break}}if(update==false){break}}}if(update){W.model.actionManager.add(new W.Action.MergeSegments(null,v));count++;console.log("merged("+count+") "+seg1.fid+" with "+seg2.fid+" at "+v.fid)}}}}}}}})})();

Geometry Node Wiper (GeoWipe)

Completely straightens all selected segments by removing all geometry nodes. DO NOT USE this on segments which are supposed to curve or have doglegs on them for navigational aids.

javascript:(function() {var UpdateSegmentGeometry=require("Waze/Action/UpdateSegmentGeometry");   Object.forEach(Waze.selectionManager.selectedItems, function(k, va) {v=va.model;if (v && v.type == "segment" && v.geometry.components.length > 2) {var geo = v.geometry.clone();         geo.components.splice(1,geo.components.length-2);geo.components[0].calculateBounds();         geo.components[1].calculateBounds();Waze.model.actionManager.add(new UpdateSegmentGeometry(v, v.geometry, geo));}});})();

Segment Length

Displays the selected segment's length (similar to the Toolbox Measure tool) in both imperial and metric values, rounded to 2 decimals. This is intended for editors that are not able to use scripts on their PC, therefore can only see the segment length in whole meters (which when viewing in imperial is therefore rounded incorrectly) in the left panel of WME.

javascript: (function() { var length = 0; if(W.selectionManager.selectedItems.length === 1){ var segment = W.selectionManager.selectedItems[0]; var line = new OpenLayers.Geometry.LineString(segment.geometry.components); length = line.getGeodesicLength(W.map.getProjectionObject()); alert(Math.round((length * 100))/100 + "m" + "\n" + Math.round((length * 3.28084 * 100))/100 + "ft"); } })();

User information and communication

Create private message to user

This script will use the mouse-selected (highlighted) text on the page to prepare a private message page with the username already populated. If you don't highlight a username, the script will ask for one to be entered.

javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username for sending PM (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://www.waze.com/forum/ucp.php?i=pm&mode=compose&username="+s}})();

Display user's forum posts

This script will use the mouse-selected (highlighted) text on the page to display the user's forum posts. If you don't highlight a username, the script will ask for one to be entered.

Once on that page, selecting any entry of the user's name will move to the user's forum profile data.

javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username to view forum posts (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://www.waze.com/forum/search.php?keywords=&terms=all&sv=0&sc=1&sf=all&sr=posts&sk=t&sd=d&st=0&ch=300&t=0&submit=Search&author="+s}})();

Display user's Wiki page

This script will use the mouse-selected (highlighted) text on the page to display the user's Wiki page. If you don't highlight a username, the script will ask for one to be entered.

javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username for Wiki user page (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://wiki.waze.com/wiki/User:"+s}})();

Display user's Wiki contributions

This script will use the mouse-selected (highlighted) text on the page to display the user's Wiki contributions. If you don't highlight a username, the script will ask for one to be entered.

javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username for Wiki contributions (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://wiki.waze.com/wiki/Special:Contributions/"+s}})();


Get user's Editor profile

This script will use the mouse-selected (highlighted) text on the page to display the user's Editor profile on the forum. If you don't highlight a username, the script will ask for one to be entered. This script opens a new browser tab.

javascript:(function(){var s='';if(window.getSelection){s= window.getSelection();}else if(document.getSelection){s= document.getSelection();}else if(document.selection){s= document.selection.createRange().text;}if(s==''){s=prompt("Enter Wazer name here or highlight name before using this bookmarklet.");}if((s != '')&&(s !=null)){window.open('http://www.waze.com/user/editor/'+s);}})();

Get user's forum profile

This script will use the mouse-selected (highlighted) text on the page to display the user's forum profile on the forum. If you don't highlight a username, the script will ask for one to be entered.

javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username to view profile (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://www.waze.com/forum/memberlist.php?do=getall&username="+s}})();

Wiki and support pages

Glossary Entries

This script will take you directly to the Waze Glossary entry for a highlighted or entered term. Note: This BM will open the glossary in the USA local Wazeopedia, to have it redirect to a different local wiki, you can modify the begining of the url to the correct locale.

javascript:(function() {var s=new String(''); /* BM V6 2016-08-26 */ if (window.getSelection) {s=window.getSelection().toString();} else if (document.getSelection) {s=document.getSelection().toString();} else if (document.selection) {s=document.selection.createRange().text.toString();} if (!s) {s=prompt('No text selected. Enter a Glossary Entry term here:');} if (s) {window.open('https://wazeopedia.waze.com/wiki/USA/Glossary#'+encodeURIComponent(s.replace(/ /g,'_')).replace(/%/g,'.').replace(/\(/g,'.28').replace(/\)/g,'.29'));}})();

Purge Current Wiki Page

This Bookmarklet will purge the cached version of the current wiki page, causing it reload any included images, or transcluded templates. It has been updated to work on both the old wiki, and the new USA Wazeopedia.

javascript: (function() /* BM V4 purge wiki page 2016-08-05 */ { var url = window.location.href;  var test = url.search("index.php"); var wazeopedia = url.search("wazeopedia.waze.com"); if (test <1) { if (wazeopedia <1) { window.open(url.replace(/\/wiki\//,'\/wiki\/index.php?action=purge&forcelinkupdate&title=')); } else { window.open(url.replace(/\/wiki\/([\w ]*\/)/,'\/wiki\/$1index.php?action=purge&forcelinkupdate&title=')); } } else { window.open(url.replace(/\?.*(title=[^&]*).*/,'?action=purge&forcelinkupdate&$1')); }})();

Open in Wazeopedia

This bookmarklet when deployed on any page in the legacy wiki (http://wiki.waze.com/wiki/), will open that same page in the USA local Wazeopedia (http://wazeopedia.waze.com/wiki/USA/). If deployed on a page in any Wazeopedia, it will open that page in the legacy wiki. If it detects that it's not on a legacy wiki or Wazeopedia page, it will prompt you to enter a {{PAGENAME}}, which it will then open in the USA local Wazeopedia.

This code can be modified for use by any country by simply replacing USA with the correct code for the Wazeopedia links off your country.

javascript: (function() /* BM V2 view wiki page in USA Wazeopedia page or vice versa 2016-08-12 */ { var url = window.location.href; var wiki = url.search("wiki.waze.com/wiki"); var wazeopedia = url.search("wazeopedia.waze.com/wiki"); if (wiki < 1 && wazeopedia < 1) { var response = prompt('This is not a page on the legacy Waze wiki. Please enter a PAGENAME here.'); if (response) { wiki = 1; url="https://wiki.waze.com/wiki/"+response; } else { return; } } if (wazeopedia < 1) { window.open(url.replace(/wiki.waze.com\/wiki\//i,"wazeopedia.waze.com/wiki/USA/")); } else { window.open(url.replace(/wazeopedia.waze.com\/wiki\/.*?\//i,"wiki.waze.com/wiki/")); } })();

Device

Geocaching

by davipt (PM [Help])  

Geocaching-Waze bookmarklet is a iOS Safari bookmarklet that allows driving to a given Geocaching coordinate with Waze. It assumes a fixed flow within iOS and the official Geocaching client, but it could be adapted to other situations.

Open the iOS Geocaching app, pick up a cache, click on Open on external map, which will open Google Maps on the browser. From this page, click on the bookmarklet which will display the lat+lon; then open Waze on that point, ready to drive there.

Set up:

  • open safari and open any webpage
  • add the page as a bookmark, call it something ("Waze"?). At this point one can't change the location.
  • open the bookmarks list, edit the bookmark, and change the location to the following text:
javascript:l=document.location.href;l=l.replace(/.*?(@|%40|%2540)/,"");l=l.replace(/.*?(-?[0-9.]*,-?[0-9.]*).*/,"$1");alert(l);document.location.href='waze://?ll='+l;

Then once this is set up, here's how to use it:

  • on the Geocaching client, pick the cache you want to drive to, and click on the "open on external map", which will open Safari and maps.google.com
  • click on safari bookmarks and the waze bookmark
  • an alert will show the "lat,lon", just in case, to ensure the value was parsed correctly (waze crashes if this value is incorrect btw)
  • Waze will open with a marker at the cache's coordinate. click on the marker and drive there. Or manually pick a road nearby in case it's a cache with no access by car ;)

Feedback is welcomed.

Comments or questions on this bookmarklet can be brought up in the Geocaching-Waze bookmarklet forum thread