Search Through Markers with Google Maps API Like in Google's My Maps - google-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!

Related

Google Maps API for the community photos at the bottom of Google Maps Satellite view?

In the DOM they are reviewed to as runway card view.
I have an web platform idea which would be using these photos.
I think the Google Places API can help here. The content probably won't be same as the runway on google.com/map but you might be able to get some interesting photos for nearby places and build a similar experience.
Using a Nearby Search request you could find a list of places around your map, sending the center point of your map as the location or even a category if you're interesting in something specific. The place results from that call should include some photo_reference's which can be fed into a Place Photos request to get photos for each place.

Adding same google map search to my site

I have a google map with a few markers already on it. When a user clicks a Get Directions button, I'd like a search box with the same functionality as the Google Map's. When users type an address/postcode in it, they get a "directions" button and if clicked on it will calculate and draw the distance between the address you typed in and the closest marker to it. I've had a very good look at the API, especially this page https://developers.google.com/maps/documentation/javascript/places but I couldn't find anything that matches exactly the google search box and its functionalities. Does anybody know if the above is doable?
You can use the Places Search Box as far as implementing something similar to Google Maps. However, from what you've said, rather than Places, you can probably get away with just an input box, unless you actually need Places data. If all you need is to get directions, you'll want to incorporate the Directions API. With the input box as the origin and the nearest marker as the destination, you can then calculate directions.

Google maps with directions on a wordpress page

How can I get a map that simply shows how to get from A to B with a car on my WordPress page?
I used to do this in Google maps directly, I made a map showing the road from A to B and embed it on the page. It used to be so easy. And under the map I had a link to the same map in Google Maps where you also could get written directions. But like a month ago, Google changed their maps and all my maps got messed up. The links as well. Now I am trying to fix this and make new maps.
I have tried in Google maps directly like i used to do, and this is the closest I get to what I am looking for: https://developers.google.com/maps/documentation/embed/start. But I find that very hard to customize, because there are very few options. I have also tried a lot of different plugins, but so far no luck.
Is there a better way to do this?
If you want to customize the map, I can only strongly recommend you the Google Maps API. Here is a good example of how to integrate the directions service into a map and display it on your web page.

making a custom (non-profit) place in google maps and getting the coordinate of it

I was searching the web for the past two days and I wasn't successful in finding what I want.I want to add my own place (for example my home) to the google maps and then get the coordinates of that place in order to place it in my google maps code in my website.
the only way google is showing me to do so is to add a job for my google coordinates account and then add my custom location(and of course I should pay for it).But this is not a job,I just want my place's coordinates to use in my google maps code!
ps:I've even seen people add their own location with full details of their place in the google maps and I'm pretty sure they didn't pay a penny for it(and everyone in the world can see their place!!!)
So here's the question:How can I do this without paying anything?
Go to the google map on web browser and go to the place what you want by zoom and move and at click you would see the coordnates that you may use in google map code.
No need to add you own place.

Search a google map I have created and embedded into my website

I have a Google map I have created to highlight the location of several support groups by adding my own pins using my maps and embedding this into my website.
Is there a Google widget of any description to allows people to search my custom map and find their nearest support group (or nearest pin).
I have read through the Google maps stuff but cant seem to find anything that meets my requirements.
Any help appreciated.
The map has no clue about which markers or overlays you have put on it. Therefore there are no way you can do what you want using Google Maps directly. You can however do something else.
When you create your markers/overlays and place them on the map you can add them to an array. When you users then enters a location you can search through that array to find the markers that are closest to the location the user has entered. Google Maps API has a method for getting the distance between two latlngs, but you can also use an ordinary Haversine formula for calculating it.
Once you have found the closest markers it is not hard making sure they are the only ones that are shown on the map.