How do I trigger the onclick event of a marker on a Google Maps from outside the map?
I use version 3 of the API. I've seen many tutorials for version 2, but can't find this for version 3.
I have a global array (named markers) containing all the marker of the map (google.maps.Marker). Now I want do do something like:
markers[i].click(...
Hey guys. I need to know if what I need is achievable.
I need to be able to, using either V2 OR V3 (preferably 3), create paths which ignore buildings in a sense.
I was trying to create even a kml file to draw out all of the paths myself, and then find some way to turn them on/off as needed.
For example. The user wants to go from poi...
Hey guys.
I've been building a small library for myself for a job I have at the moment building a map for a university.
I've gotten pretty well everything I need in some basic form, but one thing has simply not been working, and is simply not giving me results.
The university itself is sort of in a partnership with the neighboring c...
I'm working on an idea for a service that uses geocoded data (lat/lng) form a US address. Google maps API v3 has been awesome, until I read the terms of service and acceptable uses a little closer. The problem is that the terms seem to prohibit use of the maps API for any commercial use where the site is not freely accessibly to the publ...
hi,
i was using v2 of google maps. Now i shifted to v3.
In version 2, this WAS working
GEvent.addListener(map, "click", function(overlay, latlng) {
myLatitude = latlng.lat();
myLongitude = latlng.lng();
alert(myLatitude + ' data ' + myLongitude);
});
what should be the equvalant of this code ...
Sometimes when I remove markers they stay around in a "ghost" fashion -- they are clickable but there's no more icon. This is not every time and usually only happens when I remove more than one at a time.
Here's my code for removing markers:
for(var i in markers) {
google.maps.event.clearListeners(markers[i], "click");
...
See my test page.
When on the page, click the top left button "Geocode". If you are in Firefox, geocoder.geocode() will have it's status equal to ERROR (and pop an alert after a few seconds). In Internet Explorer (at least 7), everything is fine and the marker is added to the map.
If you remove the quote from the address (l'Assomption ...
In the older version of the API, I'd have to insert the javascript into the page using something like this for just basic functionality to work:
http://maps.google.com/maps?file=api&v=2&key=GoogleMapsAPIKey
Where I had to configure the API key for each individual site. Looking at the documentation, it says to get a basic ma...
When overlay is a Google maps overlay and offsetx, offsety is the pixel distance from the maps center that I want to pan latlong to, the following works.
var projection = overlay.getProjection();
var pxlocation = projection.fromLatLngToContainerPixel(latlong);
map.panTo(projection.fromContainerPixelToLatLng(new google.maps.Point(pxlocat...
look at this url
there is the "floating image", the one with arrow that when clicked centers the map on a certain location. I have been desperately trying to find out the way to do that, and I have coded my google maps app with just that one thing missing. any ideas?
EDIT:
try navigating away from the center of the map (which would be ...
I have a map with two markers on it.
The initial view of the map only shows one marker, and I want to provide a link next to the map that will move the map to the 2nd marker when clicked.
Here's a demo of what I want, using v2 of the API: http://arts.brighton.ac.uk/contact-university-of-brighton-faculty-of-arts (note the links below t...
Does anyone know if its possible to get the Static Maps (image maps) for the API V3?
...
I've been working for a few weeks now with the Google Maps API v3, and have done a good bit of development for the map I've been creating.
Some of the things I've done have had to be done to add usability where there previously was not any, at least not that I could find online. Essentially, I made a list of what had to be done, sear...
I have an arrow image that I would like to put on a v3 Google Map and have it point to a specific direction (using bearing from a particular Lat/Long point). Is this possible?
Thanks.
...
I use the following code to set markers on my map:
var latLngs = []
$.each(locations.markers, function(i, m){
var myLatLng = new google.maps.LatLng(m.latitude, m.longitude);
latLngs[i] = myLatLng
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
shadow:...
I would like to display a map with a single marker using a nice and simple modal dialog. Are there any easy to use solutions for this? Ideally a jquery modal dialog with support for google maps or a way to easily get an iframe code for a google map given latitude and longitute only
...
I'm in the end stages before content filling and then production on the Google Maps project I've been working on. A number of bugs and such have been thwarted, but this latest one has me relatively stumped.
The demo map can be viewed here: http://dougglover.com/samples/finalProduct/
Everything works fine until you create a path using ...
Hi All,
I'm switching from v2 to v3 google maps api and got a problem with gMap.getBounds() function.
I need to get the bounds of my map after its initialization.
Here is my javascript code:
var gMap;
$(document).ready(
function() {
var latlng = new google.maps.LatLng(55.755327, 37.622166);
var myOptions = {
...
I've run into a small problem with the semi-new KML Overlay functionality with Google Maps API v3, wherein while I am able to use "suppressInfoWindows: true;", the cursor still appears as though the overlay(s) are clickable.
Is there a way at this time to change the css on the overlay(s) so that the cursor is the default cursor, so that...
Ok, I'll admit I'm nowhere near the best programmer on the planet -
and I'm used to the answer staring me right in the face but not making
sense of it.
Problem
I need to display multiple markers on a map, each with their own
infowindow. I have created the individual markers without a problem,
but don't know how to create the infowindow...