This is now an actual repo:
| pixelToPoint = function(point, zoom, center, bounds) { | |
| // 像素到坐标 | |
| if (!point) { | |
| return | |
| } | |
| var zoomUnits = getZoomUnits(zoom); | |
| var mercatorLng = center.lng + zoomUnits * (point.x - bounds.width / 2); | |
| var mercatorLat = center.lat - zoomUnits * (point.y - bounds.height / 2); | |
| var mercatorLngLat = {lng: mercatorLng, lat: mercatorLat}; | |
| return mercatorToLngLat(mercatorLngLat) |
| <?php die('This file is not really here!'); | |
| /** | |
| * ------------- DO NOT UPLOAD THIS FILE TO LIVE SERVER --------------------- | |
| * | |
| * Implements code completion for CodeIgniter in phpStorm | |
| * phpStorm indexes all class constructs, so if this file is in the project it will be loaded. | |
| * ------------------------------------------------------------------- | |
| * Drop the following file into a CI project in phpStorm | |
| * You can put it in the project root and phpStorm will load it. |
#Four Ways To Do Pub/Sub With jQuery and jQuery UI (in the future)
Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.
(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)
##Option 1: Using jQuery 1.7's $.Callbacks() feature:
| // | |
| // _oo0oo_ | |
| // o8888888o | |
| // 88" . "88 | |
| // (| -_- |) | |
| // 0\ = /0 | |
| // ___/`---'\___ | |
| // .' \\| |// '. | |
| // / \\||| : |||// \ | |
| // / _||||| -:- |||||- \ |