Hexagon Geospatial
MENU

Shared Samples

WebGIS enables powerful geospatial web applications and services that securely share your organization’s rich geospatial data, and provides tools to deeply examine spatial data and create value added products, on demand.
Showing results for 
Search instead for 
Do you mean 

WebMap API Code Sample

by Technical Evangelist on ‎10-16-2015 05:56 AM - edited on ‎03-20-2017 05:48 AM by Technical Evangelist (3,369 Views)

Introduction

GeoMedia WebMap API brings programming toolkit for web page authors. It is a web-server based software product that works in conjunction with web server software, such as ASP.NET with Visual Basic or C#. You can also use any scripting language, such as JScript, JavaScript, or Perl (public domain), that supports Microsoft COM object creation and manipulation.. Other web server products and scripting technologies are supported if they support the Windows COM+ programming model (used to access the WebMap objects).

GeoMedia WebMap Automation Model

GeoMedia WebMap contains many automated objects. The volume of automated objects makes it both very powerful and very overwhelming. In order to better understand the objects, let's quickly review the automation diagram:

WebMapAPI.png

GeoMedia Web Map exposes a COM object called the MapServer Manager. This object is the entry point to the map-creation process. The object is a system service that provides a queuing mechanism for requests to the MapServer objects. The service should always be running in order to service requests by your GeoMedia Web Map Web sites. The MapServer object is used directly for the map creation.

To create a map you must first get a MapServer Manager object, then request a Map Server, and then set the output properties of your desired map.

Essential Objects

Legend

The Legend object manages the display of data and offers no user interface. The legend contains a collection of legend entries. The order of the legend entries controls the display priority of the data. A recordset object (GRecordset) is associated with each legend entry. Additionally, a style defines the visual characteristics of the data associated with the legend entry. Each legend entry object responds to similar properties and methods.

Coordinate Systems

The CoordSystems Manager is the primary object governing all activities associated with the coordinate system. The CoordSystem member object defines characteristics of a particular GIS coordinate system. These characteristics include the storage resolution and range, as well as ties to the projection, geographic, geocentric, and paper reference spaces.

GDO

In GeoMedia, most all operations center on data access. GDO is the hub of that access. We use the recordset as the primary medium for communication between software components. All data servers support the GDO interface for accessing definition information and data.

Geometry

A GIS system without geometric data is like a fish out of water. GIS applications present and analyze spatial data. The geometry objects are the visualization of that spatial data. The server defines the geometric data storage. In traditional applications like FRAMME and MGE, the storage was in binary files. In the PostGIS, MS SQL and Oracle servers, the storage is as coordinate values in the relational database. Through GDO, all servers provide the geometric data in a binary (blob) format. To operate more effectively on the blobs, GeoMedia converts the data from a blob to a geometry object. All of the geometry objects are automated objects. This simplifies the process of manipulating the object because the manipulation of the binary format is isolated to the geometry objects and the geometry services – you do not have to create the blob format.

Pipes

The Pipes are software components that accept some input (possibly including recordsets), perform a calculation, and output a new recordset. This is the primary distinction between pipes and services. Pipes always output a recordset.

Services and Utilities

Services are software components that accept some set of input, perform calculations, and return a set of answers. Samples are data export services, geometry to blob conversions, style services, thematic classification etc.

Basic Workflow

The basic workflow for creating and displaying a map involves the following steps:

  1. Returning a MapServer.
  2. Assigning a coordinate system.
  3. Connecting to a data source.
  4. Defining Legend Entries.
  5. Determining the range for the output map.
  6. Generating the map.

Sample code

For the complete sample code please proceed to our code repository.

Comments
by Dd
on ‎11-06-2017 08:56 PM

Hi, are you sure that the Bitbucket's code repository for the sample codes is accessible? Thanks in advanced.

by Olyster
on ‎03-02-2018 06:03 AM

Hi,

 

Is the source sample still acessible ? Could you give me access to them ? Is it possible to automate the publish to metadata operation ?

 

Thank you

Overview