[mapguide-users] Opening different weblayouts in one session

2009-04-16 Thread clarkie342

I have two tabs in one of my application pages. I am trying to open 2 different 
layouts in each tab so the user can switch between tabs for the different maps.
When I load the page the map in the currently selected tab loads well but the 
map in the second tab does not display correctly i.e the legend and tool bar is 
loaded but the map extents and zoom is not correct.
Also this map does not respond to any toolbar actions. 

Is there a reason why it is doing this? Any solutions/workarounds? Thanks.

-- 
View this message in context: 
http://n2.nabble.com/Opening-different-weblayouts-in-one-session-tp2643323p2643323.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] Load Layer Definition XML

2009-03-09 Thread clarkie342

I have couple of questions regarding use of Maestro API

 when using Maestro API, am I technically replacing MGE Web Tier API?

 Should I be replacing 

MapGuideApi.MgInitializeWebTier(CommonUtilities.configPath)
Dim userInfo As MgUserInformation = New MgUserInformation(session)
Dim Mysiteconn As MgSiteConnection = New MgSiteConnection()
Mysiteconn.Open(userInfo)

with

conn = New LocalNativeConnection(webconfig.ini, username, password, en)
or do I still need both?

Thanks. 


Kenneth Skovhede, GEOGRAF A/S wrote:
 
 Yes, I run it with MGE 2009.
 
 Regards, Kenneth Skovhede, GEOGRAF A/S
 
 
 
 clarkie342 skrev:
 Hi,

 Does MaestroAPI work with Mapguide Enterprise?
 Thanks.


 wordsy wrote:
   
 Thanks for the quick response.  It was exactly what I needed.

 Cheers!


 Kenneth Skovhede, GEOGRAF A/S wrote:
 
 If you want to modify the layer xml, you just read the xml like this:

 MgByteReader rd = resourceSrvc.GetResource(new 
 MgResourceIdentifier(Library://layer.LayerDefinition));

 If you want to work seriously with layerdefinitions (and the MapGuide 
 xml), I have created the MaestroAPI,
 which lets you manipulate classes instead of xml:
 http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI

 Using the MaestroAPI, you can just do:
 LayerDefinition ldef = 
 con.GetLayerDefinition(Library://layer.LayerDefinition);
 VectorLayerDefinition vldef = ldef.Item as VectorLayerDefinition;
 foreach(VectorScaleRangeType vsr in vldef.ScaleRanges)
 foreach(object o in vsr.Item)
if (o is PointTypeStyleType)
   ; //Layer has points
else if (o is LineTypeStyleType)
   ; //Layer has lines
else if (o is AreaTypeStyleType)
   ; //Layer has polygons


 Also, changing a style is easy, eg:
 PointTypeStyleType point = vldef.ScaleRanges[0].Item[0] as 
 PointTypeStyleType;
 p.PointRule[0].Label.BackgroundColor = System.Drawing.Color.Red;

 Then save:
 con.SaveResource(ldef);

 All is fully intellisense supported in VS.


 Regards, Kenneth Skovhede, GEOGRAF A/S



 wordsy skrev:
   
 Hey Everyone;

 Fairly new to MGOS.

 Here is what I am trying to do.  

 I have a map with many Layers.  One of my requirements is to allow
 users
 to
 be able to change the layer styles via a web wizard.  The user will be
 able
 to adjust certain styles for line/point/polygon (surface).  Ie font,
 symbol,
 line thickness, color etc.

 Already my site allows a user to select the layer they want to change,
 then
 change the styles for a point only.  The changing doesn't seem to be a
 problem right now.

 The problem I have:

 Once a user selects the layer they want to load.  How would I get the
 layer
 and use XML document or XPATH or something to allow the users edit XML
 nodes.

 Here is my code that checks to see what layer type I have when the
 user
 selects the layer.  I have 3 different user controls (one for line,
 one
 for
 poly, one for line).  What I really want, is to load the layer and
 populate
 the appropriate controls inside the user control.

  MgSiteConnection conn = InitializeGisWebTier();
 string resource = Library://MUNICIPALITIES/ +
 Municipality
 +
 /2_DATA/ + LayerName + .FeatureSource;

 MgResourceService svc =
 (MgResourceService)conn.CreateService(MgServiceType.ResourceService );

 // Populate some values that we will need.
 MgResourceIdentifier resourceId = new
 MgResourceIdentifier(resource);  
 MgFeatureReader featureReader =
 LayerDefinitionFactory.MakeAFeatureReader(conn, resourceId);  
   
 
 // Find out what type of Geometric property the
 FeatureSource we
 uploaded has.
 string geometricPropertyType =
 LayerDefinitionFactory.GetFeatureSourceGeometricPropertyType(featureReader);

 switch (geometricPropertyType)
 {
 case SURFACE:
 // We load the Polygon usercontrol
 this.phStylizeLayerControl.Controls.Add(new
 PolygonStyleBuilder());
 break;
 case POINT:
 // we load the point usercontrol
 //this.phStylizeLayerControl.Controls.Add(new
 PointStyleBuilder());
 PointStyleBuilder control =
 (PointStyleBuilder)LoadControl(~/Pages/Controls/PointStyleBuilder.ascx);
 this.phStylizeLayerControl.Controls.Add(control);
 txtSymbol.Enabled = true;
 txtSymbolSize.Enabled = true;
 break;
 case CURVE:
 // we load the line user control
 this.phStylizeLayerControl.Controls.Add(new
 LineStyleBuilder());
 break;
 }

 Thanks for any help in advance.
   
 
 ___
 mapguide-users mailing list
 mapguide-users@lists.osgeo.org
 http

Re: [mapguide-users] Load Layer Definition XML

2009-03-02 Thread clarkie342

Hi,

Does MaestroAPI work with Mapguide Enterprise?
Thanks.


wordsy wrote:
 
 Thanks for the quick response.  It was exactly what I needed.
 
 Cheers!
 
 
 Kenneth Skovhede, GEOGRAF A/S wrote:
 
 If you want to modify the layer xml, you just read the xml like this:
 
 MgByteReader rd = resourceSrvc.GetResource(new 
 MgResourceIdentifier(Library://layer.LayerDefinition));
 
 If you want to work seriously with layerdefinitions (and the MapGuide 
 xml), I have created the MaestroAPI,
 which lets you manipulate classes instead of xml:
 http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI
 
 Using the MaestroAPI, you can just do:
 LayerDefinition ldef = 
 con.GetLayerDefinition(Library://layer.LayerDefinition);
 VectorLayerDefinition vldef = ldef.Item as VectorLayerDefinition;
 foreach(VectorScaleRangeType vsr in vldef.ScaleRanges)
 foreach(object o in vsr.Item)
if (o is PointTypeStyleType)
   ; //Layer has points
else if (o is LineTypeStyleType)
   ; //Layer has lines
else if (o is AreaTypeStyleType)
   ; //Layer has polygons
 
 
 Also, changing a style is easy, eg:
 PointTypeStyleType point = vldef.ScaleRanges[0].Item[0] as 
 PointTypeStyleType;
 p.PointRule[0].Label.BackgroundColor = System.Drawing.Color.Red;
 
 Then save:
 con.SaveResource(ldef);
 
 All is fully intellisense supported in VS.
 
 
 Regards, Kenneth Skovhede, GEOGRAF A/S
 
 
 
 wordsy skrev:
 Hey Everyone;

 Fairly new to MGOS.

 Here is what I am trying to do.  

 I have a map with many Layers.  One of my requirements is to allow users
 to
 be able to change the layer styles via a web wizard.  The user will be
 able
 to adjust certain styles for line/point/polygon (surface).  Ie font,
 symbol,
 line thickness, color etc.

 Already my site allows a user to select the layer they want to change,
 then
 change the styles for a point only.  The changing doesn't seem to be a
 problem right now.

 The problem I have:

 Once a user selects the layer they want to load.  How would I get the
 layer
 and use XML document or XPATH or something to allow the users edit XML
 nodes.

 Here is my code that checks to see what layer type I have when the user
 selects the layer.  I have 3 different user controls (one for line, one
 for
 poly, one for line).  What I really want, is to load the layer and
 populate
 the appropriate controls inside the user control.

  MgSiteConnection conn = InitializeGisWebTier();
 string resource = Library://MUNICIPALITIES/ + Municipality
 +
 /2_DATA/ + LayerName + .FeatureSource;

 MgResourceService svc =
 (MgResourceService)conn.CreateService(MgServiceType.ResourceService );

 // Populate some values that we will need.
 MgResourceIdentifier resourceId = new
 MgResourceIdentifier(resource);  
 MgFeatureReader featureReader =
 LayerDefinitionFactory.MakeAFeatureReader(conn, resourceId);
 
 
 // Find out what type of Geometric property the
 FeatureSource we
 uploaded has.
 string geometricPropertyType =
 LayerDefinitionFactory.GetFeatureSourceGeometricPropertyType(featureReader);

 switch (geometricPropertyType)
 {
 case SURFACE:
 // We load the Polygon usercontrol
 this.phStylizeLayerControl.Controls.Add(new
 PolygonStyleBuilder());
 break;
 case POINT:
 // we load the point usercontrol
 //this.phStylizeLayerControl.Controls.Add(new
 PointStyleBuilder());
 PointStyleBuilder control =
 (PointStyleBuilder)LoadControl(~/Pages/Controls/PointStyleBuilder.ascx);
 this.phStylizeLayerControl.Controls.Add(control);
 txtSymbol.Enabled = true;
 txtSymbolSize.Enabled = true;
 break;
 case CURVE:
 // we load the line user control
 this.phStylizeLayerControl.Controls.Add(new
 LineStyleBuilder());
 break;
 }

 Thanks for any help in advance.
   
 ___
 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/Load-Layer-Definition-XML-tp2199703p2410796.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


[mapguide-users] Working with state plane data in Mapguide studio

2009-02-05 Thread clarkie342

I have some data in State Plane coordinate system (AL83-EF) in a AutoCAD dwg.
I exported this data to SDF and opened in Mapguide Stuiod, data does not
show up in the layer preview.
Exporting it to shp and opening it in Arcmap works fine. Any ideas?
Thanks.
-- 
View this message in context: 
http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp2277697p2277697.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] Working with state plane data in Mapguide studio

2009-02-05 Thread clarkie342

I am using Autodesk 2009. so its File-Convert DWG to Autodesk SDF option.
Publish to mapguide option seems to create dwf instead of SDF. I need sdf. 
The coordinate system seems to be ok since it works well with shp in Arcmap.
It is assigned and the right coordinate system is detected during the
export. 
Here is a sample sdf. Thanks.



Andy Morsell wrote:
 
 It's probably a coordinate system issue.  Have you assigned the proper
 coordinate system to the DWG project itself as well as specify it when you
 export?  Which version of Autodesk Map are you using?  Are you using the
 Map-Tools-Export to Autodesk MapGuide option or are you using the
 Publish
 to MapGuide option?  
 
 Andy Morsell, P.E.
 Spatial Integrators, Inc.
 www.SpatialGIS.com
 
 
 -Original Message-
 From: mapguide-users-boun...@lists.osgeo.org
 [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of clarkie342
 Sent: Thursday, February 05, 2009 2:25 PM
 To: mapguide-users@lists.osgeo.org
 Subject: [mapguide-users] Working with state plane data in Mapguide studio
 
 
 I have some data in State Plane coordinate system (AL83-EF) in a AutoCAD
 dwg.
 I exported this data to SDF and opened in Mapguide Stuiod, data does not
 show up in the layer preview.
 Exporting it to shp and opening it in Arcmap works fine. Any ideas?
 Thanks.
 -- 
 View this message in context:
 http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp2277
 697p2277697.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
 
 ___
 mapguide-users mailing list
 mapguide-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapguide-users
 
 
http://n2.nabble.com/file/n2278016/boundary.zip boundary.zip 
-- 
View this message in context: 
http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp2277697p2278016.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] Working with state plane data in Mapguide studio

2009-02-05 Thread clarkie342

I see the feature when I export it to shp and open it in arcmap. 
attached in another layer from the DWG which shows up in Civil 3D but is
distorted in Mapguide studio. It also does not let me select features or
zoom properly. 



Mark Pendergraft wrote:
 
 Odd, that file shows no features in Civil 3D or in MapGuide Studio 2009.
 What do you see when you open it in ArcMap?
 
 -Original Message-
 From: mapguide-users-boun...@lists.osgeo.org
 [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of clarkie342
 Sent: Thursday, February 05, 2009 3:13 PM
 To: mapguide-users@lists.osgeo.org
 Subject: RE: [mapguide-users] Working with state plane data in Mapguide
 studio
 
 
 I am using Autodesk 2009. so its File-Convert DWG to Autodesk SDF
 option.
 Publish to mapguide option seems to create dwf instead of SDF. I need
 sdf. 
 The coordinate system seems to be ok since it works well with shp in
 Arcmap.
 It is assigned and the right coordinate system is detected during the
 export. 
 Here is a sample sdf. Thanks.
 
 
 
 Andy Morsell wrote:
 
 It's probably a coordinate system issue.  Have you assigned the proper
 coordinate system to the DWG project itself as well as specify it when
 you
 export?  Which version of Autodesk Map are you using?  Are you using
 the
 Map-Tools-Export to Autodesk MapGuide option or are you using the
 Publish
 to MapGuide option?  
 
 Andy Morsell, P.E.
 Spatial Integrators, Inc.
 www.SpatialGIS.com
 
 
 -Original Message-
 From: mapguide-users-boun...@lists.osgeo.org
 [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of
 clarkie342
 Sent: Thursday, February 05, 2009 2:25 PM
 To: mapguide-users@lists.osgeo.org
 Subject: [mapguide-users] Working with state plane data in Mapguide
 studio
 
 
 I have some data in State Plane coordinate system (AL83-EF) in a
 AutoCAD
 dwg.
 I exported this data to SDF and opened in Mapguide Stuiod, data does
 not
 show up in the layer preview.
 Exporting it to shp and opening it in Arcmap works fine. Any ideas?
 Thanks.
 -- 
 View this message in context:

 http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp
 2277
 697p2277697.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
 
 ___
 mapguide-users mailing list
 mapguide-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapguide-users
 
 
 http://n2.nabble.com/file/n2278016/boundary.zip boundary.zip 
 -- 
 View this message in context:
 http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp
 2277697p2278016.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
 ___
 mapguide-users mailing list
 mapguide-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapguide-users
 
 
http://n2.nabble.com/file/n2278132/Facility.zip Facility.zip 
-- 
View this message in context: 
http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp2277697p2278132.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] Working with state plane data in Mapguide studio

2009-02-05 Thread clarkie342

hmm weird! I have studio 2009. 
This is a snap shot of how is shows on my studio, this is the lower left
corner of my screen...I cannot pan the map anymore, the features disappear.
When I open the sdf in Civil 3D they show up fine. 
Note how the features have a slope in the screenshot, thats not how the
features actually are. 


Mark Pendergraft wrote:
 
 Okay, the Facility.sdf shows up in Civil 3d and in MapGuide Studio.  I
 can select features and I can zoom in as well.
 I've had trouble exporting features using Civil 3D in the past, it's
 tricker than it looks.
 What is distorted about the feature in MapGuide Studio?  What version of
 MapGuide Studio do you have?
 -Mark
 
 -Original Message-
 From: mapguide-users-boun...@lists.osgeo.org
 [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of clarkie342
 Sent: Thursday, February 05, 2009 3:44 PM
 To: mapguide-users@lists.osgeo.org
 Subject: RE: [mapguide-users] Working with state plane data in Mapguide
 studio
 
 
 I see the feature when I export it to shp and open it in arcmap. 
 attached in another layer from the DWG which shows up in Civil 3D but is
 distorted in Mapguide studio. It also does not let me select features or
 zoom properly. 
 
 
 
 Mark Pendergraft wrote:
 
 Odd, that file shows no features in Civil 3D or in MapGuide Studio
 2009.
 What do you see when you open it in ArcMap?
 
 -Original Message-
 From: mapguide-users-boun...@lists.osgeo.org
 [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of
 clarkie342
 Sent: Thursday, February 05, 2009 3:13 PM
 To: mapguide-users@lists.osgeo.org
 Subject: RE: [mapguide-users] Working with state plane data in
 Mapguide
 studio
 
 
 I am using Autodesk 2009. so its File-Convert DWG to Autodesk SDF
 option.
 Publish to mapguide option seems to create dwf instead of SDF. I need
 sdf. 
 The coordinate system seems to be ok since it works well with shp in
 Arcmap.
 It is assigned and the right coordinate system is detected during the
 export. 
 Here is a sample sdf. Thanks.
 
 
 
 Andy Morsell wrote:
 
 It's probably a coordinate system issue.  Have you assigned the
 proper
 coordinate system to the DWG project itself as well as specify it
 when
 you
 export?  Which version of Autodesk Map are you using?  Are you using
 the
 Map-Tools-Export to Autodesk MapGuide option or are you using the
 Publish
 to MapGuide option?  
 
 Andy Morsell, P.E.
 Spatial Integrators, Inc.
 www.SpatialGIS.com
 
 
 -Original Message-
 From: mapguide-users-boun...@lists.osgeo.org
 [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of
 clarkie342
 Sent: Thursday, February 05, 2009 2:25 PM
 To: mapguide-users@lists.osgeo.org
 Subject: [mapguide-users] Working with state plane data in Mapguide
 studio
 
 
 I have some data in State Plane coordinate system (AL83-EF) in a
 AutoCAD
 dwg.
 I exported this data to SDF and opened in Mapguide Stuiod, data does
 not
 show up in the layer preview.
 Exporting it to shp and opening it in Arcmap works fine. Any ideas?
 Thanks.
 -- 
 View this message in context:


 http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp
 2277
 697p2277697.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
 
 ___
 mapguide-users mailing list
 mapguide-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapguide-users
 
 
 http://n2.nabble.com/file/n2278016/boundary.zip boundary.zip 
 -- 
 View this message in context:

 http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp
 2277697p2278016.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
 ___
 mapguide-users mailing list
 mapguide-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapguide-users
 
 
 http://n2.nabble.com/file/n2278132/Facility.zip Facility.zip 
 -- 
 View this message in context:
 http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp
 2277697p2278132.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
 ___
 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/Working-with-state-plane-data-in-Mapguide-studio-tp2277697p2278221.html
Sent from the MapGuide Users mailing list archive at Nabble.com

RE: [mapguide-users] Working with state plane data in Mapguide studio

2009-02-05 Thread clarkie342

oops forgot the screenshot...here it is...


clarkie342 wrote:
 
 hmm weird! I have studio 2009. 
 This is a snap shot of how is shows on my studio, this is the lower left
 corner of my screen...I cannot pan the map anymore, the features
 disappear. When I open the sdf in Civil 3D they show up fine. 
 Note how the features have a slope in the screenshot, thats not how the
 features actually are. 
 
 
 Mark Pendergraft wrote:
 
 Okay, the Facility.sdf shows up in Civil 3d and in MapGuide Studio.  I
 can select features and I can zoom in as well.
 I've had trouble exporting features using Civil 3D in the past, it's
 tricker than it looks.
 What is distorted about the feature in MapGuide Studio?  What version of
 MapGuide Studio do you have?
 -Mark
 
 -Original Message-
 From: mapguide-users-boun...@lists.osgeo.org
 [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of clarkie342
 Sent: Thursday, February 05, 2009 3:44 PM
 To: mapguide-users@lists.osgeo.org
 Subject: RE: [mapguide-users] Working with state plane data in Mapguide
 studio
 
 
 I see the feature when I export it to shp and open it in arcmap. 
 attached in another layer from the DWG which shows up in Civil 3D but is
 distorted in Mapguide studio. It also does not let me select features or
 zoom properly. 
 
 
 
 Mark Pendergraft wrote:
 
 Odd, that file shows no features in Civil 3D or in MapGuide Studio
 2009.
 What do you see when you open it in ArcMap?
 
 -Original Message-
 From: mapguide-users-boun...@lists.osgeo.org
 [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of
 clarkie342
 Sent: Thursday, February 05, 2009 3:13 PM
 To: mapguide-users@lists.osgeo.org
 Subject: RE: [mapguide-users] Working with state plane data in
 Mapguide
 studio
 
 
 I am using Autodesk 2009. so its File-Convert DWG to Autodesk SDF
 option.
 Publish to mapguide option seems to create dwf instead of SDF. I need
 sdf. 
 The coordinate system seems to be ok since it works well with shp in
 Arcmap.
 It is assigned and the right coordinate system is detected during the
 export. 
 Here is a sample sdf. Thanks.
 
 
 
 Andy Morsell wrote:
 
 It's probably a coordinate system issue.  Have you assigned the
 proper
 coordinate system to the DWG project itself as well as specify it
 when
 you
 export?  Which version of Autodesk Map are you using?  Are you using
 the
 Map-Tools-Export to Autodesk MapGuide option or are you using the
 Publish
 to MapGuide option?  
 
 Andy Morsell, P.E.
 Spatial Integrators, Inc.
 www.SpatialGIS.com
 
 
 -Original Message-
 From: mapguide-users-boun...@lists.osgeo.org
 [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of
 clarkie342
 Sent: Thursday, February 05, 2009 2:25 PM
 To: mapguide-users@lists.osgeo.org
 Subject: [mapguide-users] Working with state plane data in Mapguide
 studio
 
 
 I have some data in State Plane coordinate system (AL83-EF) in a
 AutoCAD
 dwg.
 I exported this data to SDF and opened in Mapguide Stuiod, data does
 not
 show up in the layer preview.
 Exporting it to shp and opening it in Arcmap works fine. Any ideas?
 Thanks.
 -- 
 View this message in context:


 http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp
 2277
 697p2277697.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
 
 ___
 mapguide-users mailing list
 mapguide-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapguide-users
 
 
 http://n2.nabble.com/file/n2278016/boundary.zip boundary.zip 
 -- 
 View this message in context:

 http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp
 2277697p2278016.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
 ___
 mapguide-users mailing list
 mapguide-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapguide-users
 
 
 http://n2.nabble.com/file/n2278132/Facility.zip Facility.zip 
 -- 
 View this message in context:
 http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp
 2277697p2278132.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
 ___
 mapguide-users mailing list
 mapguide-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapguide-users
 
 
 
 
http://n2.nabble.com/file/n2278254/studio.jpg 
-- 
View this message in context: 
http://n2.nabble.com/Working-with-state-plane-data

RE: [mapguide-users] Working with state plane data in Mapguide studio

2009-02-05 Thread clarkie342

Sorry, did not know the diff. Thought might as well use the Insert Image
button :)


Jason Birch wrote:
 
 Please no :)
 
 If you're using Nabble, you can attach a file to a message and mailing
 list users will get a URL to click on, but otherwise please put file
 attachments somewhere web-accessible and send a pointer to the list.
 Sending files to the mailing list has unfortunate bandwidth and server
 load implications.
 
 Jason
 
 -Original Message-
 From: Mark Pendergraft
 Subject: RE: [mapguide-users] Working with state plane data in Mapguide
 studio
 
 Zip the SDF file and send it to the mailing list.
 ___
 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/Working-with-state-plane-data-in-Mapguide-studio-tp2277697p2278375.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] Working with state plane data in Mapguide studio

2009-02-05 Thread clarkie342

Could you send a screenshot of what you see in Studio? Just want to make sure
it looks ok, that way I know my studio is doing something since we both have
the same sdf. Thanks.



Mark Pendergraft wrote:
 
 Okay, the Facility.sdf shows up in Civil 3d and in MapGuide Studio.  I
 can select features and I can zoom in as well.
 I've had trouble exporting features using Civil 3D in the past, it's
 tricker than it looks.
 What is distorted about the feature in MapGuide Studio?  What version of
 MapGuide Studio do you have?
 -Mark
 
 -Original Message-
 From: mapguide-users-boun...@lists.osgeo.org
 [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of clarkie342
 Sent: Thursday, February 05, 2009 3:44 PM
 To: mapguide-users@lists.osgeo.org
 Subject: RE: [mapguide-users] Working with state plane data in Mapguide
 studio
 
 
 I see the feature when I export it to shp and open it in arcmap. 
 attached in another layer from the DWG which shows up in Civil 3D but is
 distorted in Mapguide studio. It also does not let me select features or
 zoom properly. 
 
 
 
 Mark Pendergraft wrote:
 
 Odd, that file shows no features in Civil 3D or in MapGuide Studio
 2009.
 What do you see when you open it in ArcMap?
 
 -Original Message-
 From: mapguide-users-boun...@lists.osgeo.org
 [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of
 clarkie342
 Sent: Thursday, February 05, 2009 3:13 PM
 To: mapguide-users@lists.osgeo.org
 Subject: RE: [mapguide-users] Working with state plane data in
 Mapguide
 studio
 
 
 I am using Autodesk 2009. so its File-Convert DWG to Autodesk SDF
 option.
 Publish to mapguide option seems to create dwf instead of SDF. I need
 sdf. 
 The coordinate system seems to be ok since it works well with shp in
 Arcmap.
 It is assigned and the right coordinate system is detected during the
 export. 
 Here is a sample sdf. Thanks.
 
 
 
 Andy Morsell wrote:
 
 It's probably a coordinate system issue.  Have you assigned the
 proper
 coordinate system to the DWG project itself as well as specify it
 when
 you
 export?  Which version of Autodesk Map are you using?  Are you using
 the
 Map-Tools-Export to Autodesk MapGuide option or are you using the
 Publish
 to MapGuide option?  
 
 Andy Morsell, P.E.
 Spatial Integrators, Inc.
 www.SpatialGIS.com
 
 
 -Original Message-
 From: mapguide-users-boun...@lists.osgeo.org
 [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of
 clarkie342
 Sent: Thursday, February 05, 2009 2:25 PM
 To: mapguide-users@lists.osgeo.org
 Subject: [mapguide-users] Working with state plane data in Mapguide
 studio
 
 
 I have some data in State Plane coordinate system (AL83-EF) in a
 AutoCAD
 dwg.
 I exported this data to SDF and opened in Mapguide Stuiod, data does
 not
 show up in the layer preview.
 Exporting it to shp and opening it in Arcmap works fine. Any ideas?
 Thanks.
 -- 
 View this message in context:


 http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp
 2277
 697p2277697.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
 
 ___
 mapguide-users mailing list
 mapguide-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapguide-users
 
 
 http://n2.nabble.com/file/n2278016/boundary.zip boundary.zip 
 -- 
 View this message in context:

 http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp
 2277697p2278016.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
 ___
 mapguide-users mailing list
 mapguide-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapguide-users
 
 
 http://n2.nabble.com/file/n2278132/Facility.zip Facility.zip 
 -- 
 View this message in context:
 http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp
 2277697p2278132.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
 ___
 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/Working-with-state-plane-data-in-Mapguide-studio-tp2277697p2278488.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] Working with state plane data in Mapguide studio

2009-02-05 Thread clarkie342

That looks just fine..
I have service pack installed. I also tried from another machine with
studio, it did not work there either. May be its something with the
Enterprise version assuming you are using Open Source...atleast I know its
not the data. Thanks.


Mark Pendergraft wrote:
 
 here are the pictures.
 
 do you have the service pack for MapGuide Studio 2009?
 if you don't, the first thing i would do is download it and see if you
 continue to have problems.
 
 http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112id=12004228linkID=9242219
 
  http://n2.nabble.com/file/n2278544/facility%2B1.jpg 
 http://n2.nabble.com/file/n2278544/facilities%2B2.jpg 
 

-- 
View this message in context: 
http://n2.nabble.com/Working-with-state-plane-data-in-Mapguide-studio-tp2277697p2279822.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] Problems with selection

2009-01-15 Thread clarkie342

I was using RegisterClientScriptBlock in code-behind to set the selectionxml
to the mapframe. This was not working so I changed my logic to do
clientcallback so now I am setting the selectionxml in the aspx page itself.
this seems to work. 

Not sure why the difference. sorry did not get a chance to test the below
scenerio.
Thanks for the response. 


Mark Pendergraft wrote:
 
 What about zooming to the feature using the maps Zoom to selection
 method:
 
 ExecuteMapAction(10);
 
 Does the map zoom to the correct feature?  Is it highlighted afterwards?
 
 -Mark P.
 
 -Original Message-
 From: mapguide-users-boun...@lists.osgeo.org
 [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of clarkie342
 Sent: Monday, January 12, 2009 11:33 AM
 To: mapguide-users@lists.osgeo.org
 Subject: RE: [mapguide-users] Problems with selection
 
 
 Is there a solution to the initial issue here? I came across the same
 thing
 but I do not have any joins in the feature source.
 Here is the javascript that I have to update the selection. 
 
 var selectionXml =
 document.getElementById(ctl00_ContentPlaceHolder1_hfSelectXml).getAttr
 ibute(value);
 var mapFrame =
 document.getElementById(viewerFrame).contentWindow.GetMapFrame();
 
 mapFrame.SetSelectionXML(selectionXml);
 mapFrame.Refresh(); 
 
 the status bar shows 1 feature selected but no feature is highlighted. I
 also tried manual refresh of the map(from context menu) that did not
 highlight the selected features either. Appreciate any help.
 Thanks.
 
 
 Andy Morsell wrote:
 
 Yes, it does say that a feature is selected.  Technically, it still is
 since
 the selection object exists on the server and is not disposed of when
 you
 turn the layer off.  This is most likely by design and I find it would
 probably be more desirable than not to have that selection object
 reappear
 when the layer is turned back on if it was the last thing I had
 selected.
 If you want to clear the selection, even when the layer is turned off,
 you
 can use the Clear Selection through the interface or programmatically.
  
 
 Andy 
 
 
   _  
 
 From: Butler, Juan P [mailto:jpbut...@co.pinellas.fl.us] 
 Sent: Thursday, April 20, 2006 11:05 AM
 To: us...@mapguide.osgeo.org
 Subject: RE: [mapguide-users] Problems with selection
 
 
 Thanks Andy.
  
 Check to see on the status bar if it states that an object is selected
 when
 the layer is turned off.  My highlight goes away, but the map still
 has an
 object selected.
  
 - Juan
 
   _  
 
 From: Andy Morsell [mailto:amors...@spatialgis.com]
 Sent: Thu 4/20/2006 1:16 PM
 To: us...@mapguide.osgeo.org
 Subject: RE: [mapguide-users] Problems with selection
 
 
 I am seeing the same thing in regards to the joined feature (polygons
 joined
 to Access) not highlighting when selected but the attributes do show
 up in
 the Properties pane.  I am also seeing some general weirdness with
 this
 layer.  If I turn it off in the legend, it does not turn off on the
 map (a
 request to the server does not occur) until I select an object.
 Panning
 and
 zooming aren't forcing the refresh.  I suspect these are related
 issues
 and
 the refresh flag is getting stuck when interacting with these types of
 layers.
  
 I don't see the same thing as you in the second case.  If I select an
 object
 and it highlights and then turn off that layer, the highlight turns
 off as
 well.  When that layer is turned back on, the highlight also
 reappears.
  
 
 Andy Morsell, P.E. 
 Spatial Integrators, Inc. 
 http://www.SpatialGIS.com  
 
  
 
 
   _  
 
 From: Butler, Juan P [mailto:jpbut...@co.pinellas.fl.us] 
 Sent: Thursday, April 20, 2006 9:36 AM
 To: us...@mapguide.osgeo.org
 Subject: RE: [mapguide-users] Problems with selection
 
 
 
 Some more observations...
  
 It seems that when I select my parcel layer that is tied to my Access
 database, the highlight feature doesn't work.  When I switch over to
 use
 just the layer that is based strictly on the sdf file, the
 highlighting
 works.  So I guess it has something to do with layers that are tied to
 an
 Access database.  Can someone else please try this and let me know if
 they
 are seeing this?
  
 Also, when I select a feature and then turn of the layer of the
 selected
 feature, the feature seems to still be selected.  Odd.   
  
 FYI: I'm using the AJAXViewer
  
 - Juan
 
   _  
 
 From: Butler, Juan P
 Sent: Thu 4/20/2006 12:05 PM
 To: us...@mapguide.osgeo.org
 Subject: [mapguide-users] Problems with selection
 
 
 Has anyone experienced problems with features not highlighting after
 selection?  The data appears in the Properties frame, but the feature
 isn't
 highlighted.  Plus, the bottom of the map states 1 feature selected.
 It's
 only on my parcel polygon layer.   My other polygon layers select and
 highlight fine.  Weird.
  
 Another thing I noticed was when I had a feature selected from this
 layer,
 if I

RE: [mapguide-users] Tooltip Issues in Internet Explorer

2009-01-15 Thread clarkie342

Attached is a screenshot of my tooltip. Its a custom tooltip with a table.
Is there a way to remove the top space and bottom space from the tooltip
box? This seems to be static and is not coming from my table. Here is my
tooltip expression

concat(concat(concat(concat(concat(concat(concat(concat(concat(concat(
concat(concat('divtable border=1 style=font-family:Times New Roman;
font-size:smaller; border-collapse:collapse; border-style:solidtrtd
style=background-color:#C0C0C0Installation:/tdtd
style=background-color:#FF',tblFacilities_Installation),'/td/trtrtd
style=background-color:#C0C0C0Facility Number:/tdtd
style=background-color:#FF'), Facility_Number ),'/td/trtrtd
style=background-color:#C0C0C0Facility Type:/tdtd
style=background-color:#FF'), tblFacilities_FacType
),'/td/trtrtd style=background-color:#C0C0C0RPA UID:/tdtd
style=background-color:#FF'), tblFacilities_RPAUID
),'/td/trtrtd style=background-color:#C0C0C0Primary Use:/tdtd
style=background-color:#FF'), tblFacilities_Primary_Use
),'/td/trtrtd style=background-color:#C0C0C0Primary Cat.
Code:/tdtd style=background-color:#FF'),
tblFacilities_Primary_CatCode ),'/td/tr/table/div')

Thanks for any help.



Alain Lebatard wrote:
 
 Andy,
 
  
 
 The fact that it works in Studio is puzzling as Studio uses IE for the
 previews. It's then a side-effect with IE as a standalone browser.
 
  
 
 I'll look into this problem. 
 
  
 
 Alain
 
  
 
   _  
 
 From: Andy Morsell [mailto:amors...@spatialgis.com] 
 Sent: Friday, June 02, 2006 3:31 PM
 To: us...@mapguide.osgeo.org
 Subject: RE: [mapguide-users] Tooltip Issues in Internet Explorer
 
  
 
 It also works perfectly well in the Studio preview window, so I don't
 think it's the way we are referencing the images.  My implementation is
 very similar to yours and my referenced .aspx page returns an image
 programmatically via Response.ContentType = image/jpeg;  In IE, if I
 hold my mouse over the feature for long enough, it might flash 3 or 4
 times (sometimes seeing the returned image flash in the contents as
 well) and then it settles down and displays.  But most of the time it
 just flashes.  I can tell that each one of those flashes the web
 surround is calling the embedded page over and over, however.  Like I
 said, I think this will be easy for Autodesk to replicate by just
 plugging in the below   tag into a layer tooltip and loading the map
 in IE.  
 
  
 
 Andy 
 
   _  
 
 From: Butler, Juan P [mailto:jpbut...@co.pinellas.fl.us] 
 Sent: Friday, June 02, 2006 1:16 PM
 To: us...@mapguide.osgeo.org
 Subject: RE: [mapguide-users] Tooltip Issues in Internet Explorer
 
 Yep...Works great in Firefox.   So you see the IE issue?  Just flashes.
 Maybe it's with the way they are pushing out the image.
 
  
 
 I'm going to try one of my .NET pages that pushes out an image.
 Hopefully, that will work better.
 
  
 
 Thanks Andy.
 
  
 
 - Juan
 
  
 
   _  
 
 From: Andy Morsell [mailto:amors...@spatialgis.com] 
 Sent: Friday, June 02, 2006 3:28 PM
 To: us...@mapguide.osgeo.org
 Subject: RE: [mapguide-users] Tooltip Issues in Internet Explorer
 
  
 
 Juan,
 
 By removing the double-quotes around the URL, it works fine.  I just
 tried it by assigning: 
 http://www3.fdle.state.fl.us/sexual_predators/GetImage.asp?fin=25109 '
 border=0 width=52 height=59.  to one of
 my layers tooltip so it displays that for every object.  I still see the
 Internet Explorer weirdness, however.  At least it should make testing
 that problem easy for Autodesk ... 
 
 Andy 
 
   _  
 
 From: Butler, Juan P [mailto:jpbut...@co.pinellas.fl.us] 
 Sent: Friday, June 02, 2006 12:03 PM
 To: us...@mapguide.osgeo.org
 Subject: RE: [mapguide-users] Tooltip Issues in Internet Explorer
 
 Andy:
 
  
 
 So you reference a page like me when trying to bring the images...
 
  
 
 In my tool tip, I have'
 http://www3.fdle.state.fl.us/sexual_predators/GetImage.asp?fin=2510
95 '
 
  border=0 width=52 height=59'
 
  
 
 This should bring back the image, but it's not.   Can you pass along how
 you are putting the code in the tool tip?   Maybe I'm doing something
 wrong.You're using Enterprise version of Mapguide OS?
 
  
 
 - Juan
 
  
 
   _  
 
 From: Andy Morsell [mailto:amors...@spatialgis.com] 
 Sent: Friday, June 02, 2006 2:37 PM
 To: us...@mapguide.osgeo.org
 Subject: RE: [mapguide-users] Tooltip Issues in Internet Explorer
 
  
 
 Juan,
 
 Yes, the image are on that server and are rendered from the full-size
 images on-the-fly to a .NET thumbnail image.  This image is created by
 an ASP.NET page that the tooltip references while passing the parcel ID.
 I use the exact same page calls in Google Maps and Google Earth and it
 works incredibly well.  I am actually amazed at how fast .NET is at this
 on-the-fly image processing.  You can see the Google Earth
 implementation here:
 http://mapguide.spatialgis.com/mapguide/GoogleEarthDemo/.  I don't have
 all of the images for the County loaded 

RE: [mapguide-users] Problems with selection

2009-01-15 Thread clarkie342

This selection is trigger from my grid control event so I could not put the
script in OnLoad(). All my non-mapguide stuff works with
RegisterClientScriptBlock so not sure whats up with this. 



Mark Pendergraft wrote:
 
 Yeah, I've always had issues with the RegisterClientScriptBlock in my
 pages so I've always just added a onLoad() javascript function to the
 body of my aspx page and then run my script from there.
 -Mark
 
 -Original Message-
 From: mapguide-users-boun...@lists.osgeo.org
 [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of clarkie342
 Sent: Thursday, January 15, 2009 10:56 AM
 To: mapguide-users@lists.osgeo.org
 Subject: RE: [mapguide-users] Problems with selection
 
 
 I was using RegisterClientScriptBlock in code-behind to set the
 selectionxml
 to the mapframe. This was not working so I changed my logic to do
 clientcallback so now I am setting the selectionxml in the aspx page
 itself.
 this seems to work. 
 
 Not sure why the difference. sorry did not get a chance to test the
 below
 scenerio.
 Thanks for the response. 
 
 
 Mark Pendergraft wrote:
 
 What about zooming to the feature using the maps Zoom to selection
 method:
 
 ExecuteMapAction(10);
 
 Does the map zoom to the correct feature?  Is it highlighted
 afterwards?
 
 -Mark P.
 
 -Original Message-
 From: mapguide-users-boun...@lists.osgeo.org
 [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of
 clarkie342
 Sent: Monday, January 12, 2009 11:33 AM
 To: mapguide-users@lists.osgeo.org
 Subject: RE: [mapguide-users] Problems with selection
 
 
 Is there a solution to the initial issue here? I came across the same
 thing
 but I do not have any joins in the feature source.
 Here is the javascript that I have to update the selection. 
 
 var selectionXml =

 document.getElementById(ctl00_ContentPlaceHolder1_hfSelectXml).getAttr
 ibute(value);
 var mapFrame =
 document.getElementById(viewerFrame).contentWindow.GetMapFrame();
 
 mapFrame.SetSelectionXML(selectionXml);
 mapFrame.Refresh(); 
 
 the status bar shows 1 feature selected but no feature is highlighted.
 I
 also tried manual refresh of the map(from context menu) that did not
 highlight the selected features either. Appreciate any help.
 Thanks.
 
 
 Andy Morsell wrote:
 
 Yes, it does say that a feature is selected.  Technically, it still
 is
 since
 the selection object exists on the server and is not disposed of when
 you
 turn the layer off.  This is most likely by design and I find it
 would
 probably be more desirable than not to have that selection object
 reappear
 when the layer is turned back on if it was the last thing I had
 selected.
 If you want to clear the selection, even when the layer is turned
 off,
 you
 can use the Clear Selection through the interface or
 programmatically.
  
 
 Andy 
 
 
   _  
 
 From: Butler, Juan P [mailto:jpbut...@co.pinellas.fl.us] 
 Sent: Thursday, April 20, 2006 11:05 AM
 To: us...@mapguide.osgeo.org
 Subject: RE: [mapguide-users] Problems with selection
 
 
 Thanks Andy.
  
 Check to see on the status bar if it states that an object is
 selected
 when
 the layer is turned off.  My highlight goes away, but the map still
 has an
 object selected.
  
 - Juan
 
   _  
 
 From: Andy Morsell [mailto:amors...@spatialgis.com]
 Sent: Thu 4/20/2006 1:16 PM
 To: us...@mapguide.osgeo.org
 Subject: RE: [mapguide-users] Problems with selection
 
 
 I am seeing the same thing in regards to the joined feature (polygons
 joined
 to Access) not highlighting when selected but the attributes do show
 up in
 the Properties pane.  I am also seeing some general weirdness with
 this
 layer.  If I turn it off in the legend, it does not turn off on the
 map (a
 request to the server does not occur) until I select an object.
 Panning
 and
 zooming aren't forcing the refresh.  I suspect these are related
 issues
 and
 the refresh flag is getting stuck when interacting with these types
 of
 layers.
  
 I don't see the same thing as you in the second case.  If I select an
 object
 and it highlights and then turn off that layer, the highlight turns
 off as
 well.  When that layer is turned back on, the highlight also
 reappears.
  
 
 Andy Morsell, P.E. 
 Spatial Integrators, Inc. 
 http://www.SpatialGIS.com  
 
  
 
 
   _  
 
 From: Butler, Juan P [mailto:jpbut...@co.pinellas.fl.us] 
 Sent: Thursday, April 20, 2006 9:36 AM
 To: us...@mapguide.osgeo.org
 Subject: RE: [mapguide-users] Problems with selection
 
 
 
 Some more observations...
  
 It seems that when I select my parcel layer that is tied to my Access
 database, the highlight feature doesn't work.  When I switch over to
 use
 just the layer that is based strictly on the sdf file, the
 highlighting
 works.  So I guess it has something to do with layers that are tied
 to
 an
 Access database.  Can someone else please try this and let me know if
 they
 are seeing

RE: [mapguide-users] Problems with selection

2009-01-12 Thread clarkie342

Is there a solution to the initial issue here? I came across the same thing
but I do not have any joins in the feature source.
Here is the javascript that I have to update the selection. 

var selectionXml =
document.getElementById(ctl00_ContentPlaceHolder1_hfSelectXml).getAttribute(value);
var mapFrame =
document.getElementById(viewerFrame).contentWindow.GetMapFrame();
mapFrame.SetSelectionXML(selectionXml);
mapFrame.Refresh(); 

the status bar shows 1 feature selected but no feature is highlighted. I
also tried manual refresh of the map(from context menu) that did not
highlight the selected features either. Appreciate any help.
Thanks.


Andy Morsell wrote:
 
 Yes, it does say that a feature is selected.  Technically, it still is
 since
 the selection object exists on the server and is not disposed of when you
 turn the layer off.  This is most likely by design and I find it would
 probably be more desirable than not to have that selection object reappear
 when the layer is turned back on if it was the last thing I had selected.
 If you want to clear the selection, even when the layer is turned off, you
 can use the Clear Selection through the interface or programmatically.
  
 
 Andy 
 
 
   _  
 
 From: Butler, Juan P [mailto:jpbut...@co.pinellas.fl.us] 
 Sent: Thursday, April 20, 2006 11:05 AM
 To: us...@mapguide.osgeo.org
 Subject: RE: [mapguide-users] Problems with selection
 
 
 Thanks Andy.
  
 Check to see on the status bar if it states that an object is selected
 when
 the layer is turned off.  My highlight goes away, but the map still has an
 object selected.
  
 - Juan
 
   _  
 
 From: Andy Morsell [mailto:amors...@spatialgis.com]
 Sent: Thu 4/20/2006 1:16 PM
 To: us...@mapguide.osgeo.org
 Subject: RE: [mapguide-users] Problems with selection
 
 
 I am seeing the same thing in regards to the joined feature (polygons
 joined
 to Access) not highlighting when selected but the attributes do show up in
 the Properties pane.  I am also seeing some general weirdness with this
 layer.  If I turn it off in the legend, it does not turn off on the map (a
 request to the server does not occur) until I select an object.  Panning
 and
 zooming aren't forcing the refresh.  I suspect these are related issues
 and
 the refresh flag is getting stuck when interacting with these types of
 layers.
  
 I don't see the same thing as you in the second case.  If I select an
 object
 and it highlights and then turn off that layer, the highlight turns off as
 well.  When that layer is turned back on, the highlight also reappears.
  
 
 Andy Morsell, P.E. 
 Spatial Integrators, Inc. 
 http://www.SpatialGIS.com  
 
  
 
 
   _  
 
 From: Butler, Juan P [mailto:jpbut...@co.pinellas.fl.us] 
 Sent: Thursday, April 20, 2006 9:36 AM
 To: us...@mapguide.osgeo.org
 Subject: RE: [mapguide-users] Problems with selection
 
 
 
 Some more observations...
  
 It seems that when I select my parcel layer that is tied to my Access
 database, the highlight feature doesn't work.  When I switch over to use
 just the layer that is based strictly on the sdf file, the highlighting
 works.  So I guess it has something to do with layers that are tied to an
 Access database.  Can someone else please try this and let me know if they
 are seeing this?
  
 Also, when I select a feature and then turn of the layer of the selected
 feature, the feature seems to still be selected.  Odd.   
  
 FYI: I'm using the AJAXViewer
  
 - Juan
 
   _  
 
 From: Butler, Juan P
 Sent: Thu 4/20/2006 12:05 PM
 To: us...@mapguide.osgeo.org
 Subject: [mapguide-users] Problems with selection
 
 
 Has anyone experienced problems with features not highlighting after
 selection?  The data appears in the Properties frame, but the feature
 isn't
 highlighted.  Plus, the bottom of the map states 1 feature selected.  It's
 only on my parcel polygon layer.   My other polygon layers select and
 highlight fine.  Weird.
  
 Another thing I noticed was when I had a feature selected from this layer,
 if I go to zoom out or pan, the map locks up and does nothing unless I
 unselect the feature.  
  
 - Juan
 
 

-- 
View this message in context: 
http://n2.nabble.com/Problems-with-selection-tp1804059p2147489.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] OnSelection Event?

2009-01-09 Thread clarkie342

After posting my question I did find a reference to the sample you have sent
below. It was well explained, but it did not work with my code. So I tried
to add it to the HEAD of the dotnetviewersample.aspx. It did not work
their either.

The problem with my code as I noticed is this javascript is not able to get
a reference to my viewer frame.
As I mentioned I am using an iframe with id 'viewerFrame'. My app uses
master pages and this iframe is inside a contentplaceholder. I also tried

document.getElementById(“viewerFrame”).contentWindow.GetMapFrame();

came back as object not found. Am I working with the right issues or is it
all supposed to work irrespective of the frame type? Thanks for any help.


Jackie Ng wrote:
 
 This is javascript code that hooks onto events from the viewer frame. 
 
 So the code should go in the page that launches the viewer frame.
 
 A more detailed explaination here:
 http://trac.osgeo.org/mapguide/wiki/CodeSamples/JavaScript/AJAXViewerEventHooking
 
 - Jackie
 
 
 clarkie342 wrote:
 
 Hi Jason,
 
 I am trying to implement your suggestion below to make use of the
 OnSelectionChanged Event Handler in mainframe.templ
 I have a asp.net page with iframe showing a mapguide map. I want to be
 able to do bunch of things when the user selects features on this map. 
 I am not very clear on how you are implementing your SelectionChanged
 function instead of the original one. Where should this script go?
 Appreciate your help.
 
 Thanks
 
 
 Jason Birch wrote:
 
  
 There is an OnSelectionChanged function in the main frame, but it
 doesn't appear to be documented.
  
 I've just tried playing around with this, and I got the following to
 work when inserted into the head of the ajaxviewersample.php file.  It
 does not appear to work with the DWF viewer; maybe why it's not
 documented?  Or it could just be that my code is bad :)
  
 script type=text/javascript 
   
 var originalOnSelectionChanged;
 var initTimer = setInterval(watchInitialized, 200);
 
 function watchInitialized () {
  try {
   if(ViewerFrame.mapFrame.mapInit) 
 {
clearInterval(initTimer);
originalOnSelectionChanged = ViewerFrame.OnSelectionChanged;
ViewerFrame.OnSelectionChanged = MyOnSelectionChangedHandler;
 }
}
catch(Exception) {}
 }
 
 function MyOnSelectionChangedHandler() {
originalOnSelectionChanged ();
var mapFrame = ViewerFrame.GetMapFrame();
selCount = mapFrame.GetSelectedCount();
alert(Selected:  + selCount);
 }
  
 /script
 
  
 
 
 
 From: Willem Schwarte [mailto:wil...@giskit.nl]
 Subject: [mapguide-users] OnSelection Event?
 
 
 I suppose there is no onSelectionChanged event like in MG6.5. So this
 would be done on a onClick? Where would I put the code for this?
 
  
 
 
  
 -
 To unsubscribe, e-mail: users-unsubscr...@mapguide.osgeo.org
 For additional commands, e-mail: users-h...@mapguide.osgeo.org
 
 
 
 
 

-- 
View this message in context: 
http://n2.nabble.com/OnSelection-Event--tp1804304p2134359.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] OnSelection Event?

2009-01-09 Thread clarkie342

iframe does not have a name attribute, has a id attribute instead. 
Here is the modified code that is working for me

script type=text/javascript
var origOnSelectionChanged = null;
function MySelectionHandler(){
origOnSelectionChanged();
var mapFrame =
document.getElementById(viewerFrame).contentWindow.GetMapFrame();
var count = mapFrame.GetSelectedCount();
alert(count +  features selected);
}
window.onload = function(){
var timer;
var watch = function(){
try {
var mapFrame =
document.getElementById(viewerFrame).contentWindow.GetMapFrame();
if(mapFrame.mapInit){
clearInterval(timer);
origOnSelectionChanged =
mapFrame.parent.OnSelectionChanged;
mapFrame.parent.OnSelectionChanged =
MySelectionHandler;
}
}
catch(e) {
}
};
timer = setInterval(watch, 200);
};
/script

document.getElementById(viewerFrame).contentWindow - this returned
Window
ajaxviewer.aspx?SESSION=86381ee6---8000-001ec9fcf959_en_90C340330AF20AF10AF0WEBLAYOUT=Library:///x//xxx.WebLayout
 
and this is the only way I was able to get a reference to GetMapFrame()
function. 

document.getElementById(viewerFrame).contentWindow.GetMapFrame() - this
returned
Window
mapframe.aspx?MAPDEFINITION=Library%3a%2f%2f%2f%2fMap%2f.MapDefinitionTYPE=HTMLSHOWLEGEND=0SHOWPROP=0INFOWIDTH=0LOCALE=enHLTGT=1HLTGTNAME=SHOWSLIDER=1SESSION=11fc683c--1000-8000-001ec9fcf959_en_90C340330AF20AF10AF0

also I had to use .parent to get OnSelectionChanged Event.

Out of curiosity, I also tried this in dotnetviewersample.aspx. It worked.
There I can replace document.getElementById(viewerFrame).contentWindow
with viewerFrame.contentWindow. Looks like this is a difference between
iframe and Frameset.

Thanks for the responses. 
-


Jackie Ng wrote:
 
 you can't use document.getElementById() to access frames, you have to
 reference the frame with a variable of the same name, and your
 frame/iframe must have its name attribute defined
 
 - Jackie 
 
 
 clarkie342 wrote:
 
 After posting my question I did find a reference to the sample you have
 sent below. It was well explained, but it did not work with my code. So I
 tried to add it to the HEAD of the dotnetviewersample.aspx. It did not
 work their either.
 
 The problem with my code as I noticed is this javascript is not able to
 get a reference to my viewer frame.
 As I mentioned I am using an iframe with id 'viewerFrame'. My app uses
 master pages and this iframe is inside a contentplaceholder. I also tried
 
 document.getElementById(“viewerFrame”).contentWindow.GetMapFrame();
 
 came back as object not found. Am I working with the right issues or is
 it all supposed to work irrespective of the frame type? Thanks for any
 help.
 
 
 Jackie Ng wrote:
 
 This is javascript code that hooks onto events from the viewer frame. 
 
 So the code should go in the page that launches the viewer frame.
 
 A more detailed explaination here:
 http://trac.osgeo.org/mapguide/wiki/CodeSamples/JavaScript/AJAXViewerEventHooking
 
 - Jackie
 
 
 clarkie342 wrote:
 
 Hi Jason,
 
 I am trying to implement your suggestion below to make use of the
 OnSelectionChanged Event Handler in mainframe.templ
 I have a asp.net page with iframe showing a mapguide map. I want to be
 able to do bunch of things when the user selects features on this map. 
 I am not very clear on how you are implementing your SelectionChanged
 function instead of the original one. Where should this script go?
 Appreciate your help.
 
 Thanks
 
 
 Jason Birch wrote:
 
  
 There is an OnSelectionChanged function in the main frame, but it
 doesn't appear to be documented.
  
 I've just tried playing around with this, and I got the following to
 work when inserted into the head of the ajaxviewersample.php file. 
 It does not appear to work with the DWF viewer; maybe why it's not
 documented?  Or it could just be that my code is bad :)
  
 script type=text/javascript 
   
 var originalOnSelectionChanged;
 var initTimer = setInterval(watchInitialized, 200);
 
 function watchInitialized () {
  try {
   if(ViewerFrame.mapFrame.mapInit) 
 {
clearInterval(initTimer);
originalOnSelectionChanged = ViewerFrame.OnSelectionChanged;
ViewerFrame.OnSelectionChanged = MyOnSelectionChangedHandler;
 }
}
catch(Exception) {}
 }
 
 function MyOnSelectionChangedHandler() {
originalOnSelectionChanged ();
var mapFrame = ViewerFrame.GetMapFrame();
selCount = mapFrame.GetSelectedCount();
alert(Selected:  + selCount);
 }
  
 /script
 
  
 
 
 
 From: Willem Schwarte [mailto:wil...@giskit.nl]
 Subject: [mapguide-users

RE: [mapguide-users] OnSelection Event?

2009-01-08 Thread clarkie342

Hi Jason,

I am trying to implement your suggestion below to make use of the
OnSelectionChanged Event Handler in mainframe.templ
I have a asp.net page with iframe showing a mapguide map. I want to be able
to do bunch of things when the user selects features on this map. 
I am not very clear on how you are implementing your SelectionChanged
function instead of the original one. Where should this script go?
Appreciate your help.

Thanks


Jason Birch wrote:
 
  
 There is an OnSelectionChanged function in the main frame, but it doesn't
 appear to be documented.
  
 I've just tried playing around with this, and I got the following to work
 when inserted into the head of the ajaxviewersample.php file.  It does
 not appear to work with the DWF viewer; maybe why it's not documented?  Or
 it could just be that my code is bad :)
  
 script type=text/javascript 
   
 var originalOnSelectionChanged;
 var initTimer = setInterval(watchInitialized, 200);
 
 function watchInitialized () {
  try {
   if(ViewerFrame.mapFrame.mapInit) 
 {
clearInterval(initTimer);
originalOnSelectionChanged = ViewerFrame.OnSelectionChanged;
ViewerFrame.OnSelectionChanged = MyOnSelectionChangedHandler;
 }
}
catch(Exception) {}
 }
 
 function MyOnSelectionChangedHandler() {
originalOnSelectionChanged ();
var mapFrame = ViewerFrame.GetMapFrame();
selCount = mapFrame.GetSelectedCount();
alert(Selected:  + selCount);
 }
  
 /script
 
  
 
 
 
 From: Willem Schwarte [mailto:wil...@giskit.nl]
 Subject: [mapguide-users] OnSelection Event?
 
 
 I suppose there is no onSelectionChanged event like in MG6.5. So this
 would be done on a onClick? Where would I put the code for this?
 
  
 
 
  
 -
 To unsubscribe, e-mail: users-unsubscr...@mapguide.osgeo.org
 For additional commands, e-mail: users-h...@mapguide.osgeo.org
 

-- 
View this message in context: 
http://n2.nabble.com/OnSelection-Event--tp1804304p2129983.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