抓了不少机器人了
Posts tagged google
Google Map – display:none
May 11th
使用Google Map时遇到一个问题. 我用Tab控件分别放置Google Map和数据, 当我切换到数据Tab后调整窗口的大小, 然后切换回地图的Tab, 这时, 地图会不见.
原来, 把Google Map放到一个DIV里, 当DIV被设置为”display:none”后, 浏览器会告诉Map API这个DIV的尺寸为0, 这时, API就会把地图的尺寸也设置为0.
解决方法有两个:
- 如果你的地图尺寸是确定的, 那么在建立地图的时候就指定上尺寸
- 如果你不确定地图的尺寸, 那么在重新显示地图的时候, 调用一下 map.checkResize() 方法
A new approach to China: an update[Z]
Mar 23rd
因为blogspot被墙, 为了让大家更方便看到, 我转帖了该文:
On January 12, we announced on this blog that Google and more than twenty other U.S. companies had been the victims of a sophisticated cyber attack originating from China, and that during our investigation into these attacks we had uncovered evidence to suggest that the Gmail accounts of dozens of human rights activists connected with China were being routinely accessed by third parties, most likely via phishing scams or malware placed on their computers. We also made clear that these attacks and the surveillance they uncovered—combined with attempts over the last year to further limit free speech on the web in China including the persistent blocking of websites such as Facebook, Twitter, YouTube, Google Docs and Blogger—had led us to conclude that we could no longer continue censoring our results on Google.cn.
So earlier today we stopped censoring our search services—Google Search, Google News, and Google Images—on Google.cn. Users visiting Google.cn are now being redirected to Google.com.hk, where we are offering uncensored search in simplified Chinese, specifically designed for users in mainland China and delivered via our servers in Hong Kong. Users in Hong Kong will continue to receive their existing uncensored, traditional Chinese service, also from Google.com.hk. Due to the increased load on our Hong Kong servers and the complicated nature of these changes, users may see some slowdown in service or find some products temporarily inaccessible as we switch everything over.
Figuring out how to make good on our promise to stop censoring search on Google.cn has been hard. We want as many people in the world as possible to have access to our services, including users in mainland China, yet the Chinese government has been crystal clear throughout our discussions that self-censorship is a non-negotiable legal requirement. We believe this new approach of providing uncensored search in simplified Chinese from Google.com.hk is a sensible solution to the challenges we’ve faced—it’s entirely legal and will meaningfully increase access to information for people in China. We very much hope that the Chinese government respects our decision, though we are well aware that it could at any time block access to our services. We will therefore be carefully monitoring access issues, and have created this new web page, which we will update regularly each day, so that everyone can see which Google services are available in China.
In terms of Google’s wider business operations, we intend to continue R&D work in China and also to maintain a sales presence there, though the size of the sales team will obviously be partially dependent on the ability of mainland Chinese users to access Google.com.hk. Finally, we would like to make clear that all these decisions have been driven and implemented by our executives in the United States, and that none of our employees in China can, or should, be held responsible for them. Despite all the uncertainty and difficulties they have faced since we made our announcement in January, they have continued to focus on serving our Chinese users and customers. We are immensely proud of them.
Posted by David Drummond, SVP, Corporate Development and Chief Legal Officer
在BlackBerry上使用Buzz的变通方案
Feb 17th
Buzz推出一段时间了, 镶嵌在Gmail中使得比较方便, 而且由于Twitter, FriendFeed, Facebook这些服务都被GFW(c一百遍), 所以很多朋友现在都选择了Buzz.
Buzz的Mobile版的功能更多, 比如可以在发Buzz的时候把自己的地理位置附加上, 而且还能看到你周围(地理位置)的人的Buzz. 可这Mobile的功能只能在iPhone和GPhone上使用, 可怜我们BB一族, 连基本的Buzz也用不了.
偶然看到了一个变通的方法号称可以在BB上使用Buzz, 和大家分享一下:
- 用BB的浏览器或Opera访问: https://m.google.com/app/buzz
- 点击”Continue on an unsupported device”
- 点击左上角的”Menu”
- 用Google账号登录
这样一来, 号称是除了地理位置功能之外, 其他功能都可以使用了.
但是, 我在我的8820/OS4.5上只看到一个大黑屏:( 广大莓友试试看行不行吧.
折腾Google Map
Apr 19th
因为在中国, GoogleMap有ditu和map之分, 所以我要折腾!
gmap在中国的地图服务是和mapabc公司合作的, 既然是国内的公司, 走的自然是国内路线, 那么全球的gmap走的自然就不是国内路线. 正因为这点不同, 同时又因为各国使用的地理坐标系不同, 所以导致了gmap在中国和全球的不同. 举一个明显的例子就是你在ditu.google.com看到的一个地方的坐标和google earth上是不一样的.
因为找不到不同坐标系之间的对照关系, 所以不能用算法来进行转换, 只好使用黑盒的方法, 使用偏移值来修正. 在google earth上和ditu.google.com上找到同一个点的经纬度信息, 计算他们之间的差值, 然后利用这个差值再来修正这两者数据的不同. 但要注意的是, 这个误差不是线性的, 所以不能一劳永逸, 你把北京的修正值拿到上海, 修的就不那么正了, 所以, 这个基本上要每个城市都要保存一个修正值…囧
我这里有一个北京的修正值, 需要的可以拿去先用.
ditu – earth:
Lat: 0.001444
Lng: 0.006203
ps. 调试的时候出现了卫星图不可用的情况, 也不知道是被GFW还是服务有问题. 看来如果应用严重依赖地图的话, 使用GoogleMap并不是一个好方法, 最好还是能有自己的地图系统(GIS)
ps2. 顺便鄙视一下sql server, 浮点转字符串默认只有6位, 如果使用8位和16位的style转换, 出来的是科学计数法, 怎么就这么麻烦呢?