Here api 如何获取TimezoneType实例以响应此处的地理编码调用
以前也有人问过类似的问题,但答案总是使用AdminInfo元素的TimeZoneOffset。但是,这只是一个偏移量,如果您想知道实际时区,这是不够的 TimezoneType元素记录在此处: 地理编码API文档()记录了locationattributes参数和时区选项,但这似乎没有效果Here api 如何获取TimezoneType实例以响应此处的地理编码调用,here-api,Here Api,以前也有人问过类似的问题,但答案总是使用AdminInfo元素的TimeZoneOffset。但是,这只是一个偏移量,如果您想知道实际时区,这是不够的 TimezoneType元素记录在此处: 地理编码API文档()记录了locationattributes参数和时区选项,但这似乎没有效果 所以问题是,是否可以使用任何Here API资源获取完整的时区类型实例,如果可以,如何获取?是的,可以获取所有字段的时区类型数据。您必须使用gen=9,而不是在查询中使用gen=8。下面是在响应中提供时区详
所以问题是,是否可以使用任何Here API资源获取完整的时区类型实例,如果可以,如何获取?是的,可以获取所有字段的时区类型数据。您必须使用gen=9,而不是在查询中使用gen=8。下面是在响应中提供时区详细信息的查询示例。希望这有帮助 样本请求:
http://geocoder.api.here.com/6.2/geocode.json?gen=9&jsonattributes=1&language=en-US&locationattributes=timeZone&mapview=-23.4842168%2C-46.5935476%3B-23.4967132%2C-46.573592&maxresults=20&searchtext=2215%20e%202&app_id=xxxx&app_code=xxxx
样本响应:
adminInfo": {
"timeZone": {
"offset": -7200,
"rawOffset": -10800,
"nameShort": "BRT",
"nameLong": "Brasilia Time",
"nameDstShort": "BRST",
"nameDstLong": "Brasilia Summer Time",
"inDaylightTime": true,
"dstSavings": 3600,
"id": "America/Sao_Paulo"
}
}
是的,可以获取所有字段的时区类型数据。您必须使用gen=9,而不是在查询中使用gen=8。下面是在响应中提供时区详细信息的查询示例。希望这有帮助 样本请求:
http://geocoder.api.here.com/6.2/geocode.json?gen=9&jsonattributes=1&language=en-US&locationattributes=timeZone&mapview=-23.4842168%2C-46.5935476%3B-23.4967132%2C-46.573592&maxresults=20&searchtext=2215%20e%202&app_id=xxxx&app_code=xxxx
样本响应:
adminInfo": {
"timeZone": {
"offset": -7200,
"rawOffset": -10800,
"nameShort": "BRT",
"nameLong": "Brasilia Time",
"nameDstShort": "BRST",
"nameDstLong": "Brasilia Summer Time",
"inDaylightTime": true,
"dstSavings": 3600,
"id": "America/Sao_Paulo"
}
}
好的,确认添加gen:9参数后AdminInfo.TimeZone包含详细的时区信息。我没有注意到这个参数-非常感谢您提供的信息!好的,确认添加gen:9参数后AdminInfo.TimeZone包含详细的时区信息。我没有注意到这个参数-非常感谢您提供的信息!