Facebook Comments Stream in Google Maps Infowindow - google-maps

I’m currently working on a Google Maps project showing places of interest in my local town. My plan was to use multiple markers on the map to identify different places which when clicked on would open an InfoWindow listing more details about the place.... I also thought it would be good to allow visitors to leave comments and experiences using the Facebook Comments Plugin within the InfoWindow.
However, on further research and reading a couple of other peoples efforts into trying to get Facebook Comments into InfoWindows it doesn’t seem possible... the closet I’ve seen is a chap who managed to get the SAME comments stream appearing in every InfoWindow no matter which marker / point on map was selected.... which isn’t what I want! His conclusion was to build your own comments stream in PHP.
Here's the link to the above article which has a link to the map at work;
https://groups.google.com/forum/#!msg/google-maps-js-api-v3/4wvBdVxPHJ0/vxuYP93N-lgJ
I’m pretty new to Facebook development but certainly don’t mind climbing the learning curve to achieve what I want, but thought it wise to check with the experts here at stackoverflow in case what I am trying to achieve is a non-starter!
Any suggestions, advice and pointers would be gratefully received.

I recently managed to do it.
The trick is to
insert the content of your infowindow on the end of the page in a hidden div.
parse this div with FB.XFBML.parse
get the innerHTML of your div
call infowindow.setContent() with the innerHTML you got before
If you want different comments in every infowindow you must have a different url for every infowindow's comment plugin: like http://localhost?infowindow=content1 and http://localhost?infowindow=content2 for another.
Hope that helped!

Related

Remove Google Map Marker Text

I have a client who has embedded Google Maps showing the location of a new hospital they are building. Until recently it just showed the pin marker, however now it is showing the longitude and latitude next to the pin. I have tried everything to remove this text but none of the options in the query string appear to do anything.
I think Google has updated the embed code but I can't find any documentation about it though. Does anyone have any suggestions?
Thanks
John
From the research I did, it seems like the new Google maps is pretty rigid and there isn't really a simple way. I think it would require some more complex API stuff.
This is the post that I found that described the limitations Removing the info window from an embedded map in the new Google Maps
Sorry I realize that doesn't really help.

Google Maps Functionality

I want to create an embedded Google Maps on my non profit website. I've asked around to a few "professional" developers, and they all want thousands of dollars... in case you missed it, this is a non profit.
What I want to do is embed a Google Map on my website that will:
Allow anonymous users to type in an intersection, (ie: Woodward and Fort), grab the map, pan and zoom.
Allow users to anonymously add markers to the map. These markers will be pre-set, one for "suspected drug activity," another for "illegal dumping," "dangerous structure," etc...
Allow users to anonymously comment on those markers and have that activity take place in an "Info Box" on that marker. The comments should be saved in the info box for other anonymous users to see. It'd be nice if there were some way I, as an admin, could have those comments appear in a custom admin window so they can be easily printed out and taken to the police.
Allow only the site administrator to delete markers.
The anonymous users should not be able to move or delete a marker once its placed. Whatever happens on the map should pretty much stay there for anyone to see until it gets deleted by an admin.
Long story short, I live in Detroit, MI and have my entire life. I've traveled the world, but home is home and I love it. I see young people like myself being passionate about the city but most of us don't know how to engage and even though we're outraged by whats going on in our neighborhoods, we're complicitly silent on the problems. I want to create this site so people can keep a public record of the problems in the neighborhoods so the police can do something about it. A second map would share positive news on the city to show that its not all doom and gloom and there are things that are beautiful, fun, safe, and worth-while here.
If you don't mind pitching in some time to help, I'd appreciate it very much. But if you've got an idea on how to code it, I can try to do it myself.
Thanks for reading, and thanks for your input.
Thanks everyone for your support. In response to Duncan here is my specific question:
How can I embed a map on my site but still have a place for visitors to type in an intersection and be taken there while still on my site?
Thanks!
Google provides a pretty basic tutorial for implementing google maps here: https://developers.google.com/maps/documentation/javascript/tutorial

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

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.

Externalising Google Maps InfoWindow Content When Marker Is Selected

I'm wondering if anyone knows whether it is possible to take the content of a Google Maps InfoWindow and place it in an external DIV when the marker on the map is clicked?
I've had a good dig around both the API docs and Google to see if I can find any examples or information relating to this but have had no luck so far. However I've not had a lot of time since I got asked about this one so I have had to skim a bit so it could be that I've missed something but nothing seems to be jumping out at me.
Essentially I'd just like to know if this is indeed possible so that I don't waste anymore time researching something that is currently not possible with Google Maps. However if anyone has any code, examples, or ideas about how to go about doing this then that would be a very much appreciated!
Thanks,
Mark
It's definitely possible. Just add each marker to an array, along with whatever data you want to display. Add a listener to each marker which will access that data when the marker is clicked.
See these questions:
How do I link Google Maps Markers to other elements
How do I highlight markers on hover in Google Maps for a sortable table