我有一个谷歌地图应用程序,我希望部署和预算编制时,我遇到了这个概述谷歌地图高级功能的页面https://developers.google.com/maps/pricing-and-plans/
以及免费等级的限制是什么.由于我的应用程序是单页应用程序,因此谷歌地图不会有很多页面,所以加载许多带有嵌入式地图的页面不会让我超过免费等级每日限制上限.
我没有与谷歌服务器的反向地理编码.我的应用程序是一家快递公司的实时运动绘图仪.在我的应用程序的情况下,什么包括作为谷歌的请求,可以帮助我计算我的应用程序将在一天内发出的请求数量?
我目前是该应用程序的唯一用户.
我有这个片段来计算行数并返回在MySQL表中找到的行数.这是代码,我在其中使用了underscore.js _.each进行迭代.
var all_rows = Noder.query('SELECT count(*) as erow from crud ', function(err, the_rows) {
_.each(the_rows, function (corndog) {
var trows = corndog.erow;
console.log("All rows", trows);
});
// var das_rows = trows;
// var total_pages = Math.ceil(das_rows / per_page);
// console.log("Pages",total_pages);
res.view('noder/orm', {
layout: 'layout',
js:the_rows,
post:results,
title: 'This is the hi page title. Gandalf The great.'
});
});
Run Code Online (Sandbox Code Playgroud)
我想用来trows计算为我的分页代码创建的页数.但是,我无法访问变量trows.
这是输出 console.log(the_rows);
[ RowDataPacket { erow: 12 } ]
Run Code Online (Sandbox Code Playgroud)
有没有其他方法可以做到这一点,以trows提供给我的其余代码?
我有此页面https://jsfiddle.net/r91bLb7r/9/,该页面用于显示此iframe https://jsfiddle.net/r91bLb7r/8/。
父页面具有我要从iframe访问的localstorage值。
这是父母的代码:
$(document).ready(function () {
$( "#top" ).click(function() {
localStorage.setItem("parent", "one");
alert('I am the top page');
});
});
Run Code Online (Sandbox Code Playgroud)
这是iframe代码:
$(document).ready(function () {
$( "#map" ).click(function() {
var mode = localStorage.getItem("parent");
alert('I am the iframe'+mode);
});
});
Run Code Online (Sandbox Code Playgroud)
如何从iframe访问父级的localstorage值?