In most instant chat communication, there will be a send location function, in the sending location, everyone has the attention, the Chat interface item shows the real-time map, such as:
How is this implemented?
In fact, this is very simple, the major map providers will have a static map of the API, everyone just call this API to pass in the relevant parameters, it is equivalent to get a picture from the network display, display a network picture, this is easy for everyone?
In the use of the gold map, we now take Baidu map, Baidu map static map API Address: Http://developer.baidu.com/map/index.php?title=static/static-1
Calling interface: http://api.map.baidu.com/staticimage?width=400&height=200center= Beijing &markers= Baidu Building | 116.403874,39.914888&zoom=17&markerstyles=s,a,0xff0000
Where you need to pass in the parameters are center and markers and your current latitude and longitude, open this link can see:
Actually is a network picture, now know how to get this network picture, then the next thing is handled by yourself! Want to know more detailed can enter the Baidu Map official website Research!
Android enables real-time map delivery