[OpenMap Users] obtain OMPoly from OMGraphic

From: Schumann B. <Benjamin.Schumann_at_soton.ac.uk>
Date: Tue, 26 Jul 2011 13:23:20 +0100

Hi,
I work in a program (AnyLogic) that uses OM to display shp-files. I want to access it to obtain details on lat/lon pairs of those shp-file-polygons.
I have slowly crawled forward and achieved to get a handle on a few things:
1: Access all layers from the map in use:
        Layers = myGisMap.getLayers();
2: access the objects at a specific point of a layer:
        oMGraphicList = layers[0].getObjects(map.getCenterLongitude(), map.getCenterLatitude());
3: access specific graphics from oMGraphicList:
        oMGraphic = oMGraphicList.getOMGraphicAt(0);

Now, if I execute "oMGraphic.getDescription()" I obtain this:
OMGraphicList with 1 OMGraphic
|--> OMGraphicList with 2 OMGraphics
     |--> OMPoly
     |--> OMPoly

So there appear to be OMPoly-objects within the oMGraphic-object. How can I access them? Apparantly, once I can access them, I will be able to extract all points of that polygon using "getXs()" or "getLatLonArray()", is that correct?

I would be extremely grateful for any advice, I hope I am nearly there.
Best wishes from Berlin

Benjamin Schumann
Tel.: 00493091149702
Mobil: 004915776816125
Institute for Complex Systems Simulation & Computational Engineering Design Group
School of Engineering Sciences
University of Southampton (UK)
Postal Address:
Damerowstrasse 43c
13187 Berlin
Germany

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Jul 26 2011 - 08:24:58 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:10 EDT