On May 2, 8:06 am, Edmund Situmorang <[email protected]>
wrote:
> I can't seem to get this code to work...can someone help me figure out what
> is wrong.
Do you have a map (or maps) that show the code snippets below working/
not working?
-- Larry
>
> This is the v3 code:
>
> function placeMarker(member)
> {
> var name = getColumnValue(member, 'c2');
> var address = getColumnValue2(member, 'c1')+',
> '+getColumnValue3(member, 'c1');
> var website = getColumnValue3(member, 'c2')
> var phone = getColumnValue(member, 'c1')
>
> if (!address)
> {
> return;
> }
> var geocoderRequest = {address: address}
> geocoder.geocode(geocoderRequest,function(point)
> {
> if (!point)
> {
> return;
> }
> else
> {
> var marker = new google.maps.Marker({map:
> map,position: point[0].geometry.location});
>
> google.maps.event.addListener(
> marker,
> "click",
> function()
> {
> infowindow.setContent("<div
> style='font-size: 10px; display:block; height: 100px; width: 290px;
> text-align:center;word-wrap: break-word;'><h3>" + name + "<\/h3>" + phone +
> "<br/>" + '<a href="http://' + website + '">' + website + '<\/a>' +
> "<br/>" + "<br/>" + address + "<\/div>");
>
> });
>
> markers.push(marker);
> }
>
> }
> );
>
> }
>
> This was the v2 code:
>
> function placeMarker(member)
> {
> var name = getColumnValue(member, 'c2');
> var address = getColumnValue2(member, 'c1')+',
> '+getColumnValue3(member, 'c1');
> var website = getColumnValue3(member, 'c2')
> var phone = getColumnValue(member, 'c1')
>
> if (!address)
> {
> return;
> }
>
> geocoder.getLatLng(
> address,
> function(point)
> {
> if (!point)
> {
> return;
> }
> else
> {
> var marker = new GMarker(point);
> map.addOverlay(marker);
> GEvent.addListener(
> marker,
> "click",
> function()
> {
> marker.openInfoWindowHtml("<div
> style='font-size: 10px; display:block; height: 100px; width: 290px;
> text-align:center;word-wrap: break-word;'><h3>" + name + "<\/h3>" + phone +
> "<br/>" + '<a href="http://' + website + '">' + website + '<\/a>' +
> "<br/>" + "<br/>" + address + "<\/div>");
>
> if (mapParameters.enableStreetView)
> {
> panoView.setLocationAndPOV (point);
> }
> });
>
> markers.push(marker);
> }
> }
> );
>
> }
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.