Skip to content

Instantly share code, notes, and snippets.

@TheSkorm
Last active August 29, 2015 13:56
Show Gist options
  • Select an option

  • Save TheSkorm/8874424 to your computer and use it in GitHub Desktop.

Select an option

Save TheSkorm/8874424 to your computer and use it in GitHub Desktop.
Javascript to get portal long and lat for ingress from iitc
a = "";
for (var key in portals) {
if (map.getBounds().contains(portals[key].getLatLng())){
nokeys = window.plugin.keys.keys[key];
if (nokeys == undefined) {
nokeys = 0
};
value = portals[key];
a = a + value.options.data.title.replace(",", ".") + "," + value.options.data.latE6 + "," + value.options.data.lngE6 + "," + nokeys + "\n"
}
};
window.dialog({
title: "CSV Export",
text: a,
width: 600
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment