Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Maps route #851

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions plugins/bookmarks-by-zaso.user.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// ==UserScript==
// @id iitc-plugin-bookmarks@ZasoGD
// @id iitc-plugin-bookmarks@ZasoGD@Umer936
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this line.

// @name IITC plugin: Bookmarks for maps and portals
// @category Controls
// @version 0.2.12.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Save your favorite Maps and Portals and move the intel map with a click. Works with sync.
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Save your favorite Maps and Portals and move the Intel Map with a click. Works with sync. Now links to Google Maps with route of portals in folder.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
Expand Down Expand Up @@ -230,6 +230,9 @@
// Create a folder
elementTemp = '<li class="bookmarkFolder'+active+'" id="'+idFolders+'">'+folderLabel+'<ul>';

//Open array of portal locations
var alllats = [];

// For each bookmark
var fold = folders['bkmrk'];
for(var idBkmrk in fold) {
Expand All @@ -255,11 +258,27 @@
var guid = bkmrk['guid'];
var btn_link = '<a class="bookmarksLink" onclick="$(\'a.bookmarksLink.selected\').removeClass(\'selected\');'+returnToMap+'window.zoomToAndShowPortal(\''+guid+'\', ['+latlng+']);return false;">'+label+'</a>';
}

// Add each portal to array
alllats.push(latlng);

// Create the bookmark
elementTemp += '<li class="bkmrk" id="'+idBkmrk+'">'+btn_remove+btn_move+btn_link+'</li>';
}
elementTemp += '</li></ul>';



// Print link with portal locations
text = "https://www.google.com/maps/dir/Current+Location/";
var i;
for (i = 0; i < alllats.length; i++) {
text += alllats[i] + "/";
}

elementTemp += '</li><a target="_blank" href="'+text+'">MapIt!</a></ul>';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer "Google Maps route" to "MapIt!" here.




// Add folder 'Others' in last position
if(idFolders != window.plugin.bookmarks.KEY_OTHER_BKMRK) { element += elementTemp; }
else{ elementExc = elementTemp; }
Expand Down Expand Up @@ -844,6 +863,8 @@
// Create a folder
elementTemp = '<div class="bookmarkFolder" id="'+idFolders+'">'+folderLabel+'<div>';



// For each bookmark
var fold = folders['bkmrk'];
for(var idBkmrk in fold) {
Expand Down