Re: [mapguide-users] SetSpatialFilter and MgFeatureSpatialOperations problem with search

2009-01-26 Thread Maciej Skorczewski

Hi Kenneth

thx for answers.

i thing about another solution , how about  use postgis spatial function?...

plan is:

1. get all coordinates of parcels/region from mapguide setspatial results

2. use postgis spatial function (question is: can i use sparial function 
without insert to database?, can i make in only as sql query?)


3. so when small parcel is IN bigger region then true/false.


i try this, i give you solution/answer.

macieksk



I have seen cases where the first record of the datasource is returned 
no matter what the query is.

You are likely seeing a different problem, but now you know :).

In the pretty picture you have drawn, the lower part shows the parcel 
(with the number three), which
clearly touches the yellow parcel. AFAIK, there is no direct spatial 
operation that allows you to
select only the grey one. You can however calculate the area of which 
the two polygons overlap,
and filter out the yellow, based on overlapped area. You can choose to 
discard polygon with
a very smal overlapping area, or only select the one with the largest 
overlapping area.


Is there a problem with only selecting parcels that intersect the actual 
point the user clicked on?


If you are actually using the point, you are likely using the OGR 
provider, and having this problem:

http://trac.osgeo.org/fdo/ticket/343

Regards, Kenneth Skovhede, GEOGRAF A/S


___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


[mapguide-users] Maestro Error: ResourceEditors XmlEditorControl

2009-01-26 Thread Michael Kriese

Thank you!

Here is another patch. Maestro/ResourceEditors/XmlEditorControl.cs throws an
catched exception. Because of this error you can't edit files with an
external editor.

"GUI-Access from another thread from FileSystemWatcher" :working:


Regards, Michael Kriese


http://n2.nabble.com/file/n2220712/XmlControlEditor.patch
XmlControlEditor.patch 



Kenneth Skovhede, GEOGRAF A/S wrote:
> 
> Thanks a bunch!
> 
> I have created a ticket, and applied the patch to svn trunk:
> http://trac.osgeo.org/mapguide/ticket/828
> 
> Regards, Kenneth Skovhede, GEOGRAF A/S
> 
> 
> 
> Michael Kriese skrev:
>> Hello,
>>
>> There's an error in
>> "Maestro/FusionEditor/CustomizedEditors/InvokeScript.cs". This will throw
>> an
>> unchatched exception. I've attached a patch.
>>
>> Regards,
>> Michael Kriese
>>
>> http://n2.nabble.com/file/n2218944/InvokeScript.diff InvokeScript.diff 
>>   
> ___
> mapguide-users mailing list
> mapguide-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 
-- 
View this message in context: 
http://n2.nabble.com/Maestro-Error%3A-Widget-InvokeScript-tp2218944p2220712.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] Maestro Error: Widget InvokeScript

2009-01-26 Thread Kenneth Skovhede, GEOGRAF A/S

Thanks a bunch!

I have created a ticket, and applied the patch to svn trunk:
http://trac.osgeo.org/mapguide/ticket/828

Regards, Kenneth Skovhede, GEOGRAF A/S



Michael Kriese skrev:

Hello,

There's an error in
"Maestro/FusionEditor/CustomizedEditors/InvokeScript.cs". This will throw an
unchatched exception. I've attached a patch.

Regards,
Michael Kriese

http://n2.nabble.com/file/n2218944/InvokeScript.diff InvokeScript.diff 
  

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


[mapguide-users] Maestro Error: Widget InvokeScript

2009-01-26 Thread Michael Kriese

Hello,

There's an error in
"Maestro/FusionEditor/CustomizedEditors/InvokeScript.cs". This will throw an
unchatched exception. I've attached a patch.

Regards,
Michael Kriese

http://n2.nabble.com/file/n2218944/InvokeScript.diff InvokeScript.diff 
-- 
View this message in context: 
http://n2.nabble.com/Maestro-Error%3A-Widget-InvokeScript-tp2218944p2218944.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] Second instance

2009-01-26 Thread Kenneth Skovhede, GEOGRAF A/S
If you have two different services running, you can exchange packages 
between them.
Physical machine location is irrelevant, but most users have seperate 
machines.


MapGuide is fairly demanding on memory and CPU power, so I would not 
recommend
running more than one instance on each machine. Installation and 
configuration of the

second service is also quite a pain.

Regards, Kenneth Skovhede, GEOGRAF A/S



Atika Irfan skrev:



Yes, you can create a package on one machine, and then load it on
another machine.
that means we cant have both instances with different IP's on the
same machine ?



___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
  
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] Second instance

2009-01-26 Thread Atika Irfan
 Yes, you can create a package on one machine, and then load it on another
> machine.
> that means we cant have both instances with different IP's on the same
> machine ?
>
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] Second instance

2009-01-26 Thread Kenneth Skovhede, GEOGRAF A/S
Yes, you can create a package on one machine, and then load it on 
another machine.

You can use the Site Administrator web interface or Maestro.

If you use Maestro, there is a bug regarding packages in the released 
version 1.0.9,

so be sure to use the preview release.

Regards, Kenneth Skovhede, GEOGRAF A/S



Atika Irfan skrev:

Hi everyone,
I am confused about a simple thing... if i have a intranet application 
on mapserver & i am trying to make a similiar public internet 
application (with slight changes ofcource)..then do i need to reload 
everylayer like rasters, vector , DB connections or i can just simply 
copy the package for the new instance.

i hope someone can guide me
thanks 



___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
  
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


[mapguide-users] Second instance

