Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. public void getCoord(string a, string c, string z){
  2. Http h = new Http();
  3. HttpRequest req = new HttpRequest();
  4.  
  5. a.replaceAll('\s+', '-');
  6. c.replaceAll('\s+', '-');
  7. z.replaceAll('\s+', '-');
  8.  
  9. string param = a + '+' + c + '+' + z;
  10. system.debug('looking for coordinates');
  11. req.setEndpoint('https://maps.googleapis.com/maps/api/geocode/json?address='+ param +'&sensor=false');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement