Author: Gideon

Google Maps API V3: 通过邮编获取经纬度 Get Location (Latitude and Longitude) from Zip Code (Pin Code) using JavaScript

In this article I will explain with an example, how to get Location Coordinates i.e. Latitude and Longitude from Zip Code (Pin Code) by making use of Google Maps API V3 (Version 3) and JavaScript. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <textarea id="txtAddress… Read More

Google Maps V3: 导航到指定地址 Draw (Plot) route between User’s current location and Specified location

In this article I will explain how to draw a route between user’s current location and the specified location on Google Maps V3. In day to day life in our mobile phones we make use of navigation, in similar way using the HTML5 GeoLocation feature we can determine the current location of the user and using

点击谷歌地图后获取经纬度 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

jquery:颜色拾取器 Tiny Colorpicker

What is it? Tiny Colorpicker is a crossbrowser jquery plugin that creates a color picker (form) input. Its a easy way to add color pickers to your forms or user interface. Features IOS and Android support. AMD, Node, requirejs and commonjs support. Easy customizable Can be used inside forms or outside Lightweight Source is on GitHub 用法: $(document).ready(… Read More

jquery:圆形slider show – Tiny Circleslider – A lightweight cross browser circular carousel

What is it? Tinycircleslider is a circular slider / carousel. That was built to provide webdevelopers with a cool but subtle alternative to all those standard carousels. Tiny Circleslider can blend in on any wepage. It was built using the javascript jQuery library. Features IOS and Android support. AMD, Node, requirejs and commonjs support. Supports sli… Read More

jquery: 手机版时间拾取器 date time picker for mobile

Pickers There are three picker files: picker.js The core file (required before any other picker) picker.date.js The date picker picker.time.js The time picker To support old browsers, namely IE8, also include the legacy.js file. Themes All themes are generated using LESS and compiled from the lib/themes-source folder into the lib/themes folder. Ther… Read More

Mysql: LBS实现查找附近的人 (两经纬度之间的距离)

1. 利用GeoHash封装成内置数据库函数的简易方案; A:Mysql 内置函数方案,适合于已有业务,新增加LBS功能,增加经纬度字段方可,避免数据迁移 B:Mongodb 内置函数方案,适合中小型应用,快速实现LBS功能,性能优于A(推荐) 方案A: (MySQL Spatial) 1、先简历一张表:(MySQL 5.0 以上 仅支持 MyISAM 引擎) CREATE TABLE address ( address CHAR(80) NOT NULL, address_loc POINT NOT NULL, PRIMARY KEY(address) ); 空间索引: ALTER TABLE address ADD SPATIAL INDEX(address_… Read More

Swift中文教程(十七) 可选链

可选链(Optional Chaining)是一种可以请求和调用属性、方法及子脚本的过程,它的自判断性体现于请求或调用的目标当前可能为空(nil)。如果自判断的目标有值,那么调用就会成功;相反,如果选择的目标为空(nil),则这种调用将返回空(nil)。多次请求或调用可以被链接在一起形成一个链,如果任何一个节点为空(nil)将导致整个链失效。   注意: Swift 的自判断链和 Objective-C 中的消息为空有些相像,但是 Swift 可以使用在任意类型中,并且失败与否可以被检测到。   可选链可替代强制解析   通过在想调用的属性、方法、或子脚本的可选值(optional valu… Read More

Swift中文教程(十六) 自动引用计数

Swift使用自动引用计数(ARC)来管理应用程序的内存使用。这表示内存管理已经是Swift的一部分,在大多数情况下,你并不需要考虑内存的管理。当实例并不再被需要时,ARC会自动释放这些实例所使用的内存。   但是,少数情况下,你必须提供部分代码的额外信息给ARC,这样它才能够帮你管理这部分内存。本章阐述了这些情况并且展示如何使用ARC来管理应用程序的内存。   注意 引用计数仅仅作用于类实例上。结构和枚举是值类型,而非引用类型,所以不能被引用存储和传递。   1、ARC怎样工作 每当你创建一个类的实例,ARC分配一个内存块来存储这个实例的信息,包含了类型信息和实例的属性值信息。… Read More