=?gbk?B?u9i4tDpSRTogU1BBTS1MT1c6ICA6IFtaUzJdIFtt?=
=?gbk?B?YXBndWlkZS11c2Vyc10gV2hhdCBoYXBwZW5zIGlm?=
=?gbk?B?IHRoZSBCQk9YIGRvZXMgbm90IGV4aXN0Pw==?=
=?gbk?B?vs+x8w==?=
jubin1985 at qq.com
Thu May 29 06:16:12 EDT 2008
However,my application is not going that way.I have solved this problem which was caused by a Chinese character.Thanks a lot for your attention.
------------------
--¾Ï±ó
------------------ ÔʼÓʼþ ------------------
·¢¼þÈË: "Andy Morsell"<amorsell at spatialgis.com>;
·¢ËÍʱ¼ä: 2008Äê5ÔÂ29ÈÕ(ÐÇÆÚËÄ) Á賿00:09
ÊÕ¼þÈË: "'MapGuide Users Mail List'"<mapguide-users at lists.osgeo.org>;
Ö÷Ìâ: RE: SPAM-LOW: : [ZS2] [mapguide-users] What happens if the BBOX does not exist?
If you are adding your PHP as a network link layer in Google Earth, Google Earth will issue a request to that page on any pan or zoom. Part of that is the automatic passing of the Google Earth BBOX parameter. Are you doing this from Google Earth? No, the application will not work without BBOX.
Andy Morsell, P.E.
Spatial Integrators, Inc.
http://www.SpatialGIS.com
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of ??
Sent: Wednesday, May 28, 2008 1:00 AM
To: mapguide users mail list
Subject: SPAM-LOW: »Ø¸´: [ZS2] [mapguide-users] What happens if the BBOX does not exist?
my codes is from the http://mapguide.osgeo.org/livegallery.html and I want to do the same thing as http://data.mapguide.com/mapguide/DynamicKml/GoogleEarth.php¡¡£Éjust used their codes and use my data instead,but I can't get the right result.
If there is no BBOX,can I get the Geometry?
the file which invoke that function is just as follows.
------------------
--¾Ï±ó
Kunming,China
<?php
//This file delivers KML network link content directly
//to Google Earth.
include 'UtilityFunctions.php';
//uses the Wrapper.kml file for KML Network Link Skeleton
$doc = DOMDocument::load('Wrapper.kml');
$networkLinkNode = $doc->getElementsByTagName('href')->item(0);
$networkLinkNode->nodeValue = "http://localhost:8008/mapguide/test/KMLContentFactory.php?FILTER=".urlencode($_GET["PropertyName"]." ".$_GET["Operator"]." ".$_GET["VAL"]);
$layerDefinition = $doc->saveXML();
header('Content-Type: application/keyhole');
header('Content-Length: ' . strlen($layerDefinition));
echo $layerDefinition;
?>
------------------ ÔʼÓʼþ ------------------
·¢¼þÈË: "Kenneth Skovhede, GEOGRAF A/S"<ks at geograf.dk>;
·¢ËÍʱ¼ä: 2008Äê5ÔÂ28ÈÕ(ÐÇÆÚÈý) ÏÂÎç03:56
ÊÕ¼þÈË: "MapGuide Users Mail List"<mapguide-users at lists.osgeo.org>;
Ö÷Ìâ: Re: [ZS2] [mapguide-users] What happens if the BBOX does not exist?
You should provide more surrounding code, or say where the code is from.
In the code below, the envelope is never used, so it doesn't matter if it is there.
I assume it was supposed to be combined with the attribute filter like this:
if ($queryEnvelope != null)
$queryOptions->SetSpatialFilter($queryEnvelope)
Regards, Kenneth Skovhede, GEOGRAF A/S
¾Ï±ó skrev: Why the 'BBOX' does not exist?If this happens,can I get the 'geometry'?
the codes is as following:
if (array_key_exists('BBOX', $_GET))
{
// split the client's BBOX return by commas and spaces to obtain an array of coordinates
$coords = preg_split('/,|\s/', $_GET['BBOX']);
$lowerLeft = $geometryFactory->CreateCoordinateXY($coords[0], $coords[1]);
$upperRight = $geometryFactory->CreateCoordinateXY($coords[2], $coords[3]);
$queryEnvelope = new MgEnvelope($lowerLeft, $upperRight);
}
$featureService = $siteConnection->CreateService(MgServiceType::FeatureService);
$queryOptions = new MgFeatureQueryOptions();
$filter = urldecode($_GET["FILTER"]) ;
//echo "<p>$filter</p>";
echo '<Folder>';
echo '<description>MapGuide - Wheaton Parcels Filtered ['.$filter.'] </description>';
echo '<name>Wheaton Parcels</name>';
echo '<visibility>0</visibility>';
echo '<open>1</open>';
$queryOptions->SetFilter($filter);
//Feature Source being used in the application
$featureReader = $featureService->SelectFeatures(new MgResourceIdentifier("Library://test/Data/province.FeatureSource"), "province", $queryOptions);
//if($featureReader!=null) echo "<p>feature success!</p>";
$geometryReaderWriter = new MgAgfReaderWriter();
echo '<p>test1</p>';
//Read Feature Source Attributes for populating Tooltip on Google Earth
//Change this if using a different Feature Source
$byteReader = $featureReader->GetGeometry('Geometry');
//if($byteReader) echo '<p>feature success!</p>';
$geometry = $geometryReaderWriter->Read($byteReader);
_______________________________________________ mapguide-users mailing list mapguide-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20080529/3fd55684/attachment.html
More information about the mapguide-users
mailing list