How can I make custom Google Maps markers with a custom dialog message - google-maps

I need to create iframe Google Maps that I can embed on a site with a custom marker that would be the companies logo.
Once the marker is clicked, it should show a dialog with custom information instead of Google's default information with an address etc. I would like to modify it so it shows some information about the business. Just like the one that can be seen here: http://ekogaze.lv/kontakti.html
Thank you.

Creating custom marker can be found here.
Adding custom information can be done by updating values in the marker div.

Related

Showing information on Google Maps API

I'm fairly new to working with Google Maps API. When embedding a map you get the place and a white box in the top right hand corner with a little information on the place. However I want to use the JavaScript API and want to know is there anyway to replicate this with the JavaScript API and not the iframe embed.
Thanks.
Basically to display the information you would need to use the infoWindow, yes. You can attach an infoWindow to either a marker or directly to map co-ordinates. In depth documentation about infoWindow and detailed references can be found here.

Get Google Map's Marker Content

When I am adding a Google Map marker using this tutorial, I am able to add my own content into the body of the marker. Instead of adding my own content, I want to use the content that Google has stored about my business. I am wondering how would I be able to do this?
As far as I know, there is no way to have Google populate the marker for you. On my site I use the Google Places API to display info on the tooltip when a marker is clicked.
You can query the places API to using the Google reference number. Here's a direct link to the Google PlaceDetailsRequest section. Scroll down and you will see the PlaceResult object which gives you all the data Google has about that particular place.
If you just want to display the information for your business, you are better off statically putting the content into the marker. Otherwise, if the data needs to be dynamic you need to pull it from somewhere yourself and Google Places is good if you don't have your own data.

Centering InfoWindow Google Map IFrame

Is there a way to center the pop up window (info window) on a google map iFrame to make sure that it does not get cut off?
WOuld it be easier for me to use the Google Map API instead of iFrame? If so, is there an API call that would give me the same information by default on a the infoWIndow?
Note: I have tried using Google Map API and I prefer this over using iFrame. The only downside is that I do not get the extra information that comes with using google map iFrame. It looks like I need to populate this window with HTML by myself.
Btw here's a good example of how to create a custom InfoWindow.
https://developers.google.com/maps/documentation/javascript/overlays#InfoWindows
You can use any html such as custom headers, divs and links
And here's the Placed API with Google Maps:
https://developers.google.com/maps/documentation/javascript/places

Google Maps v3 custom map marker icon but with infowindow content from google

I've been wondering about this for some time:
Is it possible to let a custom marker for a place on a google map display an infowindow with the same information that the infowindows on maps.google.com display when clicking on a place, without having to generate the HTML for the content yourself (using the places library)? I hope you know what I mean. Please let me know if I'm being unclear.
It would be great if one could pull the information straight from google instead of having to do it manually. I mean, why do something that's already there, right? ;)
Thanks for sharing your thoughts!
edit: I've tried rephrasing my question to make it clearer. I've removed the example code because it was just adding to the confusion. Sorry, English isn't my first language ...
There is currently no API call from Google that will provide the default InfoWindow content for a Lat/Long location.
The only thing google currently provides is some Reverse Geocoding Infomation.

Google map marker disappears from map inserted via iframe

I have found location on google map and get custom iframe code with marked location. However marker always disappears from map after several days.
Here is our website about page: http://witcraft.ru/about. Location of our office was marked, but now the marker has disappeared.
Also we have same issue on other websites. How can I avoid this behavior?
Regards,
Alexey Zakharov.
Looks like the only way to ensure that marker won't disappear is to use company website name during the query.
So if you want to mark your company that has your-company.com domain you should search it on google maps and when grab embeded code. Keep in mind that your-comapany.com domain should be mentioned in company description that you send to Google Places service.