Re: [mapguide-users] asp.net example of loading a webmapservice layer

2009-03-04 Thread stoff

Hi Stefan,

thanks a lot for your information. That's a real good documentation ... 

Best regards,

Christoph



Stefan Dalakov wrote:
> 
> Steps to setup a wms are very well described here:
> https://trac.osgeo.org/fdo/wiki/FdoWmsNotes
> I have copied a portion of the configuration document for the
> featuresource
> You can use Maestro to attach a configuration document to your existing 
> featuresource
> 
> Stefan Dalakov
> 
> stoff wrote:
>> Hi Stefan,
>>
>> I only modify the Mapguide-Studio-generated-XML (look at my uploads
>> above)
>> of layerdefinition and featuresource. Which XML-File have you mentioned
>> and
>> how do you use it?
>>  I did it like this (without success):
>>
>> 
>>  
>> Library://WMS/hessen_Ortho.FeatureSource
>>  0.5
>>  WMS_Schema:DOP04F1
>>  Raster
>>  
>>  
>>  
>>  
>>  
>>  
>> FF00
>>  
>>  
>>  
>>  
>>  
>>  
>> 00FF
>>  
>>  
>>  
>>  1
>>  
>>  
>>
>>
>>   
> 
> ___
> 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/asp.net-example-of-loading-a-webmapservice-layer-tp2328300p2428031.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] asp.net example of loading a webmapservice layer

2009-03-04 Thread Stefan Dalakov

Steps to setup a wms are very well described here:
https://trac.osgeo.org/fdo/wiki/FdoWmsNotes
I have copied a portion of the configuration document for the featuresource
You can use Maestro to attach a configuration document to your existing 
featuresource


Stefan Dalakov

stoff wrote:

Hi Stefan,

I only modify the Mapguide-Studio-generated-XML (look at my uploads above)
of layerdefinition and featuresource. Which XML-File have you mentioned and
how do you use it?
 I did it like this (without success):



Library://WMS/hessen_Ortho.FeatureSource
0.5
WMS_Schema:DOP04F1
Raster






FF00






00FF



1




  


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


Re: [mapguide-users] asp.net example of loading a webmapservice layer

2009-03-04 Thread stoff

Hi Stefan,

I only modify the Mapguide-Studio-generated-XML (look at my uploads above)
of layerdefinition and featuresource. Which XML-File have you mentioned and
how do you use it?
 I did it like this (without success):



Library://WMS/hessen_Ortho.FeatureSource
0.5
WMS_Schema:DOP04F1
Raster






FF00






00FF



1




-- 
View this message in context: 
http://n2.nabble.com/asp.net-example-of-loading-a-webmapservice-layer-tp2328300p2421199.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] asp.net example of loading a webmapservice layer

2009-03-03 Thread Stefan Dalakov

First :
In my case it was enough to define it in the configuration file for the 
WMS datasource


 xmlns="http://fdowms.osgeo.org/schemas";>

   
 
   PNG
*true
*0xFF
   current
   0
   EPSG:32632
   
 
   
   
 
   
.


Stefan Dalakov

stoff wrote:

Hi,

I have a new and an old problem :

First I am still looking for a solution about transparency 
Do I have to configure it in the layerdefinition.xml AND in the called URL(

... ?service=wms&transparent=true)?

Second problem: 


Loading of the wms layer works fine. But in the legend.aspx
BuildLayerDeifinitionData-Function there is an encoding-problem in the row
"doc.LoadXML(layerDefString). He finds a char code 65279 as first Charakter
 strange, because loading of the layerdefinition works fine, and there
is no charakter like this in the xml-file ...
Is there a posibility to use explicitly UTF-8 Encoding within the mapguide
resource-classes?  



Best regards,

Christoph


  


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


Re: [mapguide-users] asp.net example of loading a webmapservice layer

2009-03-03 Thread stoff

Hi,

I have a new and an old problem :

First I am still looking for a solution about transparency 
Do I have to configure it in the layerdefinition.xml AND in the called URL(
... ?service=wms&transparent=true)?

Second problem: 

Loading of the wms layer works fine. But in the legend.aspx
BuildLayerDeifinitionData-Function there is an encoding-problem in the row
"doc.LoadXML(layerDefString). He finds a char code 65279 as first Charakter
 strange, because loading of the layerdefinition works fine, and there
is no charakter like this in the xml-file ...
Is there a posibility to use explicitly UTF-8 Encoding within the mapguide
resource-classes?  


