Hi Larry,

Sincere thanks for your help, I've now got this working!

I've a little work to do on the InfoWindow and the map bounds, but the main
issues have been resolved thanks to you.

Kind regards

Chris

On 16 October 2011 16:34, [email protected] <[email protected]> wrote:

> On Oct 16, 7:50 am, "[email protected]" <[email protected]>
> wrote:
> > On Oct 16, 7:39 am, IR HM <[email protected]> wrote:
> >
> > > Hi Larry, many thanks for your quick reply.
> >
> > > I too see the results that you have highlighted. This is the data being
> > > shown from my first PHP script. The JS code for the second PHP file
> starts
> > > at line 184 with this line: downloadUrl("loadscheduledmonuments.php",
> > > function(data) {
> >
> > > If this was working correctly, this second script should add another
> marker
> > > to the map with the default Google marker icon. So if you selected both
> > > 'tick boxes'  and the second script was working in the page there
> should be
> > > a total of 6 markers on the map.
> >
> > > I know that the second PHP file is pulling through the data correctly
> > > because I've run it through the browser, so I'm not sure what the
> problem
> > > is.
> >
> > It doesn't look like you ever associate that marker with the map.  You
> > need to either set the "map" property when you create it (the
> > createMarker function does this for the other markers) or
> > call .setMap(map) on the marker when you want it to appear on the map.
>
> Other issues:
> 1. you are missing a "g" in monumentosb36lat
>            parseFloat(markers2[i].getAttribute("monumentosb36lat")),
>
> parseFloat(markers2[i].getAttribute("monumentosgb36lon")));
>
> 2. you have multiple functions with the same name (downloadUrl,
> doNothing), you only want/need one, the browser chooses the one it
> uses in that case and it different browsers can choose differently.
>
> 3. your second downloadUrl call is outside of the "load" function, so
> occurs before the map variable is set up (at least it does now when
> the data is so small), you should move it inside the load function
> (right after the original one).
>
>    -- Larry
>
>
> >
> >
> >
> >
> >
> > > Kind regards
> >
> > > On 16 October 2011 15:32, [email protected] <[email protected]>
> wrote:
> >
> > > > On Oct 16, 7:05 am, IR HM <[email protected]> wrote:
> > > > > Hi Larry, many thanks for replying to my post, it was such a relief
> > > > > to receive some help.
> >
> > > > > Rather than going for the KML approach, I created a second PHP file
> and
> > > > I'm
> > > > > attempting to get this to run through the original code but when I
> run
> > > > the
> > > > > page. I can get the div bar and markers appearing from the first
> PHP
> > > > scri> on my map, but I can't get any to appear (there should be one)
> from
> > > > the
> > > > > second PHP script.
> >
> > > > > Rather than paste my list of code, please find a link to my page.
> >
> > > >http://www.mapmyfinds.co.uk/development/copymylocations.html
> >
> > > > What browser are you using?  I see one marker on that page in Chrome,
> > > > and additional ones when I check the "Locations where no finds made"
> > > > checkbox.
> >
> > > > They all seem to appear in the sidebar though.
> >
> > > >  -- Larry
> >
> > > > > I just wondered whether could perhaps take a look at this please
> and let
> > > > me
> > > > > know where I'm going wrong.
> >
> > > > > Many thanks and kind regards
> >
> > > >  > On 15 October 2011 22:33, [email protected] <
> [email protected]>
> > > > wrote:
> >
> > > > > > On Oct 15, 8:22 am, ir261273 <[email protected]> wrote:
> > > > > > > Hi, I wonder whether someone may be able to help me please with
> a
> > > > > > > query I have around the plotting of co-ordinates on a Google
> Maps.
> >
> > > > > > > I'm using the code below to plot markers from a mysql database
> onto a
> > > > > > > Google map via a PHP script which also incorporates a sidebar.
> >
> > > > > > Please provide a link, not a code dump.
> >
> > > > > > > All works as it should but I've now got a problem which I don't
> know
> > > > > > > how to resolve.
> >
> > > > > > > I now have a second set of static co-ordinates that I want to
> show on
> > > > > > > the same map, but I don't want them to appear in the sidebar.
> They
> > > > are
> > > > > > > from the same database but are in a separate table to the one
> which
> > > > > > > populates the above, and have different fields names. I know
> that I
> > > > > > > can pull together data from many tables in the PHP script which
> feeds
> > > > > > > into the above page, but I don't know how to add another
> complete set
> > > > > > > of co-ordinates onto the same map.
> >
> > > > > > > I've done quite a bit of searching on the Interent and I
> wondered
> > > > > > > whether a KML file would work.
> >
> > > > > > A kml file would work, you could even generate kml from your
> database
> > > > > > with a PHP script.
> >
> > > > > > Other options:
> > > > > > 1. Create a second PHP script for the additional markers with
> another
> > > > > > handler to put the markers on the map.
> > > > > > 2. feed the second set of data through the original code, add a
> flag
> > > > > > so no entries are added to the sidebar
> >
> > > > > >  -- Larry
> >
> > > > > > > I just wondered whether someone could
> > > > > > > provide some guidance on the best way forward.
> >
> > > > > > > Many thanks and kind regards
> >
> > > > > > --
> > > > > > 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.
> >
> > > > --
> > > > 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.
>
> --
> 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.
>
>

-- 
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.

Reply via email to