This file contains hidden or 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
db.test.drop(); | |
db.test.insertOne({ | |
name: 'Denver', | |
location: { | |
"type": "FeatureCollection", | |
"features": [ | |
{ | |
"type": "Feature", | |
"properties": {}, | |
"geometry": { |
This file contains hidden or 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
var app = {markers: []}; | |
function serializePolygon(gpoly) { | |
var gjp = { | |
"type": "Polygon", | |
"coordinates": [] | |
}; | |
for (var i = 0; i < gpoly.latLngs.length; i++) { | |
gjp.coordinates[i] = [] | |
var ring = gpoly.latLngs.getAt(i) |
This file contains hidden or 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
const axios = require('axios'); | |
const fs = require('fs'); | |
const process = async () => { | |
const response = await axios.get('https://goo.gl/maps/29XfoqKK5s7UdaSy8'); | |
const expression = /window.APP_INITIALIZATION_STATE=\[\[\[\d+.\d+,(\d+.\d+),(\d+.\d+)/ | |
const [,lat, long] = response.data.match(expression)[0].split('[[[')[1].split(',') | |
console.log({ lat, long}) | |
return { lat, long}; |
OlderNewer