MapGuide OS with Google Earth
Willem Schwarte
willem at giskit.nl
Mon Apr 10 10:37:50 EDT 2006
Hi,
I have tried your sample for Google Earth, and it work fine with the
sheybogan sample data.
If I paste this in my internet Explorer
http://localhost/sites/google_earth\water.php
<http://localhost/sites/google_earth/water.php> I will get a bunch of
coordinates.
But when I try to use my own data I get an error:
PHP Fatal error: Uncaught exception 'mgobjectnotfoundexception' in
Unknown on line 0
In the water.php file I change this line like so:
$featureReader = $featureService->SelectFeatures(new
MgResourceIdentifier("Library://Bolsward/Data/Data/totaal_tvg32010101_v.
FeatureSource"), "totaal_tvg32010101_v", null);
As you can see in XML below, this does exist. Do you might know why I
don't get anything ?
Thanks,
Willem
<ResourceId>Library://Bolsward/Data/Data/totaal_tvg32010101_v.FeatureSou
rce</ResourceId>
<Depth>4</Depth>
<Owner>Administrator</Owner>
<CreatedDate>2006-04-07T08:32:36Z</CreatedDate>
<ModifiedDate>2006-04-07T08:32:36Z</ModifiedDate>
-
<http://localhost/mapguide/mapagent/mapagent.fcgi?OPERATION=ENUMERATERES
OURCES&VERSION=1.0.0&LOCALE=en&RESOURCEID=Library%3A%2F%2F&TYPE=&DEPTH=-
1##> <ResourceDocumentHeader
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ResourceDocumentHeader-1.0.0.xsd">
-
<http://localhost/mapguide/mapagent/mapagent.fcgi?OPERATION=ENUMERATERES
OURCES&VERSION=1.0.0&LOCALE=en&RESOURCEID=Library%3A%2F%2F&TYPE=&DEPTH=-
1##> <General>
<IconName>FeatureSourceSdf</IconName>
</General>
-
<http://localhost/mapguide/mapagent/mapagent.fcgi?OPERATION=ENUMERATERES
OURCES&VERSION=1.0.0&LOCALE=en&RESOURCEID=Library%3A%2F%2F&TYPE=&DEPTH=-
1##> <Security
xsi:noNamespaceSchemaLocation="ResourceSecurity-1.0.0.xsd">
<Inherited>true</Inherited>
-
<http://localhost/mapguide/mapagent/mapagent.fcgi?OPERATION=ENUMERATERES
OURCES&VERSION=1.0.0&LOCALE=en&RESOURCEID=Library%3A%2F%2F&TYPE=&DEPTH=-
1##> <Groups>
-
<http://localhost/mapguide/mapagent/mapagent.fcgi?OPERATION=ENUMERATERES
OURCES&VERSION=1.0.0&LOCALE=en&RESOURCEID=Library%3A%2F%2F&TYPE=&DEPTH=-
1##> <Group>
<Name>Everyone</Name>
<Permissions>r,w</Permissions>
</Group>
</Groups>
</Security>
</ResourceDocumentHeader>
</ResourceDocument>
________________________________
Van: Jason Birch [mailto:Jason.Birch at nanaimo.ca]
Verzonden: dinsdag 14 maart 2006 8:19
Aan: users at mapguide.osgeo.org
Onderwerp: MapGuide OS with Google Earth
I've uploaded a pretty basic example of using MapGuide OS to serve KML
to Google Earth, based on an example that Bob Bray provided with the
first preview:
http://www.jasonbirch.com/files/google_earth.zip
This is totally unsupported, but in my experience it works with the
Sheboygan data set. On a standard Windows/Apache/Php install you should
just have to follow the instructions in the readme.txt file.
I had a better example that worked to return data for the current
bounding box (you can see it in action at http://earth.nanaimo.ca/ ) but
I was unable to get this working with the sample data, so either
something has changed with 1.0 or the sample data is different somehow
than what I'm serving. I didn't get any error messages, but seeing all
of the exception codes in the API, I guess I should be trapping for
these somehow. Not enough time to research now though.
My to-do list:
- clean up the code, make it more modular, and possibly use TJ's
KMLDocument class for generating the KML:
http://kml.tjworld.net/downloads.php
- figure out how to read the default scale ranges and symbology from
MapGuide, and return a semblance of those instead of having to custom
code each layer.
- dynamically rewrite the bounding box, so that it shifts to the
foreground when the view is tilted, allowing delivery of data without
killing the server with a huge extent
- deliver GroundOverlay images as an option for small-scale mapping
where serving vectors is inappropriate
Of course Autodesk could just step in any time now and provide a
template for default delivery of KML :)
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20060410/589298e0/attachment.html
More information about the Mapguide-users
mailing list