---
title: "GPS定位"
author: "AndLi"
date: "2011-11-22T10:11:44Z"
tags: []
categories: ["移动开发"]
slug: "gps"
draft: false
lastmod: "2011-11-22T10:11:44Z"
id: 1271548
url: "https://andli.iteye.com/blog/1271548"
---

```
// GPS,定位到某个点
		{
			// 边际物理坐标：( 120.46245999981475) , (36.101044000086 )
			// 中心物理坐标：( 120.45992200009175) , (36.095697000196125 )
			// 测试物理坐标：( 120.46158699979) , (36.09769800014725 )

			loc_x = 120.46158699979;
			loc_y = 36.09769800014725;

			// 0.02 小 0.002 大 0.011 适中
			m_myMapWnd.ZoomTo(loc_x, loc_y, 0.002);
			m_myMapWnd.reDraw();
			m_myMapWnd.repaint(0, 0);

			Toast.makeText(this, "GPS", 6000).show();
		}
```