Last active
August 29, 2015 14:19
-
-
Save satyadeepk/77bbb406456d91e7132f to your computer and use it in GitHub Desktop.
Parse.com GeoPoint to Google map in Data browser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Parse google map | |
// @namespace http://addodoc.com | |
// @version 0.1 | |
// @description Opens a Parse GeoPoint from the Data browser into a Google map on click | |
// @include https://parse.com/apps/rocket*collections | |
// @include https://www.parse.com/apps/rocket*collections | |
// @copyright 2012+, You | |
// ==/UserScript== | |
setTimeout(function(){ | |
console.log('Google map'); | |
$("div.slick-cell").click(function(){ | |
var text = $(this).first().text(); | |
//console.log(text) ; | |
var array = text.split(", "); | |
if(array.length == 2 && !isNaN(parseFloat(array[0])) && !isNaN(parseFloat(array[1]))){ | |
window.open('https://www.google.com/maps/place//@' + array[0] + ',' + array[1] + ',16z/'); | |
} | |
}); | |
}, 5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment