Category: Google / Facebook / Amazon / Twitter / Network

点击谷歌地图后获取经纬度 Get Latitude and Longitude (Location Coordinates) using Google Maps OnClick event

n this short code snippet article I will explain how to get the Geographical position coordinates of a location i.e. Latitude and Longitude when user clicks anywhere on Google Maps using the Google Maps V3 OnClick event handler. In the below Google Map implementation, I have assigned an event handler to the Google Map within which

Google Maps V3: 通过经纬度获取地址信息 Get address from Latitude and Longitude

In this article I will explain how to get the address location from Latitude and Longitude using the Google Maps Geocoding API. I will explain two different ways of using the process of Reverse Geocoding using the Google Maps Geocoding API. Direct Usage Here I’ll pass the value of Latitude and Longitude directly from TextBoxes to the Google

谷歌无地图地址自动完成Google Places AutoComplete example without using Maps

In this article I will explain with an example, how to implement the Google Places Autocomplete without using Google Maps. In addition to this article will also explain how to use the Place changed event handler of the Google Autocomplete TextBox to get the selected place, its address and its location coordinates i.e. Latitude and Longitude. Implementing…

谷歌地图标记切换 Move Google Maps Markers: Change (Update) Marker position on Google Maps without refreshing

In this article I will explain how to move a marker to different locations on Google Maps i.e. How to change (update) position of a marker on Google Maps without refreshing the map. Move Google Maps Markers: Change (Update) Marker position on Google Maps without refreshing The following code snippet consists of an array of markers of

嵌入谷歌文档 Embed Google Doc Viewer: Display Google Drive Documents, SpreadSheets, PDF and Slides in Web page

Here Mudassar Ahmed Khan has explained how to embed Google Docs Viewer and display Google Drive files such as Word document (.doc, .docx), Excel Spreadsheet (.xls, .xlsx), PowerPoint presentation slides (ppt, .pptx) files and PDF documents (*.pdf) in your website’s web page. In this article I will explain how to embed Google Docs Viewer and display

下载YouTube视频字幕的方法

YouTube跟国内的优酷、土豆等视频网站比起来不仅广告时间短、可以“跳过广告”播放,而且很多视频上提供了字幕,有些视频甚至提供了20多种 语言的字幕。因为YouTube在国内是无法访问的,我经常会想着把一些YouTube上的视频下载下来,上传到国内的视频网站上供大家分享,但发现有个 问题,YouTube上的字幕和视频是独立的,没有合成到一起,所以,下载下来的视频是不含字幕的。这当然不行的,英语无字幕的视频估计没有几个人会喜 欢。那么,如何能把字幕也下载下来呢? YouTube的视频我是用了一个火狐浏览器的插件下载的,所以我就搜索有没有可以下载字幕的插件,果然找到了一个,YouTube Caption D… Read More

GMaps.js:让你快速集成 Google Maps 服务的 jQuery 插件

GMaps.js 功能 除了添加指定经纬度的标准地图之外,GMaps.js 还能定义地图放大的级别,添加标注,获取当前用户的地理位置(HTML5 geolocation),定义路线,绘制折线,并且实现这些功能只需要简单的几行代码。 另外 GMaps.js 每个动作都有 callback 函数让你去集成自定义事件。目前 GMaps.js 没有详细的文档,但是每个功能都有具体的例子,参考下基本就可以使用了。   DEMO: http://hpneo.github.io/gmaps/examples.html 官网:http://hpneo.github.io/gmaps/ 文档:http://hpneo.github.… Read More

Google Maps API v3: Remove Markers 移除标记

Simply do the following: I. Declare a global variable: var markersArray = ; II. Define a function: function clearOverlays() { for (var i = 0; i < markersArray.length; i++ ) { markersArray[i].setMap(null); } markersArray.length = 0; } OR google.maps.Map.prototype.clearOverlays = function() { for (var i = 0; i < markersArray.length; i++ ) {

网站图片JPG、PNG、GIF哪个好,该选择谁

目前网站图片的采用一共有流行三种,分别是JPG、PNG、GIF,然而很多人并不知道三者在选择的时候究竟应该选谁(BMP就不考虑了吧)。虽然都可以存储图片,但是如果要发布到网上,就必须考虑速度、大小和失真程度的问题。如果你运用得好,选对图片,那样便会使网站的整体体验上升,如果你运用得不好,就会引起反效果。下面我通过文件大小等多方面的元素来讲一下网站图片的合理选择。 PNG、GIF、JPG 介绍 GIF 图片 Gif 算是比较老的图片格式了,它的色彩效果最低,用gif保存鲜艳的图片的话会让你的网站看上去非常可怕。但是gif有着不可忽视的特点:体积小,有着极好的压缩效果,支持动画,并且支持透明效果,虽然这个透明… Read More

Firefox搜索框:自动出现添加搜索的提示

在header里面添加以下代码: <link rel="search" type="application/opensearchdescription+xml" title="iKeepStudying" href="http://justcode.ikeepstudying.com/iks.xml" /> 其中,标签“title”将会出现在图片中2的位置。 http://justcode.ikeepstudying.com/iks.xml 代码是 <?xml version="1.0" encoding="utf-8" ?> <SearchPlugin xmlns="http://www.m… Read More

如何防止网站关键数据被人恶意采集

昨天晚上花了几个小时用Jsoup写了一个网站采集器,帮一个高中同学采集了一个工业信息门户上的芯片待售信息。网站上显示的数据多达60w+条, 我写的程序跑了7个小时只采集了一半,算是可以交差了。 这已经是我第二次写这种采集器了。之前在做波菜网的时候,写过一个更复杂的。当时网站上线以后苦于没有原生态的内容,我就写了一个采集器从“百度身边”采集各大城市的餐馆和菜品信息,并通过google地图的接口获取餐馆的地理位置,然后转存到我们自己的网站上。 我必须承认,做这些事儿都是不光彩的,属于不劳而获,弄不好还得背上法律责任。但是在国内这个互联网的环境下,这种小规模的数据采集想上升到法律层面去禁止,还是不切实际的… Read More

PHP 谷歌验证 google reCAPTCHA PHP client library

Project page: http://www.google.com/recaptcha/ Repository: https://github.com/google/recaptcha Version: 1.1.1 License: BSD, see LICENSE   Description reCAPTCHA is a free CAPTCHA service that protect websites from spam and abuse. This is Google authored code that provides plugins for third-party integration with reCAPTCHA. Manual inst… Read More