Json基地局ポジショニングインターフェースは無料で使えます。

20836 ワード

データ提供サイト:http://www.minigps.net
インターフェイスはgoogleの昔のloc jsonと同じです。
Request body
The request body must be formatited as JSON.The follwing fields are supported,and all fields are optional:homeMobileCountryCode:The mobile country code(MCC)for the device's home network.homeMobileNetworkCode:The mobile network code(MNC)for the device's home network.radioType:The mobile radio type.Supported values are  gsm、  cdma、and  wcdma.carrier:The carrier name.cellTowers:An array of cell tower object.See the Cell Tower Object セレクションbelow.wifi_access_points:An array of WiFi access point object.See the WiFi Access Point Objects セレクションbelow.
{
  "homeMobileCountryCode": 310,
  "homeMobileNetworkCode": 410,
  "radioType": "gsm",
  "carrier": "Vodafone",
  "cellTowers": [
    // See the Cell Tower Objects section below.
  ],
  "wifiAccessPoints": [
    // See the WiFi Access Point Objects section below.
  ]
}
Celtower object
The request body's  cellTowers array containsゼロor more cell tower object.All fields are optional.cellId:Unique identifer of the cell.On GSM、this the Cell ID(CID);CDMA networks use the Base Station ID(BID)locationAreaCode:The Location Area Code(LAC)for GSM networks;CDMA networks use Network ID(NID)mobileCountryCode:The cell tower's Mobile Country Code(MCC).mobileNetworkCode:The cell tower's Mobile Network Code.This the MNC for GSM、or the System ID(SID)for CDMA.age:The number of miliseconds since this cell was prmary.If age is 0,the  cellId represents a current meass rement.signalStrength:Radio signal streength meass red in dBm.timingAdvance:The timing advance value.An example cell tower object is below.
{
  "cellId": 42,
  "locationAreaCode": 415,
  "mobileCountryCode": 310,
  "mobileNetworkCode": 410,
  "age": 0,
  "signalStrength": -60,
  "timingAdvance": 5555
}
js    :    http://www.minigps.net/map.html    
var mcc=$("铉mcc").val().replace(/^\s\s*/').replace(/\s\s*/');
 
var mnc=$("铉mnc").val().replace(/^\s\s*/').replace(/\s\s*/');
 
var lac=$("萼lac").val().replace(/^\s\s*/').replace(/\s\s*/');
 
var cell lid=$("铉celled").val().replace(/^\s\s*/').replace(/\s\s*/');
 
 
 
 
 
var celtower 1={
 
セルクレッド:cell lid、
 
locational Uucode:lac、
 
mobileucountry ucode:mcc、
 
mobile network ucode:mnc、
 
メッセージ:0
 
signal strength:-65
 

 
 
 
 
 
var cell ltowers=new Aray(cell ltower 1);
 
 
 
var thing={
 
version:“1.1.0”、
 
host:「maps.google.com」、
 
エクセルパワー:cell ltowers
 

 
var encoded=$toJSON(thing)/'{「plugin」:「jquery-json」、「version」:2.3}
 
 
 
 
 
if(mcc!=460){
 
showMap=2
 
map=map Factory();
 
}else{
 
showMap=1;
 
map=map Factory();
 
)
 
 
 
$ajax({
 
url:「/minigps/map/google/location」、
 
type:「POST」、
 
contentType:「aplication/json;charset=utf-8」
 
dataType:'json'は、
 
data:encoded
 
success:function(レスポンス)
 
{
 
//if(typeof reponse!==string"!reponse){
 
//return null
 
//}
 
//Make sure leading/triling whitepace is removed(IE can't handle it)
 
//レスポンス=evall('+data+');;
 
 
 
//var decodedObject=eval('(+レスポンス.reponse Text+'));
 
//data=''「location」:{「latitude」:51.0、「longitude」:-0.1、「altitude」:30.1、「accuracy」:1200.4、「altitudeucuracy」:10.6、「address」:{streetunumber]:30.1、「100」:「strettttwadededededededededededededededededededededededededededededededededededededededettunumber」:「Amatttttttwaumber」:「straber」:「ststrurul」:「Amaawawawawawawawawattttttunty:「Mountain View County」、「region」:「California」、「country」:「United Sttes of America」、「country code」:「US」、「accessCatoken」:「2:k 7 j 3 G 6 LaL 6 uulafw:4 iXOeOpTh 1 glSXe」;
 
//var decodedObject=$parseJSON(json);
 
//alert;
 
var location=reponse.location;
 
var lat=locations.latitude;
 
var lon=locations.longitude;
 
var address=locations.address.strect.unumber+“”+locations.address.street+“”+locations.address.city+“”+locations.address.com]+“+locations.address.com.com try”;
 
 
 
mapPaneTo(map,lon,lat,address)
 
}
 
error:function{
 
alert('基地局情報が存在しないので、携帯電話から正しい基地局情報を読み取ってください。'
 
)
 
} 
http       :
request URL:http://www.minigps.net/minigps/map/google/location
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:application/json, text/javascript, */*; q=0.01
Accept-Charset:GBK,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:zh-CN,zh;q=0.8
Connection:keep-alive
Content-Length:191
Content-Type:application/json; charset=UTF-8
Cookie:bdshare_firstime=1356366713546; JSESSIONID=68243935CD3355089CF07A3A22AAB372
Host:www.minigps.net
Origin:http://www.minigps.net
Referer:http://www.minigps.net/map.html
User-Agent:Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4
X-Requested-With:XMLHttpRequest
Request Payload
{"version":"1.1.0","host":"maps.google.com","cell_towers":[{"cell_id":"3721","location_area_code":"9779","mobile_country_code":"460","mobile_network_code":"0","age":0,"signal_strength":-65}]}
Response Headersview source
Content-Type:application/json
Date:Sat, 12 Jan 2013 06:03:15 GMT
Server:Apache-Coyote/1.1
Transfer-Encoding:chunked
      lbs     :QQ     : 275114383