OK sorry. I get busy at work sometimes and use forums that do offer
code suggestions. maybe this isnt one of them. I didn t mean to dump
off my code or ask you to write a bunch lines. but to just glance at
it and see where i may have a syntax error that needs corrected. my
problem in action wont help. the problem I am having is its not using
custom images. Only the Google standard red markers.

as you can see in my code I have a custom tiny marker blue icon
declared as a variable.My guess is to replace this map.addOverlay
(marker); with map.addOverlay(objectmarkerOptions); and this would use
the blue icon hence will allow me to use my own image in my web
directory by replacing the image address but this doesnt work. I still
get the little red balloon markers and not the blue google balloon.

here is the link to my map: http://www.reaganpower.com/map.aspx

     var map;
         var geocoder;

         function initialize() {
             map = new GMap2(document.getElementById("map_canvas"));
             map.setCenter(new GLatLng(28.536274512989912,
-88.2861328125), 5);

             geocoder = new GClientGeocoder();
             map.addControl(new GSmallMapControl());
             map.addControl(new GMapTypeControl());

         }

         // Create our "tiny" marker icon
         var blueIcon = new GIcon(G_DEFAULT_ICON);
         blueIcon.image = "http://www.google.com/intl/en_us/mapfiles/
ms/micons/blue-dot.png";

         // Set up our GMarkerOptions
         objectmarkerOptions = { icon: blueIcon };

          // addAddressToMap() is called when the geocoder returns an
         // answer.  It adds a marker to the map with an open info
window
         // showing the nicely formatted version of the address and
the country code.
         function addAddressToMap(response) {
             map.clearOverlays();
             if (!response || response.Status.code != 200) {
                 alert("Sorry, we were unable to geocode that
address");
             } else {
                 place = response.Placemark[0];
                 point = new GLatLng(place.Point.coordinates[1],
                            place.Point.coordinates[0]);
                 marker = new GMarker(point);
                 map.addOverlay(marker);
                 marker.openInfoWindowHtml(place.address + '<br>' +
          '<b>Country code:</b> ' +
place.AddressDetails.Country.CountryNameCode);
             }
         }

         // showLocation() is called when you click on the Search
button
         // in the form.  It geocodes the address entered into the
form
         // and adds a marker to the map at that location.
         function showLocation() {
             var address = document.forms[0].q.value;
             geocoder.getLocations(address, addAddressToMap);
         }


         // findLocation() is used to enter the sample addresses into
the form.
         function findLocation(address) {
             document.forms[0].q.value = address;
             showLocation();

On Sep 4, 9:25 am, Rossko <[email protected]> wrote:
> > Thanks but I knew that already. I couldnt get it to work. here is
> > mycode where can you suggest I put the marker code for my own image.
>
> Why don't you have a best guess, and if it doesn't work ask for help
> with it.
> Post a link to your problem in action, not a code dump (posting code
> dumps puts off many potential helpers).
> Asking "please write my code for me" rarely works unless there is an
> incentive (cash).
> Asking for "help, I've tried this and  can't see where I went wrong"
> is much more likely to get help.
>
> cheers, Ross K
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to