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

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.

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!

Google maps embed API fallback coordinates

I have a website that contains a database of places, mostly stores and small businesses, and i want to add a google map for every business on the site. I have a name and coordinates for each business, but not all of them are listed on google maps. If i make a Google Maps Embed API map like this:
https://www.google.com/maps/embed/v1/place?key=APIKEY&q=Place name
I will get a marker on that place, but if that place is not found, is it possible to make it put a marker on the coordinates provided?
I know i can just use the coordinates without any name, but in case the place is listed on google maps, querying its name instead of coordinates will display details about the place
Yes you can still place a marker as long as you have the lat and long.
You can add your business to Google Map over here.

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.

Placing existing Google Map V3 into a form to change address

I'm building an application where user-submitted posts are placed via their location as markers on a Google Map. The users are currently able to view the markers/posts on a map in relation to their current location.
What I'm aiming to do is allow the user to change the location of the map so that users can see the markers/posts in relation to another address, specifically via a form that allows them to enter an address and change the location of the map.
I found a YouTube video illustrating a pretty close approximation of what I'm aiming to do, but it unfortunately provides no code or instructions (http://www.youtube.com/watch?v=4uyIawlsvzU).
Is there a way to efficiently wrap an existing Google Map and the existing markers into a form such as this? I've searched for a solution but can't seem to find the proper way to achieve this. Many thanks for any feedback.
You need to search for LatLng by user specified address and to display it. I see not problems at all :)
Study Google Geocoding API for this (seems best solution for your case) and this example

How to add a zip code search box to my Google Map that will only search my markers

I have created a map using the Google Maps API v3.
I have created a Fusion Table with a hundred locations (markers) or so and have that successfully pulling into my map.
Now I need to add a search box to this page that will allow the user to enter their zip code and have the map zoom in to that area, then only seeing the locations in that zip code or the nearest locations to that zip code. I would also like the location data to pull into a sidebar as seen with the now deprecated Local Search API.
I have read most (if not all) of the posts that seemed to be about this, but to no luck. I feel like this shouldn't be that difficult really, I mean Google does search primarily right? Yet adding a search bar to my custom map is such a difficult task.
Any help would be appreciated, I have a deadline of tomorrow. Thanks everyone, I love it here.
Ryan
You will need to geocode the zip code and use the results to center the map, then show the markers that fit the bounds of the map if they are not already shown.
See http://code.google.com/apis/maps/documentation/javascript/geocoding.html
There is an example with a search box.