Get my current location using geolocation in dropdown menu - google-maps-api-3

i have this Google map that display directions from point A to point B
i want to use my current location instead of start point a which is Chicago in the code
the code so the code in this link
https://developers.google.com/maps/documentation/javascript/examples/directions-panel

Related

Location filter not working in WP Google Maps Pro

I have set up a location finder on my map, however the search filter does not appear to be working. For example, when I type in the name of a town or city i.e London in the search bar and filter it to display locations within a 20 mile radius, it should display these below the map.
Instead it still continues to display all location set up on my map.
Just to follow on from this, if I check the box next to 'Display Categories/Locations Tab' the filter does then work, but the down side to this is it of course displays a 'locations' tab on the map, which I do not want.
Any help would be greatly appreciated.
Thanks

Problems passing off parameters to display multiple embedded OpenSourceMap in separate FancyBox overlays in Wordpress

I'm working on a project in Wordpress that requires me to tag photo posts on an overlay map. I'm using the Advanced Custom Fields plugin in Wordpress to pass off latitude, longitude, and location name fields and inserting them into a link that says the Location name and links to a FancyBox overlay that displays the embedded version of OpenStreetMap with lat/lon coordinates passed off as variables in the link URL. My code looks something like this:
This picture was taken at <a class="fancybox-iframe"
href="http://www.openstreetmap.org/export/embed.html?
bbox=-77.44244992733002%2C37.536657186828165%2C-
77.43791699409485%2C37.53942209826503&layer=mapnik&marker=<?php the_field('lat'); ?
>%2C<?php the_field('lon'); ?>"><?php the_field('location_name'); ?></a>
The problem lies in the "bbox" parameter. It look as if it pulled this from the original embed code I pulled from OSM. If I remove it, it zooms all the way out on the map, displaying the entire world. I need it to use the marker as a center and set the "bbox" variable and zoom accordingly.
I've found a few other solutions on here, but they only work for a one-off approach, as you have to manually enter the coordinates within the script. I'm going to be listing a bunch of these on the front page of the site, so that approach won't work.
Any help solving this problem or finding an alternative would be greatly appreciated.

customize google store locator

i am using google store locator (http://storelocator.googlecode.com/git/examples/custom.html) for display sport events.
Now I want to customize the messages from google.
I would like to hide the message "There are no stores in this area. However, stores closest to you are listed below." if there is no event in the zoomed area. And I want to put a link over the hole line in the panel to redirect to a specific url.
Are there any options to customize store locator to my wishes?
thx
The source is available. Download it and change it to do what you want. Those messages are defined in this file.

users drop marker and get link that will open the map there

I'd like my users to be able to drop a marker on my map and be able to get a url link which will go to my website and open the map and show the marker.
So I think I need 3 things really
How to enable users to drop a marker
Get its link as a URL
Enable the link to open the site's map and show the marker.
Are there any examples out there that will be of help?
Here's two that are relevant:
Random marker placement along with sidebar creation and hyperlink
Draggable markers with geolocation

embed google maps with search and locator functionality in drupal 7..?

I Want to to create a page in my drupal 7 site with a google map on it, which shows hospitals, clinics and pharmacies near the user.
I tried, location module and openLayerslocator. But I couldn't figure how to achieve it using these modules. Initially I came to know that, I can use to openLayers locator, but there is no documentation or guide that's available to achieve it.
But as far as I understand, both modules work in a similar way but NOT as I want it to. In both module, I will have a content type called 'Location' and it will as for address,zip code etc while creating the content with that type. Then there will be a view, which takes these address from those 'Location' noddes and displays those addresses on a google map..! But THAT'S NOT WHAT I WANT.
I do not want user to create any content or anything, the map sits there as a page where user visits it, to see what are the hospitals etc are there around him. When user navigates to that page, he will just enter his city, address or zipcode (like in a form and hits find) to see what are the hospitals around him (let's say around a distance of 50km). By default, when he navigates to the page, the map should be showing those places like hospitals and clinics around his default address (It will be available from the database.).
So how can I achieve it...??
Thanks in advance.

Resources