I need a java code sample to make the task easier?
I am tryin to follow a php sample, but I encounter difficulties to write it
in java.
Can you please translate this code into java. Thank you in advance.

$markup = array();
$resourceID = new MgResourceIdentifier("Library://exple/");
$byteReader = $resourceService->EnumerateResources($resourceID, 1,
"LayerDefinition");
$resourceListXML = $byteReader->ToString();
$doc = DOMDocument::loadXML($resourceListXML);
$nodeList = $doc->getElementsByTagName('ResourceId');
foreach ($nodeList as $node)
{
$resourceId = new MgResourceIdentifier($node->nodeValue);
$markup[$resourceId->ToString()] = $resourceId->GetName();



Kenneth, GEOGRAF A/S wrote:
> 
> Ok, but the calls are named the same for JSP.
> Basic steps are:
> 1. Load existing featuresource Xml
> 2. Modify and save in session repository
> 3. Load existing layerdefintion Xml
> 4. Modify and save in session repository (point to featuresource just 
> created)
> 5. Insert map into current runtime map
> 6. Refresh map on client.
> 
> If the datasource remains unchanged, it might be easier to have the 
> layer already in the map.
> The you can make the layer visible and possibly change the layer filter, 
> only in the runtime map.
> 
> You can use the task pane as a standard frame.
> Take a look at ea. the measureui.templ file to see how its done.
> 
> Use a custom action in the weblayout to load your page into the task 
> pane/frame.
> 
> Regards, Kenneth, GEOGRAF A/S
> 
> 
> 
> dorra2007 skrev:
>> * I want to create the point layer at run time as the user clics on the
>> map ,
>> (the problem is that in the manual there is only PHP examples)
>>
>> *I mean by "Integrate the code in the application", create an interface
>> (frame) for the user to allow him to chose the point style, name,
>> etc..(at
>> the right frame of mapguide opensource)
>> Usually using JSP and javascript
>>
>>
>> Kenneth, GEOGRAF A/S wrote:
>>   
>>> 1. There exists a JavaScript function called DigitzePoint(callback);
>>> Look in the manual for details.
>>>
>>> 2. If you want to do it runtime, look in the manual for an example.
>>> If you just want a permanent layer, get a hold of MapGuide Studio.
>>> To get PostGIS data, download and install the PostGIS provider.
>>>
>>> 3. What do you want to integrate it with?
>>> Links are usually created with the  ...   tags, but I don't 
>>> think thats what you mean.
>>>
>>> Regards, Kenneth, GEOGRAF A/S
>>>
>>>
>>>
>>> dorra2007 skrev:
>>>     
>>>> Hello all,
>>>> I am beginner in Mapguide and I would like to develop a geolocalization
>>>> application.
>>>>
>>>> My problem is :
>>>> How to create a JSP/JS file which allow a user to put a marker on the
>>>> map
>>>> when he clics on it.
>>>>
>>>> I think that the first step is to get the point coordinates which is
>>>> the
>>>> key
>>>> of the probelm, then store them in a postgis database (which is
>>>> relatively
>>>> simple to do), after that create a layer of points (from the postgis
>>>> database) and display the symbol in the appropriate place (difficult
>>>> task).
>>>>
>>>> If I summarize the problem:
>>>> 1-How to get the coordinate system of a point by listenning the mouse
>>>> event
>>>> (after a clic) (using JSP/JS)
>>>> 2-How to create a layer (from a postgis database) and display it (using
>>>> JSP/JS always).
>>>> 3-How to integrate my JSP/JS file in my application (create links
>>>> between
>>>> files)
>>>>
>>>> It's very important for me to resolve this problem.
>>>> If you have any suggestion, it's welcome. Thank you very much for your
>>>> help.
>>>>
>>>>
>>>>   
>>>>       
>>> _______________________________________________
>>> 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://www.nabble.com/How-to-get-programmatically-a-point-coordinates--tf4625319s16610.html#a13213379
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

Reply via email to