So if I produce the inforwindow's with unique content, using the code I posted above, I will not need this piece of code at all & can delete it?
On Aug 11, 5:13 pm, "[email protected]" <[email protected]> wrote: > On Aug 11, 8:25 am, egr103 <[email protected]> wrote: > > > > > > > @Larry > > > I took all contents from the locationone variable & replaced the title > > with it & it has worked. So my code for each location will look like > > (with the variable of beaches): > > > ['<div style="width:650px; height:300px;" id="content">'+ > > '<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>', 51.578597,-3.218061, "purple"], > > > Is this a bad way of doing it? I'm happy that I've got the result I > > wanted but for efficiency should it be done differently? I just > > couldn't get your code to work, was it meant to have been defined as a > > function? > > > Also, just out of curiosity, what does this bit of code do? > > > var infowindow = new google.maps.InfoWindow( > > { > > size: new google.maps.Size(150,50) > > }); > > It creates the single infowindow that is used to replicate the v2 > behavior of a single infowindow open at a time. > > > > > > > Thanks again for all your help Larry! > > > On Aug 11, 3:54 pm, "[email protected]" <[email protected]> > > wrote: > > > > On Aug 11, 7:21 am, egr103 <[email protected]> wrote: > > > > > @Larry > > > > > The code copied & pasted fine as far as I can tell. Whereabouts in my > > > > code do I need to place the code you have so kindly written? I have > > > > tried putting it in between > > > > > var beaches = [ ... ]; > > > > > & I have also just pasted it directly beneath that variable but it > > > > doesn't seem to work either way. Any ideas? > > > > calling createMarker like that should create the marker (it will > > > probably be a duplicate of an existing one, unless you remove it) as > > > long as it is called after the api has loaded and the icons are > > > defined. > > > > > ... > > > > In regard to the first method stated in your last post (about > > > > inserting the infowindow content within the tables that define each > > > > locations lat lng coordinates), how would I go about doing this? > > > > In thinking about it, you might be able to just put your "locationone" > > > variable (I'm not looking at your code right now) in the table where > > > the infowindow contents are stored. > > > > -- Larry > > > > > Really sorry Larry to ask so many questions but I will get there! > > > > > On Aug 11, 2:43 pm, "[email protected]" <[email protected]> > > > > wrote: > > > > > > 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 > > ... > > read more » -- 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.
