Google Maps Android API utility library (the github repo and the documentation) supplies multiple cool features, including

  • Marker clustering — handles the display of a large number of points
  • Heat maps — display a large number of points as a heat map
  • IconGenerator — display text on your Markers
  • Poly decoding and encoding — compact encoding for paths, interoperability with Maps API web services
  • Spherical geometry — for example: computeDistance, computeHeading, computeArea
  • KML — displays KML data (Caution: Beta!)
  • GeoJSON — displays and styles GeoJSON data
Read on →


A .dSYM file is a debug symbols file. It is generated when in xcode:

  • Generate Debug Symbols setting is enabled
  • Debug Infomation Format is set to DWARF with dSYM File in the build settings of your project.
Read on →



In Cocoa, the Model-View-Controller pattern, a controller’s responsibility is to keep the view and the model synchronized. There are two parts to this: when the model object changes, the views have to be updated to reflect this change, and when the user interacts with controls, the model has to be updated accordingly.

Key-Value Observing helps us update the views to reflect changes to model objects. The controller can observe changes to those property values that the views depend on.

For more details, refer Key-Value Coding and Observing from;

Read on →

All the attributes of a property defines how the compiler generate the getter and setter accessors.

  • atomic / nonatomic
  • strong / weak: used for ARC.
  • assign / retain / copy: go to here for reference. These properties define how the compiler generate the setter accessor.
  • readonly / readwrite: if a property is declared as readonly, the compiler will only declare the getter accessor, so that you can not call setter accessor.
Read on →

Location Service Authorization

1. Set info.plist

For iOS SDK 8.0 and later, we need to set NSLocationWhenInUseUsageDescription and ‘NSLocationAlwaysUsageDescription’ in info.plist file. A sample case is:

<string>Do you allow the app to use your location?</string>
<string>Are you willing to allow the app to use your location?</string>

The string will appear in the popup dialog. You can leave it as empty, and only the system message will appear in the popup.

Read on →


Write your own overlay class (for example, MapOverlay) confirm to MKOverlay, synthesize coordinate and boundingMapRect, so that we can assign value to them while initializing it.

Note that the type of coordinate is CLLocationCoordinate2D with latitude and longitude, while boundingMapRect is MKMapRect. And we need to use MKMapPointForCoordinate method to convert a CLLocationCoordinate2D type data to MKMapPoint type data. If we assign the CLLocationCoordinate2D data directly to boundingMapRect, the overlay will be too small to draw, and the mapView:rendererForOverlay: method will not be called at all. It is very hard for debugging.

Read on →

[updated 2015.09.13] This adding method is only for my project pages (gh-pages) GitBlogs, and for octopress, the way is builded in.

[updated 2015.06.07] For adding category or tag automatically through python script, go to here.


The index page includes cat_tag_for_index.html for showing all the categories and tags, and the number of the corresponding posts.

The _layouts/default.html describes the content of a post, because post includes it. In the _layout/default.html file, it includes the cat_tag.html template as the category and tag info in the beginning of the post. And cat_tag.html also includes the date behind.

_data/categories.yml and _data/tags.yml describe all the categories and tags.

Read on →

[updated 2015.10.30] The followings ways for deploying posts is deprecated. Refer to deploying octopress for details. But if you knows things this post descripbes, you will have better understanding of octopress.

[updated 2015.09.13] Github has two kind of pages: user/orgnization pages and project pages (gh-pages).

Currently, I am using the user/orgnization pages deployed by octopress. This is recommended, due to the easy deployment.

If you are using the project pages (gh-pages), the following references may be help.

How to get started

Refer to “一步步在GitHub上创建博客主页”.

Categories and tags

I tried the this one. It works well.

Jekyll debugging

I didn’t try the debugger yet.