Best regards,

Christoph


-- 
View this message in context: 
http://n2.nabble.com/asp.net-example-of-loading-a-webmapservice-layer-tp2328300p2414541.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] asp.net example of loading a webmapservice layer

2009-02-26 Thread stoff

Hi Kenneth,


your hint and this Example was helpfull. Thanks!!!

http://n2.nabble.com/How-to-add-WMS-%28Transparent%29-layer-to-MapGuide--tp1811263p1811263.html

Now I am looking for a solution about transparency ... puh!
Do I have to configure it in the layerdefinition.xml and in the called URL(
... ?service=wms&transparent=true)?


Best regards,

Christoph
-- 
View this message in context: 
http://n2.nabble.com/asp.net-example-of-loading-a-webmapservice-layer-tp2328300p2390734.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] asp.net example of loading a webmapservice layer

2009-02-19 Thread miansi

1. Follow this link
http://www.webrade.com/blogs/darrin/2008/05/16/CreatingNETObjectsForMapguideXMLSchemaDefinitionsXSDUsingLINQ.aspx

this will give you intellisence support for all MGOS schemas.

2. I am adding layer to the map this way:
/// 
/// Add new layer to MG repository and to the map
/// 
/// Layer name
/// Layer legend label
/// Layer group name
/// Layer group legend label
/// Layer (of type point) attributes to populate with
/// SQL table (or View) column list
public void AddPointLayerDef2Map(
String layerName
, String layerLegendLabel
, String groupName
, String groupLegendLabel
, LayerPointAttributes attributes
, DataTable dbColumns)
{
// Get or set the resourceid of the map to load
MgResourceIdentifier resourceMap = new
MgResourceIdentifier(this.Attributes.MgMapName);
// Define a new resourseLayer
MgResourceIdentifier resourseLayer = new
MgResourceIdentifier(this.Attributes.MgLayerName(layerName, groupName));
// Create our connection to the resource service
MgResourceService resourceService =
(MgResourceService)this.MgConn.CreateService(MgServiceType.ResourceService);
// Get new Layer XML
String xmlLayer = Spatial.Helper.GetLayerXml(attributes,
dbColumns);
// Save it
// TODO: AS: I think we have to use UpdateResource in case layer
already exists on the map.
// Confirm and update logic
resourceService.SetResource(resourseLayer, new
MgByteReader(xmlLayer, MgMimeType.Xml), null);

// TODO: Check if there is map available and if not:
// 1. Create map
// 2. Create layer
// Get updated map XML
String xmlMap = Spatial.Helper.GetMapXml(
resourceService
, resourceMap
, resourseLayer
, layerName
, layerLegendLabel
, groupName
, groupLegendLabel);
// Save it
resourceService.SetResource(resourceMap, new
MgByteReader(xmlMap, MgMimeType.Xml), null);

}

Two classes participating in:

http://n2.nabble.com/file/n2355204/Helper.cs Helper.cs 
http://n2.nabble.com/file/n2355204/MgController.cs MgController.cs 



Let me know if that is what you looking for.


Regards

stoff wrote:
> 
> Hi,
> 
> the devGuide gives an example of adding layers to a map in php.
> Has anybody an comparable example in asp.net?
> I want to load an ogc-wms into the map by loading an existing 
> layer.definition.xml to a resource and add the resource to the
> map. The xml-file can by generated for example by the mapguide
> studio ...
> 
> Thanks a lot,
> 
> stoff
> 
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/asp.net-example-of-loading-a-webmapservice-layer-tp2328300p2355204.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] asp.net example of loading a webmapservice layer

2009-02-19 Thread Kenneth Skovhede, GEOGRAF A/S

Not sure what goes wrong, but "Nothing" or "null" is the right value.
The MgDbXml exception should write an entry in the log file, stating 
what the value is.


Regards, Kenneth Skovhede, GEOGRAF A/S



stoff skrev:

Thanks Kenneth, thanks Dave for your Hints.

Here is my effort. In line 139 I get an error, cause I don't know what to
pass as header-parameter in objMGResourceService.SetResource(). In PHP it is
null, in asp.net nothing does not work (MgDbXMLException). I tried to load
the given temp.layerDefinition.xml.

Do you know any examples on loading ogc stuff like catalogservices, wms,
layers ... ?

