i tried to use the multi tag function in the google maps api, but i messed it up .. it show's all "locations" but, when i click on any, it always show's the info on and from the last "location" in the Array..
anyone know's where i messed it up ?.. i cant find it -
<!DOCTYPE html>
-
<html>
-
<head>
-
<script src="http://maps.googleapis.com/maps/api/js">
-
</script>
-
-
<script>
-
var locations = [
-
["<a href='http://www.rome.de'>Rome</a>", 50.002485, 8.554255, 4],
-
["<a href='http://www.athen.de'>Athen</a>", 50.002485, 8.554255, 5],
-
['Autohaus Gotta', 49.998909, 8.588143, 3],
-
['Friedhof', 50.007880, 8.572271, 2],
-
['Gundbach', 50.002485, 8.554255, 1]
-
];
-
var mapPosition = new google.maps.LatLng(49.990594, 8.573357);
-
// var myCenter=new google.maps.LatLng(50.009088, 8.578590);
-
// var myCenter=new google.maps.LatLng(locations[0][1], locations[0][2]);
-
var marker, i;
-
function initialize() {
-
var mapProp = {
-
center: mapPosition, // Die Koordinaten von Walldorf
-
zoom:13, // das Zoomlevel der Karte
-
mapTypeId:google.maps.MapTypeId.HYBRID, // GoogleMap Kartenart definieren (ROADMAP, HYBRID)
-
disableDefaultUI: true // deaktivieren die ControlPanels
-
};
-
var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
-
for (i = 0; i < locations.length; i++) {
-
var marker=new google.maps.Marker({
-
position:new google.maps.LatLng(locations[i][1], locations[i][2]),map: map,
-
clickable: true,
-
url: locations[i][0]
-
});
-
marker.setMap(map);
-
var infowindow = new google.maps.InfoWindow({
-
content:locations[i][0]});
-
google.maps.event.addListener(marker, 'click', function() {
-
infowindow.open(map,marker);})
-
};
-
}
-
google.maps.event.addDomListener(window, 'load', initialize);
-
</script>
-
</head>
-
-
<body>
-
<div id="googleMap" style="width:500px;height:380px;"></div>
-
</body>
-
-
</html>
-
0 6358 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Sean |
last post by:
Have you ever wanted to add the great features inherent in Google Maps?
Here is how you do it.
==============
== STEP ONE ==
==============
Create a new MS Access form called frmGoogleMap....
|
by: Sam Carleton |
last post by:
Ok, over the years I have read about doing web programing and I have
done some real basic stuff. Now I am digging into some real ASP.Net
2.0 and am totally lost some things.
I have a master...
|
by: xml .NET group |
last post by:
Is there any book on using ASP.NET for Google Maps. For example, following
books:
http://www.amazon.com/Beginning-Google-Maps-Applications-Ajax/dp/1590597079/
...
|
by: Phil Stanton |
last post by:
I have a button on a form which when pressed displays a google map of the
address.
Code is
Private Sub Googlemap_Click()
MakeURL ("")
End Sub
|
by: H.Schmidt |
last post by:
Hi!
im would like to get address informations like city, state or zip for a
given GPoint. Is it possible (i found nothing in Google maps Api)?
Thanks in advance
|
by: mfaisalwarraich |
last post by:
Hi everyone,
I am trying to add multiple pinpoint to google map using Lon/Lat. All addresses will be fetched from mysql database using PHP.
I have looked at google and searched for it on...
|
by: George Thompson |
last post by:
i have a google maps api on my website, where when you click it grabs the lat/long coordinates and works well for me, but i would for a visual reference like to see a marker added to the place where...
|
by: Yousef Altaf |
last post by:
Hi all I am working on google map api-3 and I have two interface one is inserting data to my database and second getting the data on my site from my database now everything is working fine I insert...
|
by: thoschu96 |
last post by:
i tried to use the multi tag function in the google maps api, but i messed it up .. it show's all "locations" but, when i click on any, it always show's the info on and from the last "location" in...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM).
In this month's session, the creator of the excellent VBE...
|
by: Aftab Ahmad |
last post by:
Hello Experts!
I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
|
by: Aftab Ahmad |
last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below.
Dim IE As Object
Set IE =...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
| |