Hi cyrt-

I haven't used either of those libraries. I'll ask around to see if
other Flex developers have.

The opengis namespace was created after control of KML was given over
to OGC, the standards body. Both those namespaces refer to KML 2.2, so
the tags supported should be the same in both.

- pamela

On Tue, Mar 10, 2009 at 3:09 AM, cyrt <[email protected]> wrote:
>
> thanks a lot (also for your help with my previous problems!)
>
> when reading a kml file I just replace the opengis with
> earth.google.com namespace. So far everything works fine, but are
> there any significant differences between these namespaces that could
> lead to any problems?
>
> Now that I am able to read KML files, I have to deal with another
> issue:
> These KML files are stored in a KMZ archive. As far as I know KMZ
> files are basically similar to ZIP files. Browsing the web I came
> across FZIP ( http://codeazur.com.br/lab/fzip/ ) and another ZIP
> Library (http://www.nochump.com/blog/?p=15).
>
> Can you recommend one of these libraries for my purpose, or do know a
> better way to get this done?
>
>
>
>
> On Mar 9, 12:54 am, pamela fox <[email protected]> wrote:
>> Hi cyrt-
>>
>> The problem is that the KMLParser uses the "earth.google.com"
>> namespace instead of the "opengis.net" namespace. If I change your XML
>> to use the old namespace, the parser works. I haven't come up with an
>> elegant system for checking both namespaces.
>>
>> <kml xmlns="http://earth.google.com/kml/2.2";
>> xmlns:gx="http://www.google.com/kml/ext/2.2";
>> xmlns:atom="http://www.w3.org/2005/Atom";>
>>
>> - pamela
>>
>> On Fri, Mar 6, 2009 at 2:52 AM, cyrt <[email protected]> wrote:
>>
>> > Hi!
>>
>> > I'd like to use the KMLParser, but the kml.feature is always null. The
>> > code is exactly the same as in the example, that can be found here
>> >http://gmaps-utility-library-flash.googlecode.com/svn/trunk/examples/...
>> > .
>>
>> > This is my KML file:
>>
>> > <kml xmlns="http://www.opengis.net/kml/2.2"; xmlns:gx="http://
>> >www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2";
>> > xmlns:atom="http://www.w3.org/2005/Atom";>
>> >  <GroundOverlay>
>> >    <name>ovalay</name>
>> >    <Icon>
>> >      <href>files/2.jpg</href>
>> >      <viewBoundScale>0.75</viewBoundScale>
>> >    </Icon>
>> >    <LatLonBox>
>> >      <north>-13.15204151432014</north>
>> >      <south>-13.17376840745433</south>
>> >      <east>-72.5013090207886</east>
>> >      <west>-72.53105986935958</west>
>> >    </LatLonBox>
>> >  </GroundOverlay>
>> > </kml>
>>
>> > And this is the code:
>>
>> >                public function load(fileName:String):void
>> >                {
>> >                        var loader:URLLoader = new URLLoader();
>> >                        loader.addEventListener(Event.COMPLETE, loadKML);
>> >                        loader.load(new URLRequest(fileName));
>>
>> >                }
>>
>> > private function loadKML(event:Event):void
>> >                {
>>
>> >                        var kml:Kml22 = new Kml22(event.target.data);
>> >                        var rootFeature:Feature = kml.feature;
>>
>> >                        kmlObj = new Object();
>>
>> >                        if(kml.feature == null)
>> >                        {
>> >                                trace("KML == NULL");
>> >                        }
>>
>> >                        kmlObj.name = rootFeature.name;
>> >                        }
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" 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-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to