forked from Maome/ingress-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGoogleMapsWrapper.java.dnc
27 lines (17 loc) · 1 KB
/
GoogleMapsWrapper.java.dnc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
public class GoogleMapsWrapper{
public static final String baseURL = "http://maps.google.com/maps/api/staticmap?";
//public GoogleMapsWrapper(){}
public static String BuildStaticRequest(S2LatLng location, ArrayList<S2LatLng> portals);//, ArrayList<S2LatLng> waypoints){
ArrayList<String> request = ArrayList<String>();
for(int i = 0; i<portals.size() ; i++){
String newRequest = "marker=color:blue|labels:P|" + S2Wrapper.getLocationString(portals.get(i)) + "&";
request.add(newRequest);
}
request.add("center=" + S2Wrapper.getLocationString(location) + "&");
request.add("marker=color:red|labels:U|" + S2Wrapper.getLocationString(location) + "&");
request.add("zoom=15&size=512x512&maptype=roadmap&sensor=true&");
String returnRequest = baseURL;
for(int i = 0; i<request.size(); i++)
returnRequest += request.get(i);
return returnRequest;
}