AVSteve,

Yes of course - use and modify whatever you see fit - I'm sorry the
example couldn't have been separated out a little easier but the
particular web server I wanted to use to host this map was having a
real hard time loading separate .js files from the HTML Header and I
just didn't feel like dealing with that problem - but those separate
JS objects I created can be separated out into separate .js files to
make understanding and reusing that code a whole lot easier, I put
some in-code comments in the mainCode.js file to try and help you make
some sense of what I'm doing there.

And yes - I just modified the example on that same server to draw
small red circles instead of the default marker icon - you may need to
clear your cache and refresh the page to see the new icons - but
basically it just comes down to adding a bit of code to the
'createMarker' function.

Prior to declaring your new GMarker at a LatLng point you need to
create an object that will store some additional options for the
GMarker object.

So first you create your custom Icon using

     var customIcon = new GIcon();

Next you want to setup some of the properties of that object
     customIcon.image = './images/smallredcircle.png';
     customIcon.iconSize = new GSize(10,10);
     customIcon.iconAnchor = new GPoint(1,1);

Then we'll declare our object that will store all the custom
properties for the GMarker and also assign our customIcon as this new
object's icon property
     var markerOptions = {icon:customIcon};

Finally you pass this markerOptions object as an additional argument
when declaring a new GMarker.
     var marker = new GMarker(new GLatLng(randomLat,randomLng),
markerOptions);

And that's it!

If you look at the API you'll find other options you can customize and
tweak - like creating a shadow for the icon and it's position & size
relative to the icon itself.

Feel free to use the image and any of that source as you see fit and
let me know if you have any questions about it.

Cheers!

-John Mick



On Jun 22, 1:49 pm, AVSteve <[email protected]> wrote:
> John,
>
> Your map is an excellent example of how I would like mine to work.
> Thanks very much for sharing it with me.  Are you OK with me using
> some of your code, and changing it a bit, if I can figure out how it
> works?
>
> Also, do you know how I would go about finding a small red circle for
> a marker icon instead of the larger teardrop that is the default?
>
> Thanks again!
>
> AVSteve
>
> On Jun 19, 3:17 pm, John Mick <[email protected]> wrote:
>
> > I actually encountered this same type of requirement for my own map
> > earlier this week.  I wrote a couple of JavaScript Modules to manage
> > and create customized tooltip popups for GMarkers.
>
> > I just typed up an example map for you to check out here
>
> >http://www.thebotflies.com/gmaps/tooltips/
>
> > Sorry all the code is bunched into one mainCode.js file - I wrote up
> > some comments to explain what all the modules do and how to use them.
>
> > On Jun 18, 6:45 pm, Ralph Ames <[email protected]> wrote:
>
> > > >Sorry, I don't understand what you mean.
>
> > > They are not individual marker icons.
>
> > > Ralph
--~--~---------~--~----~------------~-------~--~----~
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