On Nov 10, 11:18 am, Jennifer Dudeck <[email protected]> wrote:
> I have three polygons that I want to display on the map as KML layers,
> each generated from a database by PHP. The first two scripts that I
> had were both working a few weeks ago. The third one I finished
> recently, and when I went to test it, I couldn't get it to show up on
> the map. When I tested the other two, only one still shows up.
>
> One of the things that is confusing me is that if I take the KML file
> generated and save it as a '.kml' ending, then use that specific file
> to make the layer, instead of the PHP, it works just fine. That
> suggests to me that it's not the actual output of the PHP that is the
> problem.
>
> I had this problem when I first started trying to use PHP to make my
> KML layers, but at that time I discovered that I needed to have a
> specific header for the file. However, at this point, all three PHP
> scripts have the header "Content-Type: application/vnd.google-earth.kml
> +xml;charset=UTF-8".
>
> I'm using the same method for creating all three KML files, and new
> test files created with the same method seem to be having no trouble.
> If the content is right, and the files are created the same way, how
> can it be working for some and not others...?
>
> If anyone can give me some suggestions, I'd appreciate it. This is for
> the beta release of a website that is slated for Monday... which makes
> this a bit urgent!
>
> Thanks,
> Jennifer

You could try calling your google.maps.KmlLayer constructors & your
KmlLayer.setMap methods in opposite orders.  Call the
google.maps.KmlLayer constructors in most complex to least complex
order.  Call the KmlLayer.setMap methods in least complex to most
complex order.  You could try adding a "setTimeout" delay between the
two sets of calls to give your server & Google's server enough time to
complete.

You could use V2 to preload your KML files to Google's servers for use
in V3.  I believe it is legal to call Google's "gx" or "sf" services
directly according to a respected Google employee.

    http://www.polylib.us/gx
    http://www.polylib.us/sf

Both are essentially the same.  Both use asynchronous callbacks.

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