How to change Google Maps coordinates while clicking external link - javascript

I normally don't work 'outside of the box' when working with the Google Maps API so I'm a bit of a novice and that's why I'm asking here. But for the project I'm working on now we're trying create a Store Locator that changes the google maps coordinates when an user clicks on a store name, which is a link just under our map div.
I was hoping if you people could help me out here because I couldn't find any answers by using Google.
Thanks!

Related

MapBox Search Event

I am utilizing MapBox GL JS to display Pins. I am able to display pins on a Mapbox map, no issues with that. I am looking to add some custom javascript code based upon the users "searched" location using the MapBox Search input box they provide.
I have researched all of Mapbox documentation and have not found anywhere where I would be able to implement some custom javascript code based on when a user searches.
Has anyone else come across this before?
Thank you for your time.

Cant add a marker to Google Map on tap-ionic 2

I am having trouble finding a way to add a marker to google maps in my Ionic 2 application. I basically want to add a marker to google maps which is set to the center of the map by default when a user opens the application like Uber. Also if a user chooses to drag the map and look around, it sets the coordinates to the users current position just like Uber. I have tried researching on this but I didn't find any tutorial or documentation on how to to do it. I am using ionic 2 for my application with Angular2. Any help would be appreciated. Thanks a lot!

Open a Google Maps link with multiple markers

We'd like to open a list of locations in a Google Map link. I've explored many possibilities, but I can't find how to do this.
The map I built using the JavaScript API doesn't show a link to Google Maps with markers on it. I hoped for a "View Larger Map" link like in the Embed API, but none of the variables seemed to add that. I tried the Embed API, but it doesn't take multiple markers.
We need to generate the list dynamically, so MyMaps doesn't work.
The Static Maps API isn't really a Google Map, in that you can't do anything with it.
I tried sending a KML file like this:
http://maps.google.com/maps?q=http://example.com/j.kml
but it looks like Google has discontinued that.
The most promising thing has been the Directions API, but we don't want directions, just a bunch of markers. The URL structure that is showing multiple points is:
https://www.google.com/maps/dir/Mi+Mero+Mole,+5026+Southeast+Division+Street,+Portland,+OR+97206/3+Doors+Down+Cafe,+Southeast+37th+Avenue,+Portland,+OR/Bunk+Downtown,+211+Southwest+6th+Avenue,+Portland,+OR+97204/#45.5135928,-122.661738,14z/
But I tried removing /dir/ to get rid of the directions and Google didn't like that. Has anyone had any luck with this?
My research on the same issue, shows that the directions URL -you have posted- is the most relevant solution at this point.
The only think I could possibly propose as an enhancement, is to leave the starting point blank so the user will be prompted to enter an address as a starting point or automatically enable geolocation by appending the Current+Location wording to the url next to /dir/:
Enable Geolocation
https://www.google.com/maps/dir/Current+Location/Mi+Mero+Mole,+5026+Southeast+Division+Street,+Portland,+OR+97206/3+Doors+Down+Cafe,+Southeast+37th+Avenue,+Portland,+OR/Bunk+Downtown,+211+Southwest+6th+Avenue,+Portland,+OR+97204/#45.5135928,-122.661738,14z/
Leave Starting Point Empty
https://www.google.com/maps/dir//Mi+Mero+Mole,+5026+Southeast+Division+Street,+Portland,+OR+97206/3+Doors+Down+Cafe,+Southeast+37th+Avenue,+Portland,+OR/Bunk+Downtown,+211+Southwest+6th+Avenue,+Portland,+OR+97204/#45.5135928,-122.661738,14z/

Adding image with text on google maps for web

I've been lately trying to figure out a way to have text and image on google maps for web.
For example, I have 2 friends, I want them to be displayed on the map; their image with their name.
So far all that I found was using JavaScript libraries that can only insert labels on the map.
Is it possible to do what I'm thinking or not? What's the name of the library if it exists?
I would say yes, it is possible as long as you can get the long/lat coordinates of your friends.
Once you have that you can add labels onto google maps api.

How to add address to a google map on web page?

I am creating a web app. One of the page is designed to show google map of an address traced from database. So after I get langitude and latitude using gencode, I know how to draw the google map, but how do I show an address tag on that map? Any help is appreciated.
You are probably talking about a Marker concept.
Take a look at this article
A couple of other SO folks asked similar questions. These might be helpful:
Draggable markers
While this may be OT, if you ever decide to remove a marker, also look at this question
There is also detailed Marker docs available at the usual API docs site

Categories