Thanks for the reply.

Sorry there was no link.
The map needs updating to handle the polylines - my much modified
EGeoXml.js never anticipated polylines and caused various errors when
polylines were added to the KML so i had to disable the polyline
creation until i can update the map to properly handle them.

The KML i'm working with can be found here:
http://maps.google.com/maps/ms?ie=UTF8&hl=en&oe=UTF8&msa=0&msid=108304117273229554382.0004601474e59e1753111&output=kml

In that i see all image tags are upper case 'IMG'.
That's image tags used for markers AND polylines (there's only 2
polylines in the KML at the moment).
And all the source attributes of the image tags are lower case 'src'.

This is the code to be found in the EGeoXml createMarker() method:

// Attempt to preload images
if (this.opts.preloadimages) {
        var text = desc;
        var pattern = /<\s*img/ig;
        var result;
        var pattern2 = /src\s*=\s*[\'\"]/;
        var pattern3 = /[\'\"]/;

        while ((result = pattern.exec(text)) != null) {
                var stuff = text.substr(result.index);
                var result2 = pattern2.exec(stuff);
                if (result2 != null) {
                        stuff = stuff.substr(result2.index+result2[0].length);
                        var result3 = pattern3.exec(stuff);
                        if (result3 != null) {
                                var imageUrl = stuff.substr(0,result3.index);
                                this.myimages[this.imageNum] = new Image();
                                this.myimages[this.imageNum].src = imageUrl;
                                this.imageNum++;
                        }
                }
        }
}

Looks like the search for 'img' in the infowindow HTML is case
insensitive and the search for 'src' is not?
(I'm no expert on regular expressions so may well be wrong lol!)

There is no such code in EGeoXml's createPolyline() or createPolygon()
methods however.

So i guess the answer is that EGeoXml doesn't preload images to be
used in infowindow HTML for polylines and polygons - it only preloads
them for infowindow HTML to be used for markers.

Martin.


On 27 Aug, 20:18, Garthan <[email protected]> wrote:
> If I recall EgeoXml looks for the tags in the description and it could
> be case sensitive
> so ... as usual.. sounds like a link to your actual page might be
> handy.
--~--~---------~--~----~------------~-------~--~----~
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