I have an app that searches the Google Places API and returns places based on categories that I choose.
The result is a JSON Object that contains a lot of data about each place. I want to share this place via email with other people. I extract the information I want from this object about the specified place by using the following code:
JSONObject geometry = (JSONObject) point.get("geometry");
JSONObject location = (JSONObject) geometry.get("location");
result.setLatitude((Double) location.get("lat"));
result.setLongitude((Double) location.get("lng"));
result.setIcon(point.getString("icon"));
result.setName(point.getString("name"));
result.setVicinity(point.getString("vicinity"));
result.setId(point.getString("place_id"));
return result;
The place_id is the CID of the place, which is unique to the place. I want to share this, or be able to show this place by going to Google Maps and search by this unique CID. I construct the web browser URL as follows:
http://maps.google.com/maps/place?cid=ChIJgzzEJr9_24ARNu3LoImy7k4
This doesn't work though, and the web address gets converted to a lat/long, but no place shows here.
Is there an easy way to find a place on a Google Map using this unique CID? Something like a URL that I can share with others in an email or something? That way if I find a cool place and want to share it, I can just pass the URL with this CID?