http://n2.nabble.com/file/n2352287/ogc_services.aspx.vb ogc_services.aspx.vb 
http://n2.nabble.com/file/n2352287/temp.FeatureSource.xml
temp.FeatureSource.xml 
http://n2.nabble.com/file/n2352287/temp.LayerDefinition.xml
temp.LayerDefinition.xml 


Looking forward to a solution,

stoff
  

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


RE: [mapguide-users] asp.net example of loading a webmapservice layer

2009-02-19 Thread stoff

Thanks Kenneth, thanks Dave for your Hints.

Here is my effort. In line 139 I get an error, cause I don't know what to
pass as header-parameter in objMGResourceService.SetResource(). In PHP it is
null, in asp.net nothing does not work (MgDbXMLException). I tried to load
the given temp.layerDefinition.xml.

Do you know any examples on loading ogc stuff like catalogservices, wms,
layers ... ?

http://n2.nabble.com/file/n2352287/ogc_services.aspx.vb ogc_services.aspx.vb 
http://n2.nabble.com/file/n2352287/temp.FeatureSource.xml
temp.FeatureSource.xml 
http://n2.nabble.com/file/n2352287/temp.LayerDefinition.xml
temp.LayerDefinition.xml 

Looking forward to a solution,

stoff
-- 
View this message in context: 
http://n2.nabble.com/asp.net-example-of-loading-a-webmapservice-layer-tp2328300p2352287.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] asp.net example of loading a webmapservice layer

2009-02-17 Thread Dave Wilson
I'm not a coder per se, but if your code sample is small enough the following 
page might give you a good starting point:

http://www.me-u.com/php-asp/

It converts php script to asp .NET. Of course I assume you will have a fair bit 
of debugging to do after the fact, but it might do most of the major syntax 
leaps for you.

Dave

From: mapguide-users-boun...@lists.osgeo.org 
[mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of Kenneth Skovhede, 
GEOGRAF A/S
Sent: Monday, February 16, 2009 1:08 AM
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] asp.net example of loading a webmapservice layer

The API is the same for .Net.
If you remove all the $ signs, it should be easy to convert to .Net.

If you post the snip of code here, perhaps someone will show you how to do it.

A layer interaction example in .Net, using the MaestroAPI can be found here:
http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/samples/ModifyLayerFilter


Regards, Kenneth Skovhede, GEOGRAF A/S


stoff skrev:
Hi, the devGuide gives an example of adding layers to a map in php. Has anybody 
an comparable example in asp.net? I want to load an ogc-wms into the map by 
loading an existing layer.definition.xml to a resource and add the resource to 
the map. The xml-file can by generated for example by the mapguide studio ... 
Thanks a lot, stoff

View this message in context: asp.net example of loading a webmapservice 
layer<http://n2.nabble.com/asp.net-example-of-loading-a-webmapservice-layer-tp2328300p2328300.html>
Sent from the MapGuide Users mailing list 
archive<http://n2.nabble.com/MapGuide-Users-f1803227.html> at Nabble.com.














___

mapguide-users mailing list

mapguide-users@lists.osgeo.org<mailto: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] asp.net example of loading a webmapservice layer

2009-02-16 Thread Kenneth Skovhede, GEOGRAF A/S

The API is the same for .Net.
If you remove all the $ signs, it should be easy to convert to .Net.

If you post the snip of code here, perhaps someone will show you how to 
do it.


A layer interaction example in .Net, using the MaestroAPI can be found here:
http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/samples/ModifyLayerFilter

Regards, Kenneth Skovhede, GEOGRAF A/S



stoff skrev:
Hi, the devGuide gives an example of adding layers to a map in php. 
Has anybody an *comparable example in asp.net*? I want to load an 
ogc-wms into the map by loading an existing layer.definition.xml to a 
resource and add the resource to the map. The xml-file can by 
generated for example by the mapguide studio ... Thanks a lot, stoff


View this message in context: asp.net example of loading a 
webmapservice layer 

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


[mapguide-users] asp.net example of loading a webmapservice layer

2009-02-14 Thread stoff

Hi,

the devGuide gives an example of adding layers to a map in php.
Has anybody an comparable example in asp.net?
I want to load an ogc-wms into the map by loading an existing 
layer.definition.xml to a resource and add the resource to the
map. The xml-file can by generated for example by the mapguide
studio ...

Thanks a lot,

stoff


-- 
View this message in context: 
http://n2.nabble.com/asp.net-example-of-loading-a-webmapservice-layer-tp2328300p2328300.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