Thanks, removing that completely out of the code made the icons
appear, right now only the shadow as thats the only thing that I knew
would work, now I just need to figure out how to load the actual icon
that I want for each marker onto it.

On 10 Jun, 18:00, "[email protected]" <[email protected]> wrote:
> On Jun 10, 8:04 am, Tinman <[email protected]> wrote:
>
> > Thanks again for your help, I really appreciate it.
>
> > But even after adding this the markers still fail to show up on the
> > map, I have looked over my code several times also now and I think
> > everything is defined, and everything seems right, though I am not
> > very good with the API and Java so its not that easy for me to spot if
> > anything is actually wrong. (I am more of a php sql guy)
>
> > I hope we can figure this thing out, the people in the community I am
> > in, and myself would love it ;)
> > Thanks one more time for all the help I am getting!
>
> I get a straight javascript error:
> Line: 48
> Error: 'description' is undefined
>
> Because "description" is undefined in this line:
> var html = "<b>" + name + "</b> <br/>" + description;
>
> Then:
> Line: 56
> Error: 'infoWindow' is undefined
>
> Because that isn't defined either.
>
>   -- Larry
>
>
>
>
>
> > On 10 Jun, 16:43, Scorpius <[email protected]> wrote:
>
> > > Seems you're still missing one more function.
>
> > > function parseXml( str )
> > > {
> > >         if (window.ActiveXObject)
> > >         {
> > >                 var doc = new ActiveXObject('Microsoft.XMLDOM');
> > >                 doc.loadXML(str);
> > >                 return doc;
> > >         }
> > >         else if (window.DOMParser)
> > >         {
> > >                 return (new DOMParser).parseFromString(str, 'text/xml');
> > >         }
>
> > > }
>
> > > On Jun 10, 10:20 am, Tinman <[email protected]> wrote:
>
> > > > Thanks, I got that added now, but still no markers are showing up on
> > > > the map, I though they might have been invisible but they are not
> > > > there at all.
>
> > > > On 10 Jun, 16:02, Scorpius <[email protected]> wrote:
>
> > > > > Looks like you still haven't defined the function doNothing yet.
> > > > > Just use:
> > > > > function doNothing() {}
>
> > > > > On Jun 10, 9:06 am, Tinman <[email protected]> wrote:
>
> > > > > > Thanks for your reply.
> > > > > > I tried to define it with this code:
>
> > > > > > function downloadUrl(url,callback) {
> > > > > >  var request = window.ActiveXObject ?
> > > > > >      new ActiveXObject('Microsoft.XMLHTTP') :
> > > > > >      new XMLHttpRequest;
>
> > > > > >  request.onreadystatechange = function() {
> > > > > >    if (request.readyState == 4) {
> > > > > >      request.onreadystatechange = doNothing;
> > > > > >      callback(request.responseText, request.status);
> > > > > >    }
> > > > > >  };
>
> > > > > >  request.open('GET', url, true);
> > > > > >  request.send(null);
>
> > > > > > }
>
> > > > > > And now the map loads again, but it does not load any markers.
> > > > > > Is there something wrong in the first piece of code maybe?
>
> > > > > > Thanks again for your reply, getting the downloadUrl defined seems 
> > > > > > to
> > > > > > have been part of the answer.
>
> > > > > > On 10 Jun, 10:15, Davide Cremonesi <[email protected]> wrote:
>
> > > > > > > downloadUrl is not defined.
> > > > > > > google.maps.DownloadUrl or GDownloadUrl are part of the v2 API.
> > > > > > > Now v3 is loaded by default, so if you want to use v2 APIs you 
> > > > > > > have to
> > > > > > > load it explicitly specifying the v=2 in the google maps api URL.
>
> > > > > > > Ciao,
> > > > > > > Davide
>
> > > > > > > On Jun 10, 8:53 am, Tinman <[email protected]> wrote:
>
> > > > > > > > Hi.
> > > > > > > > I have been working on a dynamic map for a game lately and I am 
> > > > > > > > trying
> > > > > > > > to add markers from database entries.
> > > > > > > > I have mad the database and added a few entries into it, I have 
> > > > > > > > also
> > > > > > > > made a .php file that creates a xml file that the Google Maps 
> > > > > > > > API
> > > > > > > > should be able to collect information from that to add markers 
> > > > > > > > onto my
> > > > > > > > map.
>
> > > > > > > > The map is located 
> > > > > > > > here:http://www.undergroundrp.com/dev3/map.html
> > > > > > > > The .php file that creates the .xml file is 
> > > > > > > > here:http://www.undergroundrp.com/dev3/phpsqlajax_genxml.php
>
> > > > > > > > The code I am currently using to attempt to collect the xml
> > > > > > > > information and put it onto the map:
>
> > > > > > > > <!--Add Markers From Database Start-->
>
> > > > > > > > downloadUrl("phpsqlajax_genxml.php", function(data) {
> > > > > > > >   var xml = parseXml(data);
> > > > > > > >   var markers = 
> > > > > > > > xml.documentElement.getElementsByTagName("marker");
> > > > > > > >   for (var i = 0; i < markers.length; i++) {
> > > > > > > >     var name = markers[i].getAttribute("name");
> > > > > > > >     var description = markers[i].getAttribute("description");
> > > > > > > >     var image = markers[i].getAttribute("icon");
> > > > > > > >     var point = new google.maps.LatLng(
> > > > > > > >         parseFloat(markers[i].getAttribute("lat")),
> > > > > > > >         parseFloat(markers[i].getAttribute("lng")));
> > > > > > > >     var html = "<b>" + name + "</b> <br/>" + description;
> > > > > > > >     var image = 
> > > > > > > > 'http://google-maps-icons.googlecode.com/files/'+icon;
> > > > > > > >     var marker = new google.maps.Marker({
> > > > > > > >       map: map,
> > > > > > > >       position: point,
> > > > > > > >       icon: image,
> > > > > > > >       shadow: 'http://google-maps-icons.googlecode.com/files/
> > > > > > > > shadow.png'
> > > > > > > >     });
> > > > > > > >     bindInfoWindow(marker, map, infoWindow, html);
> > > > > > > >   }
>
> > > > > > > > });
>
> > > > > > > > <!--Add Markers From Database End-->
>
> > > > > > > > But this "destroys" my map, and I have no idea how to do this, 
> > > > > > > > I have
> > > > > > > > no problem with php and sql but when it comes to this Java and 
> > > > > > > > Google
> > > > > > > > Maps API I am really a noob ^^
>
> > > > > > > > If anyone got any idea on how I would be able to load this I 
> > > > > > > > would be
> > > > > > > > very greatfull.- Hide quoted text -
>
> > - Show quoted text -

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