2009-01-26 Thread Atika Irfan
Hi everyone,
I am confused about a simple thing... if i have a intranet application on
mapserver & i am trying to make a similiar public internet application (with
slight changes ofcource)..then do i need to reload everylayer like rasters,
vector , DB connections or i can just simply copy the package for the new
instance.
i hope someone can guide me
thanks
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


[mapguide-users] Ajax Viewer and Digitizing - may be a bug

2009-01-26 Thread Stefan Dalakov

Hi all,
I encountered a strange bug with the Ajax Viewer. I had a module for 
digitizing polygons, which was placed as InvokeURL command in the Task 
Pane. Now I transformed it to an InvokeScript command and it is started 
through the top toolbar as a part of a Flyout - drops down in a menu. 
The bug is that, when I click on this dropdown menu to activate the 
DigitizePolygon function, the first vertex of the polygon is 
automatically placed where I have clicked to activate the function - the 
point on the map that was behind the menu. My workaround in this 
situation is to fire an alert box, displaying a message, which clears 
the buffer and then everything goes like expected.
Has any body noticed such an effect / defect / bug? Is it possible to be 
a bug in my code ?

The behavior is the same in IE, FFox and Safari
It is MGOS 2.02


Stefan Dalakov



___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] SetSpatialFilter and MgFeatureSpatialOperations problem with search

2009-01-26 Thread Kenneth Skovhede, GEOGRAF A/S

Hi Maciej.

I have seen cases where the first record of the datasource is returned 
no matter what the query is.

You are likely seeing a different problem, but now you know :).

In the pretty picture you have drawn, the lower part shows the parcel 
(with the number three), which
clearly touches the yellow parcel. AFAIK, there is no direct spatial 
operation that allows you to
select only the grey one. You can however calculate the area of which 
the two polygons overlap,
and filter out the yellow, based on overlapped area. You can choose to 
discard polygon with
a very smal overlapping area, or only select the one with the largest 
overlapping area.


Is there a problem with only selecting parcels that intersect the actual 
point the user clicked on?


If you are actually using the point, you are likely using the OGR 
provider, and having this problem:

http://trac.osgeo.org/fdo/ticket/343

Regards, Kenneth Skovhede, GEOGRAF A/S



Maciej Skorczewski skrev:

Hi

my problem is with "SetSpatialFilter" , in my application user click 
on PARCEL (on map) , and after click on "get REGION name" application 
should try to search in which REGION (biger surface) is the PARCEL.



what i want to get is:

help image :)
http://img171.imageshack.us/img171/8450/51030812fq1.png

so when user click on small parcel (in grey REGION), first pictures he 
should get ID of big grey REGION.


i you see on second image if parcel is nearly yellow REGION user 
should  get ID ONLY  grey  region 



I try use all method like:

MgFeatureSpatialOperations::Intersects

it is work but i get all REGION who Intersects my parcel (yellow and 
grey  region ), after try another MgFeatureSpatialOperations like:


MgFeatureSpatialOperations::Contains = 0
MgFeatureSpatialOperations::CoveredBy = 8
MgFeatureSpatialOperations::Crosses = 1
MgFeatureSpatialOperations::Disjoint = 2
MgFeatureSpatialOperations::EnvelopeIntersects = 10
MgFeatureSpatialOperations::Equals = 3
MgFeatureSpatialOperations::Inside = 9
MgFeatureSpatialOperations::Intersects = 4
MgFeatureSpatialOperations::Overlaps = 5
MgFeatureSpatialOperations::Touches = 6
MgFeatureSpatialOperations::Within = 7


but get wrong/or none results

That is may procedure
1. user click on map
2. he press button "REGION info"
3. application use Getselection method to get selected parcel info: 
ID,NAME, and x,y Coordinates

4. I create new polygon (Coordinates come from selected parcel)
5. i use SetSpatialFilter and by iteration on all map layer i  check
what layer is in selected polygon range (REGION).



//my code
$selectedFeatures2=array(); //REGION ID,NAME etc.
//$coords -- come from selected parcel (GetCoordinates())

//generate new polygon from selected parcel
$linearRing = $geometryFactory->CreateLinearRing($coords);
$parcel_polygon = $geometryFactory->CreatePolygon($linearRing, null);
$resourceService=$siteConnection->CreateService(MgServiceType::ResourceService); 




///BEGIN layer iteration...on all map layer


$layer = $map->GetLayers()->GetItem($layer_name[$i]);
$resId = new MgResourceIdentifier($layer->GetFeatureSourceId());
$featureGeometry = $layer->GetFeatureGeometryName();
$featureClass = $layer->GetFeatureClassName();
$schemaAndClass = explode(":", $featureClass);
$featureService 
=$siteConnection->CreateService(MgServiceType::FeatureService);

$queryOptions = new MgFeatureQueryOptions();
$queryOptions->SetSpatialFilter($featureGeometry,
$polygon,MgFeatureSpatialOperations::Intersects);


$featureReader = $featureService->SelectFeatures($resId, 
$layer->GetFeatureClassName(), $queryOptions);

while ($featureReader->ReadNext())
{ 
$selectedFeatures2[]=array("layer_name"=>$featureReader->GetString('Layer'),"FeatureId"=>$featureReader->GetInt32('FeatureId')); 


}



///END layer iteration...on all map layer








Can you pleas give me some sample code for this?





macieksk
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] dot net samples as given in the document

2009-01-26 Thread Peter Filip

http://mapguide.osgeo.org/download/releases/2.0.x-samples 

http://augiru.augi.com/content/library/au07/data/paper/DE111-3.pdf

-- 
View this message in context: 
http://n2.nabble.com/dot-net-samples-as-given-in-the-document-tp2212323p2216674.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users