On Aug 11, 6:16 am, egr103 <[email protected]> wrote:
> @Larry
>
> Well, there could very well be up to 25 different markers, all with
> unique infowindow content. For the moment though there will only be
> 10.
>
> What did you mean by 'putting the unique content for each marker in
> the table which defines their locations' ? Is that the section of code
> that defines each markers' latlong coordinates?
Yes. This:
var beaches = [
['The Round Table', 51.60805,-2.956889, "yellow"],
...
>
> How would I go about 'making unique calls to the createMarker function
> for each location'?
(beware, the group does weird things to code, so this may not cut and
paste into your page):
createMarker(map, new google.maps.LatLng(51.60805,-2.95688), 'The
Round Table', '<div id="content">'+
'<div id="siteNotice">'+
'</div>'+
'<img src="images/thumbs/test.jpg" alt="This is a test" />'+
'<h1>Lodge Hill Fort</h1>'+
'<p><strong>Postcode:</strong> NP8 5TU</p>'+
'<div id="bodyContent">'+
'<hr/>'+
'<img src="images/icons/terrain-walking.gif" width="24px"
height="24px" title="Uneven ground" />'+
'<img src="images/icons/access-red.gif" width="52px" height="28px"
title="Red zone - Accessibility access is low" />'+
'<hr/>'+
'<a href="#" title="Discover more about this location">Discover</
a>'+
'</div>'+
'</div>', yellow);
-- Larry
>
> Forgive me if these are basic programming methods but I'm not a
> programmer by day so it may seem a little stupid of me to ask such
> questions but please bare with me!! :)
>
> Thanks for all your help, it really is appreciated!
>
> On Aug 11, 2:06 pm, "[email protected]" <[email protected]>
> wrote:
>
> > On Aug 11, 5:28 am, egr103 <[email protected]> wrote:
>
> > > @Larry you are a legend! That's helped so much! I've got this result
> > > now:http://idl.newport.ac.uk/legendofkingarthur/multiple-markers.htm
>
> > > I'm now having a problem with giving each marker its own unique &
> > > individual infowindow. You can see in my attempt (at the URL above)
> > > that I've created the content for one of my infowindow's (called
> > > 'locationone') and have tried linking it up to one of the markers
> > > ['The Tetrapylon - Geralds Gigantic Tower', 51.610109,-2.955515,
> > > "yellow", "locationone"], but I can't seem to get it to display. I've
> > > tried looking at the other tutes on geocodezip.com & followed some of
> > > the code in:http://www.geocodezip.com/v3_MW_example_map1.htmlbutI'm
> > > not sure where to place the code exactly in order to get it working
> > > nor do I know how to link a variable within my original code. Can
> > > anyone provide any insight/help to this at all?
>
> > I would suggest either putting the unique content for each marker in
> > the table which defines their locations or making unique calls to the
> > createMarker function for each.
>
> > You could also put the data in xml like this
> > page:http://www.geocodezip.com/v3_MW_example_map3.html
>
> > It really depends on how many markers there will be and if you ever
> > expect the data to change.
>
> > -- Larry
>
> > > On Aug 6, 3:22 pm, "[email protected]" <[email protected]>
> > > wrote:
>
> > > > On Aug 6, 1:19 am, egr103 <[email protected]> wrote:
>
> > > > > @Larry : Okay I have updated the same link with my attempt at
> > > > > duplicating code to get another complex icon on the map. I can get
> > > > > marker 2 to display but it displays over the top of the original
> > > > > marker (at the same location) even though I've set the second icon up
> > > > > to display at different lat long coordinates.
>
> > > > > Below are the other icons I will need to use on the map. They have
> > > > > exactly the same dimensions, shape & will use the same shadow image as
> > > > > the original etc. but the image itself will have a different middle
> > > > > icon & different colour, please see:
>
> > > > > Marker 1 can be found
> > > > > here:http://idl.newport.ac.uk/legendofkingarthur/markers/purple.png
>
> > > > > Marker 2 (currently overlapping marker 1 even though different lat
> > > > > long coordinates have been
> > > > > applied):http://idl.newport.ac.uk/legendofkingarthur/markers/blue.png
>
> > > > > Marker 3 (not coded in yet as I wanted to get 2 working
> > > > > first...lol!):http://idl.newport.ac.uk/legendofkingarthur/markers/green.png
>
> > > > > Marker 4 (not coded in
> > > > > yet):http://idl.newport.ac.uk/legendofkingarthur/markers/yellow.png
>
> > > > > Just to give you an understanding of where I need to go with this:
>
> > > > > The map will have a total of 12 different markers (at different
> > > > > locations) consisting of any of the 4 different icons I have stated
> > > > > above. Each location will have customised info windows with different
> > > > > content associated with each one.
>
> > > > > I am not sure as to what part of the code to duplicate to get this
> > > > > working properly...any ideas?
>
> > > > Have you seen these
> > > > examples:http://www.geocodezip.com/v3_markers_colored.htmlhttp://www.geocodezi...
>
> > > > They all use custom markers. All the custom markers have the same
> > > > shape and size, but different colors. I would think it wouldn't be
> > > > too hard to change any of them to use your marker template.
>
> > > > -- Larry
>
> > > > > I appreciate all the help you can give!
>
> > > > > On Aug 5, 10:45 pm, "[email protected]" <[email protected]>
> > > > > wrote:
>
> > > > > > On Aug 5, 7:12 am, egr103 <[email protected]> wrote:
>
> > > > > > > I'm not great on using JavaScript but I try my best.
>
> > > > > > > Currently I'm using the complex icon code for custom markers taken
> > > > > > > from Google's
> > > > > > > page:http://code.google.com/apis/maps/documentation/javascript/overlays.ht...
> > > > > > > but I would like to know what part of that code I duplicate in
> > > > > > > order
> > > > > > > to set up another complex icon in a different location??
>
> > > > > > > My testing site
> > > > > > > is:http://idl.newport.ac.uk/legendofkingarthur/testing-custom.htm
>
> > > > > > > All help is appreciated
>
> > > > > > How different is the other "complex icon"? I don't see any attempt
> > > > > > on
> > > > > > your map to create another.
>
> > > > > > Is it the same, if so, you can use it for another location.
>
> > > > > > If it is completely different, you have to duplicate all the code
> > > > > > that
> > > > > > defines the icon and change it appropriately.
>
> > > > > > -- Larry
--
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.