Google Places/Maps API - Quick Facts Text? - google-maps

I'm trying to figure out if Google Places (or Maps) API allows me to request the 'Quick Facts' text shown when you search for a city/town on Google Maps. For example, if you search for 'London on Google Maps on desktop, brings back this text in a panel on the left side of the page:
"London, England’s capital, set on the River Thames, is a 21st-century city with history stretching back to Roman times. At its centre stand the imposing Houses of Parliament, the iconic ‘Big Ben’ clock tower and Westminster Abbey, site of British monarch coronations. Across the Thames, the London Eye observation wheel provides panoramic views of the South Bank cultural complex, and the entire city."
I know I can get 'description text' back for actual places using Google Places API but I don't think this is the case for towns and cities themselves. Does anyone know how I can get this 'quick facts' text for cities/towns using an API?

You can use the SaveWidget control to create a custom UI for saving places. When you use the SaveWidget you can specify additional attribution data so that you user remembers where they saved the place from and can easily navigate back to your app.
In order to add a SaveWidget to your app, you will need to do the following:
Add a div to a page that contains a Google Map.
Indicate the place to be saved with a marker, so that your user knows which place they are saving.
Create a SaveWidgetOptions object that includes a place and attribution object literal.
Create a new SaveWidget object, passing the div and the options that you've added.
Follow this link to show the complete code sample: https://developers.google.com/maps/documentation/javascript/examples/save-widget

Related

Search Through Markers with Google Maps API Like in Google's My Maps

I've created a map that has the ability to toggle data (markers) and added a search box, but I want to be able to search through my markers like in Google's My Maps, but everything that I've searched for doesn't have this feature and I've clicked just about every link there is on the first two pages and this is the closest I've found, but I'm trying to find (b) and the answer to (b) in this situation is to find any entrees within a certain radius.
This is the search feature that I'm trying to add: Example of Google's My Maps : If I search pancakes, the top results that I get are places that are on the map in which I've mentioned pancakes (instead of any place that serves pancakes).
Everything that I've done so far has been in html/javascript, so if it is possible, please try and stick to those languages.
I'm using Google's Maps API instead of My Maps because I wanted to do some extra toggling with the data that didn't seem possible with My Maps, eg make lower rated restaurants have lower opacity.
Thanks!

Can I get Google maps to ignore part of a search?

I have a website which shows scheduled upcoming bike rides using Google Calendar. The location field automatically links to Google maps, but some of the information can make the Google maps search fail, and there's no way to turn off the map link.
Example: The upcoming ride has in the location field "Seven Hills Station, North side of the train tracks, 9am sharp". When you click on the map link, it just brings up a map of the US. If you search for "Seven Hills Station", it comes up with the train station in Seven Hills NSW, which is what we want. So if there was an operator that made the Google maps search ignore everything after "Hills" (like the question mark in URLs), I could keep displaying the calendar events in the same format and have working maps linked from it. Does anyone know of an operator that can make Google maps ignore part of a search?
Cheers,
Aston
I think you can use regex to delete everything after the ,
using the replace function, this is how you replace something in JS: str.replace(/,.*/g, "");
http://jsfiddle.net/gvzpe9h9/

Automatic Google Street View Heading

Is there an easy way to get Street View to automatically set the heading like the Street View Image API does?
I have Google Street View images embedded in my application and I would like to put a link on them that will direct the user to the full Google Street View, preferably with the same heading. So far I can link to full Street View with the coordinates but not the heading, since I don't know the heading.
For a certain coordinate, the Street Map Image API will give me an image pointed at the coordinates given. For example:
http://maps.googleapis.com/maps/api/streetview?size=300x150&location=38.9506254,-76.942316
Using the an unofficial resource (http://moz.com/ugc/everything-you-never-wanted-to-know-about-google-maps-parameters) I can create a link to Google Street View, but I must provide a heading angle, which I don't have. Here's an example with the Street View window parameters left off.
http://maps.google.com/maps?q=&layer=c&cbll=38.9506254,-76.942316
This works but does not give me a heading pointing toward the coordinates. Instead, it points due north. I assume I can host my own Street View page and get the heading as a vector from the nearest panorama to the target, as it appears Street View Image API does. I would rather not if I don't have to if I can just embed a single link.
Also, is it safe to use the google map URL parameters? They appear to be undocumented, but I can find references to the parameters I am using back in 2008 so they seem stable.
Edit:
To further elaborate on the difference between full Street View with URL parameters and Street View Image API, here's a diagram of what I get from both without specifying a heading.
Street View Image API will automatically point the POV camera at the target from the nearest Street View panorama when no heading is provided. Full Street View, through URL parameters without heading, will point the POV camera due north. I am looking for a easy way to mimic the Street View Image API behavior with Street View through URL parameters without having to pull panorama location information from google, though that looks like the only option.
If you know the heading that you want you can add a heading parameter in the querystring. Quoting from Google docs:
Heading indicates the compass heading of the camera. Accepted values are from 0 to 360 (both values indicating North, with 90
indicating East, and 180 South). If no heading is specified, a value
will be calculated that directs the camera towards the specified
location, from the point at which the closest photograph was taken.

Using old photos as a basis for streetview google maps

I've recently picked up some old photos of my city, and I was wondering if it is possible to use Google earth/maps to recreate the parts of the city that my photos show.
Most pictures are in street view, so it would be really great to have the old photos as a basis of a street view google map. Some are aireal photos so the "ordinary" map view is also interesting.
Is it possible? What's my first step?
Check out the docs on how to create a custom streetview panorama here:
https://developers.google.com/maps/documentation/javascript/streetview#CustomStreetView
There's also an example of a custom "street view" in the docs, using the reception area of Google's Sydney office here:
https://developers.google.com/maps/documentation/javascript/examples/streetview-custom-simple
That example only uses a single source image:
It looks like the hardest part will be creating either the "stitched" panorama image, or the individual tiles. Unfortunately Google leaves that to the reader, but there is a link to Wikipedia with some panorama tools that may help:
http://en.wikipedia.org/wiki/Comparison_of_photo_stitching_applications_(software)

housing construction on a (google) map

For a new housing project, a complete area will be developed on a blank piece of land. We would like to create a nice interactive chart with all the different sub housing projects. Currently we have a static map available, but want to turn this into an interactive map.
Currently we have found zeemaps.com to add pointers to the map, highlight new building area's and add additional information. One thing is lagging, is the ability to create roads/parks in the map.
Are there any tools out there available where I can 'draw' the new to be developed area into a google-like map.
Another alternative is to create a set of custom map tiles that replace or overlay the standard map tiles for your development area, see
https://developers.google.com/maps/documentation/javascript/maptypes#CustomMapTypes
You might even be able to create custom streetview images to create a virtual drive though of the development and the inside of the buildings, see https://developers.google.com/maps/documentation/javascript/streetview#CustomStreetView
Is Google Map Maker https://www.google.co.uk/mapmaker enabled for your area?
This would allow you to add all the roads, buildings parks in your development.
Note: You would need to check the terms of use to ensure that adding planned but not yet built developments was permitted, but I do see that you can set the construction status of a road to Planned so I assume it is OK.
You can also do similar editing with Open Street map https://www.openstreetmap.org