การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf ·...

87
การใชงานโปรแกรม Autodesk Map Guide การสราง และออกแบบแผนที่ในระบบ BMA GIS ONLINE การพัฒนาระบบผาน Web Application เพื่อนําเสนอขอมูลแผนทีการประยุกตใชงาน GIS ผานระบบ Smart Phone

Transcript of การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf ·...

Page 1: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

การใชงานโปรแกรม Autodesk Map Guide การสราง และออกแบบแผนท่ีในระบบ BMA GIS ONLINE

การพัฒนาระบบผาน Web Application เพื่อนําเสนอขอมลูแผนที ่การประยุกตใชงาน GIS ผานระบบ Smart Phone

Page 2: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

1

เอกสารคูมือโปรแกรม

Autodesk Infrastructure Map Server

Page 3: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

1

เอกสารคูมือโปรแกรม

Autodesk Infrastructure Map Server

Page 4: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

2

CCM-SYSTMS.CO., What’s new in Autodesk Infrastructure Map Server

Mapping Software for Sharing CAD, GIS & Asset Data

Autodesk® Infrastructure Map Server software is web-based mapping software that helps AEC professionals publish and share CAD, GIS, and other infrastructure asset information quickly and cost-effectively via the Internet. Easy to use and deploy, the software includes templates that enable users to quickly deliver information from AutoCAD® Map 3D software to the web.

Mobile viewer extension—Use Infrastructure Map Server with popular touch-screen devices

GeoREST extension—Repurpose existing server and Feature Data Objects (FDO) data using a RESTful web services protocol

WaterMark Definition—New watermark add overlay on layers and map WMS & WFS publishing—Simplify the publishing process with an OGC WMS & WFS

publishing interface Additional consumer map layers—Create context-rich maps QuickPlot functionality—Quickly choose the area, rotation, resolution, map

decorations, and paper size prior to plotting Pre-caching of base layer tiles—Generate and populate tile caches Stylization user interface—Create rich cartographic maps

Page 5: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

3

Mobile Viewer Extension

iViewer Extension (iPhone/iPad interface)

• Interface for touch-screen devices –initial focus on iPhoneand iPad

• Features: - Single-and multi-touch navigation

- Integration with Location API (GPS, Wi-Fi, etc)

- Use Consumer Maps (Google/Yahoo/Bing and OSM Maps) as base layer and MapGuide Map-definition as overlay

- Use existing MGE Map definitions

- Simple Tools: zoom, pan, initial map-extent, Selections/Info-tool, layer control and locate me!

• Simple MGE Web Extension install –no application download on device • Demo: http://sandbox.mapguide.com/iviewer/

Page 6: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

4

Example :

Page 7: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

5

Page 8: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

6

GeoREST Extension

New Web Services Interface

• Developed by: SL-King, an Autodesk ISV and strong Open Source contributor.

• GeoREST is an Open Source project with direct support for MapGuide Enterprise, MapGuide Open Source and FDO Feature Sources

• Provides a new method of interfacing with MapGuide Server via standard HTML/CSS and template files

• Web: http://code.google.com/p/georest/

•Available on Media as Technology Preview (English only)

GeoREST is a web-centric framework for distributing geospatial data. It allows RESTful feature-based access to spatial data sources, including full editing capabilities, through a MapGuide server or directly via FDO.

Examples of data sources:

SHP

SDF

SQLite (FDO)

SpatiaLite

PostGIS

Oracle Spatial

Microsoft SQL Server Spatial

MySQL

Any other FDO vector data source

Example output formats:

GeoJSON

XML

Page 9: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

7

Example

Example after installation on http://localhost:99/index.html

Page 10: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

8

Page 11: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

9

WMS & WFS publishing

•This enhancement is to provide 100% reliable and OGC certifiable WMS and WFS publishing services in AIMS with support for the latest standards (WMS 1.3.0 and WFS 1.1.0). •Certification for:

- WMS 1.1.0 & 1.3.0 - WFS 1.0.0 & 1.1.0

•Improve the UI in Infrastructure Studio to simplify the WMS & WFS publishing process.

•Publishing begins from a MapDefinition instead of a LayerDefinition

•Map preview helps to set the bounds for different Spatial Reference Systems

- Set Bounds visually Define

- Define metadata per layer

Page 12: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

10

WaterMark Definition

•We are offering a new resource type and a UI in Studio to define one or more watermarks for a MapDefinition.

•The watermark can be an image or text.

Page 13: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

11

Consumer Map Services

I) Google Maps a. Streets b. Aerial c. Terrian d. Hybrid

II) Bing Maps a. Streets b. Aerial c. Hybrid

III) Yahoo Maps a. Streets b. Aerial c. Hybrid

IV) OpenStreetMap a. Streets

Page 14: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

12

Page 15: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

13

Page 16: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

14

Page 17: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

15

Page 18: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

16

Quick Plot functionality

Printing & Plotting

•Today there is functionality in Topobase Web which should be available for MapGuide users. The goal is to make tools like Quick Plot available in Reeses Server. The Quick Plot feature will be ported and not enhanced.

Page 19: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

17

Pre-caching of base layer tiles

Map Tiling

•Base layer tiles can be pre-generated and automated via script •Define bounds, groups and # of levels for map tiles

•Generate Now or Save process to script for automation via OS scheduler

Page 20: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

18

Stylization user interface New Stylization UI

•Choice of ―old‖ or ―new‖ UI •Old Stylization UI will be deprecated

Page 21: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

19

Create rich cartographic maps

Page 22: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

20

Autodesk Infrastructure Studio User's Guide The Autodesk Infrastructure Studio Interface

The collection of servers that process Autodesk Infrastructure Studio requests is called a site. The servers in each site share a single resource repository, which stores resources used to create web layouts.

To work with Infrastructure Studio, you must connect to the site where your resources are stored. The resources on the site are displayed in the Site Explorer. When you double-click a resource, its properties are displayed in the editor, where you can make changes. The features of the editor vary depending on the type of resource you are editing.

The Autodesk Infrastructure Studio interface

Understanding Resources

Resources are the data and other elements used to build an Infrastructure Studio web layout, including the web layout itself. You can load files from a variety of formats and connect to databases to create data resources.

Resources are displayed in the Site Explorer as you load or create them.

Page 23: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

21

Note

Resources have associated permissions that control who views and edits them. For more information about permissions, see Setting Permissions for Resources.

Topics in this section

- Resource Diagram

- Web Layouts

- Maps

- Layers

- Watermark Resources

- Data Resources

- Load Procedures

- Symbol Libraries

- Print Layouts

Page 24: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

22

Resource Diagram

The following diagram shows how you assemble Autodesk Infrastructure Studio resources to build a web layout.

Web Layouts

The Autodesk Infrastructure Studio web layout is the highest-level resource in a hierarchy of resources. It is the end product of your work in Autodesk Infrastructure Studio. You can make the web layout available to users directly or embed it in your application.

For more information about creating web layouts, see Preparing a Map for Presentation in a Web Browser.

Displaying the Map in a Web Browser

After you create a map, you can build a flexible or basic web layout so that users can view and interact with the map on the Internet or an intranet. The flexible web layout is a CSS-based web layout, which allows you to modify the templates provided with Infrastructure Studio and add third party templates. The basic web layout supports the

Page 25: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

23

table-based DWF and AJAX viewers and maintains backward compatibility with your basic web layouts from previous versions of Infrastructure Studio. Test your flexible or basic web layout using either the Previewpane in the Web Layout Editor or by viewing it in your default browser.

When you build a new flexible or basic web layout you only need to specify the map to display. All other settings have default values. Use the Web Layout Editor to perform the following tasks:

- Create a new web layout and specify the map to display.

- Modify default web layout settings.

- Design Viewer toolbars, right-click menus, and a task pane.

- Create custom components.

Topics in this section

- Flexible Layout Viewer

- Basic Layout Viewer

Flexible Layout Viewer (Fusion Technology)

- Setting Up the Web Layout

- Defining the Viewer Toolbars, Right-Click Menu, and Task Pane Menu

- Customizing Components for Flexible Layouts

- Previewing the Flexible Web Layout

Page 26: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

24

Basic Layout Viewer

Setting Up a Basic Web Layout

Defining the Viewer Toolbar, Context Menu, and Task Pane Menu

Customizing Commands for Basic Layouts

Previewing the Basic Web Layout

Page 27: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

25

Working with Maps

Use the Map Editor to specify basic map settings and add layers. Create a new map and drag layers into it from the Site Explorer or work with an existing map and make adjustments as needed.

Topics in this section

- Creating a New Map

- Setting the Coordinate System for Your Map

- Setting the Background Color

- Setting the Initial Map View

- Setting Up Layers

- Setting Up Base Layer Groups

- Scheduling and Pre-caching Tiles for Base Layers

- Previewing the Map

- Publishing WMS Data

Enable WMS

Page 28: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

26

Working with Layers

You can use the Layer Editor to create a layer resource that can be shared and reused in many maps. A preview of the data resource using default styling is provided. Customize the styles or theme the data as needed.

Note

As with any application accessing resources across a network it is advisable to save often after incremental changes are made to prevent the possible loss of work.

Topics in this section

- Specifying the Data Resource for a Layer

- Working with Feature Source Layers

- Creating Styles for Feature Source Layers

- Working with Drawing Source Layers

- Working with Raster Layers and WMS Layers

- Building Text Expressions

- Building Number Expressions

- Adding a Watermark Resource to a Layer or Map Definition

- Previewing the Layer

Page 29: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

27

Preview Mode

Working with Symbols

When you use standard styles, Autodesk Infrastructure Studio provides six mark symbols: square, circle, triangle, star, cross, and X. In addition you can use font symbols and build Infrastructure Studio symbol libraries. (For information about standard and enhanced styles, seeUsing Enhanced and Standard Styles.

Insert symbols in point, line, and polygon layers using standard styles in the appropriate style dialog box. For more information, see Styling Points, Styling Lines, and Styling Areas.

Organize symbols into symbol libraries based on themes or on the frequency with which you use certain symbols. A symbol library is a resource in the Site Explorer.

Symbol Libraries support the following file formats: Bitmap (BMP) Device Independent Bitmap (DIB) Enhanced Metafile (EMF) TrueType Fonts (TTF) Windows Metafile (WMF) Portable Network Graphics (PNG) Joint Photographic Experts Group (JPG/JPEG)

Symbol Libraries support vector as well as bitmap images and complex symbols that combine both formats.

Page 30: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

28

Topics in this section

- Creating a Symbol Library - Importing Images into a Symbol Library - Importing Font Characters as Symbols - Deleting Symbols - Copying Symbols - Creating Symbols

Page 31: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

29

Load Fonts Symbo

l

Page 32: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

30

Setting Options

Use Options to control the default settings for the Site Explorer and Layer Editor. Also use options to specify whether to use the Basic Layout or Flexible Layout Viewer for previews in the Layer, Map, and Web Layout editors.

Topics in this section

- Setting Site Explorer Options

- Setting Layer Editor Options

- Setting Viewer Options

Page 33: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

31

Working with Print Layouts Define any number of print layouts to include with a web layout. When your users

view the web layout in a browser, they can print using a layout from the set you provide. The layout describes the elements to include in the DWF ePlot that is sent to the printer. Print layouts are XML files. The Print Layout Editor requires a basic understanding of XML. You can include the following elements in a layout: Topics in this section

- Creating Print Layouts

- Print Layout Schema

- Print Layout Sample

<?xml version="1.0" encoding="UTF-8"?>

<PrintLayout

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="PrintLayout-1.0.0.xsd">

<PageProperties>

<BackgroundColor>

<Red>255</Red>

<Blue>255</Blue>

<Green>255</Green>

</BackgroundColor>

</PageProperties>

<LayoutProperties>

<ShowTitle>true</ShowTitle>

<ShowLegend>true</ShowLegend>

<ShowScaleBar>true</ShowScaleBar>

<ShowNorthArrow>true</ShowNorthArrow>

<ShowURL>true</ShowURL>

<ShowDateTime>true</ShowDateTime>

<ShowCustomLogos>true</ShowCustomLogos>

<ShowCustomText>false</ShowCustomText>

</LayoutProperties>

Continue………..

<CustomLogos>

<Logo>

<Position>

<Left>8.2</Left>

<Bottom>6.9</Bottom>

<Units>inches</Units>

</Position>

<ResourceId>Library://Samples/Sheboygan/Symbols/Logos.Symbol

Library</ResourceId>

<Name>CityLogo</Name>

<Size>

<Width>1.0</Width>

<Height>1.0</Height>

<Units>inches</Units>

</Size>

<Rotation>0</Rotation>

</Logo>

</CustomLogos>

<CustomText>

<Text>

</Text>

</CustomText>

</PrintLayout>

Page 34: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

32

Creating Print Layouts

When you create a new print layout, all the elements are provide by default. Edit them as necessary. All page elements except custom symbols and text are placed at a predetermined location on the page which cannot be modified. You can specify the placement of custom logos and text.

To create a new print layout 1. Click File menu New Print Layout. 2. The Print Layout Editor displays an XML template that includes all possible print

layout elements. 3. Edit the XML template as necessary.

When specifying a background color, enter color values for red, green, and blue using RGB color values. There are 256 possible values for each of the red, green, and blue components of a color pixel on a computer screen. Each color value ranges from 0 (no color) to 255 (full color). A full color value combines a red, a green, and a blue value. The following table provides sample color values (red, green, blue):

RGB values Color

0, 0, 0 black

255 ,0, 0 bright red

255, 255, 0 bright yellow

0, 0, 255 bright blue

255, 255, 255 white

Custom logos are stored in a Symbol Library resource. If you are adding a logo to a layout, locate the CustomLogos section and specify the logo position, Symbol Library resource, name, size, and rotation. Valid units for LogoPosition are percent, meters, and inches. If the PositionUnitsvalue is not specified, the default is percent. Valid units for LogoSize are metersand inches. Default LogoSize units are inches.

If you are adding text to a layout, locate the CustomText section and specify the text position, font and size, and the text to print. Valid units for TextPosition are percent, meters, and inches. If the PositionUnitsvalue is not specified, the default is percent. Valid units for FontHeight are inches,meters, and points. Default FontHeight units are points.

Page 35: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

33

1. Click Validate to check for syntax errors. 2. Syntax errors are displayed at the bottom of the Print Layout Editor. 3. If errors are detected, click on each error in turn to locate the problem in the XML

code. 4. When you have addressed each error, a message indicates that the layout is valid. 5. Click File menu Save As to save the layout.

Output on DWF File (open by Autodesk Design Review – Free viewer)

Page 36: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

34

Creating Expressions For Query Features

Topics in this section

- Overview of Expressions for Geospatial Features

- Creating Expressions

- Using Expressions to Filter Feature Data

- Managing Expressions

- Customizing Expression Options

- About Expressions and Data Providers

Location Conditions Location conditions are available from the Locate On Map menu. They filter or select data based on a location you specify in your map. For example, you can find all roads within 100 meters of a power line, or all parcels within a specific section of the drawing. In the following illustrations, the objects that are retrieved are highlighted:

Condition Definition Illustration

Page 37: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

35

Inside Circle

Selects features entirely inside a circle drawn on the map.

Inside Rectangle

Selects features entirely inside a rectangle drawn on the map.

Inside Polygon

Selects features entirely inside a polygon drawn on the map.

Touching Any Part Of Circle

Selects features touching a circle drawn on the map.

Touching Any Part Of Rectangle

Selects features touching a rectangle drawn on the map.

Page 38: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

36

Touching Any Part Of Polygon

Selects features touching a polygon drawn on the map.

Touching Any Part Of Fence

Selects features touching a line drawn on the map.

Touching Any Part Of Point

Selects features touching a point drawn on the map.

Page 39: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

37

AIMS Web Applications

AIMS Web Applications

- Visual Studio 2010 with .netframework 3.5 (NOT.netframework 4.0) - Visual Studio 2008 with .netframework 3.5

Create an ASP.Net Website in Visual Studio on local IIS Add MapGuide references •Copy all MapGuide .net assemblies to bin folder

•Initialize MapGuide web tier

•Connect to MapGuide Server

•Embed MapGuide viewer in webpage

Page 40: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

38

No difference with building MGE 2011 applications

1. New Project ASP.NET Web Application, select .NET Framework 3.5

2. Copy all dlls from AIMS web extension to <YourWebApp>\bin <Infrastructure Web Server Extension .>\www\mapviewernet\bin\*.dll

Example : <AIMS.WebcastDemoWebApp>\bin\*.dll

3. Add references to following assemblies and set ―copy local‖ to False

- OSGeo.MapGuide.Foundation.dll - OSGeo.MapGuide.Geometry.dll - OSGeo.MapGuide.MapGuideCommon.dll - OSGeo.MapGuide.PlatformBase.dll - OSGeo.MapGuide.Web.dll

Page 41: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

39

4. InitializeWebTier 5. Connect to MapGuide Server 6. Generate Session String

public string sessionId, weblayout; MapGuideApi.MgInitializeWebTier(@"webconfig.ini"); MgUserInformationuserInfo= new MgUserInformation(defaultUser, defaultPassword); MgSitesite = new MgSite(); site.Open(userInfo); sessionId= site.CreateSession();

Weblayout= "Library://Exercise/WebCast/Hello.weblayout‖"; 7. Pass session string to Ajax Viewer

<html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Exercise 4</title> </head> <frameset rows="100,*" border="0" framespacing="0"> <frame src= ―Banner.htm" /> <frame src="/mapserver./mapviewernet/ajaxviewer.aspx?SESSION=<%= sessionId%>&WEBLAYOUT=<%= webLayout%>" name="ViewerFrame" /> </frameset> </html>

Page 42: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

40

8. Create Web Application in IIS manager, direct to your web app ―MapServerAppPool‖ is recommended

9. Build you application and browse your web page in browser, it should be working

Page 43: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

41

10. DEBUG: Attach process to w3wp.exe, do not use F5 pay attention to the AppPool

11. New Command

•Invoke Script •Invoke URL

12. Add Command to layout

Page 44: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

42

13. Implement the command(JavaScript/Web page)

Page 45: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

43

LAB1: AIMS custom web applications Step by Step 1.Create web application 2.Copy dlls/ Add Reference 3.Embed Ajaxviewer in webpage 4.How to debug 5.Create custom command 6.Implement the custom command Online Resources •Autodesk Infrastructure Map Server http://www.autodesk.com/infrastructuremapserver

•MapGuide Best Practices Wiki http://sandbox.mapguide.com

•Demo Galleries http://enterprise.mapguide.com / http://mapguide.osgeo.org/livegallery.html

•MapGuide Central http://mapguide-central.ennoble.com.au/

•AIMS Online Documentation

http://wikihelp.autodesk.com/Infr._Map_Server/enu/

Page 46: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

2

CCM-SYSTMS.CO., What’s new in Autodesk Infrastructure Map Server

Mapping Software for Sharing CAD, GIS & Asset Data

Autodesk® Infrastructure Map Server software is web-based mapping software that helps AEC professionals publish and share CAD, GIS, and other infrastructure asset information quickly and cost-effectively via the Internet. Easy to use and deploy, the software includes templates that enable users to quickly deliver information from AutoCAD® Map 3D software to the web.

Mobile viewer extension—Use Infrastructure Map Server with popular touch-screen devices

GeoREST extension—Repurpose existing server and Feature Data Objects (FDO) data using a RESTful web services protocol

WaterMark Definition—New watermark add overlay on layers and map WMS & WFS publishing—Simplify the publishing process with an OGC WMS & WFS

publishing interface Additional consumer map layers—Create context-rich maps QuickPlot functionality—Quickly choose the area, rotation, resolution, map

decorations, and paper size prior to plotting Pre-caching of base layer tiles—Generate and populate tile caches Stylization user interface—Create rich cartographic maps

Page 47: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

3

Mobile Viewer Extension

iViewer Extension (iPhone/iPad interface)

• Interface for touch-screen devices –initial focus on iPhoneand iPad

• Features: - Single-and multi-touch navigation

- Integration with Location API (GPS, Wi-Fi, etc)

- Use Consumer Maps (Google/Yahoo/Bing and OSM Maps) as base layer and MapGuide Map-definition as overlay

- Use existing MGE Map definitions

- Simple Tools: zoom, pan, initial map-extent, Selections/Info-tool, layer control and locate me!

• Simple MGE Web Extension install –no application download on device • Demo: http://sandbox.mapguide.com/iviewer/

Page 48: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

4

Example :

Page 49: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

5

Page 50: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

6

GeoREST Extension

New Web Services Interface

• Developed by: SL-King, an Autodesk ISV and strong Open Source contributor.

• GeoREST is an Open Source project with direct support for MapGuide Enterprise, MapGuide Open Source and FDO Feature Sources

• Provides a new method of interfacing with MapGuide Server via standard HTML/CSS and template files

• Web: http://code.google.com/p/georest/

•Available on Media as Technology Preview (English only)

GeoREST is a web-centric framework for distributing geospatial data. It allows RESTful feature-based access to spatial data sources, including full editing capabilities, through a MapGuide server or directly via FDO.

Examples of data sources:

SHP

SDF

SQLite (FDO)

SpatiaLite

PostGIS

Oracle Spatial

Microsoft SQL Server Spatial

MySQL

Any other FDO vector data source

Example output formats:

GeoJSON

XML

Page 51: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

7

Example

Example after installation on http://localhost:99/index.html

Page 52: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

8

Page 53: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

9

WMS & WFS publishing

•This enhancement is to provide 100% reliable and OGC certifiable WMS and WFS publishing services in AIMS with support for the latest standards (WMS 1.3.0 and WFS 1.1.0). •Certification for:

- WMS 1.1.0 & 1.3.0 - WFS 1.0.0 & 1.1.0

•Improve the UI in Infrastructure Studio to simplify the WMS & WFS publishing process.

•Publishing begins from a MapDefinition instead of a LayerDefinition

•Map preview helps to set the bounds for different Spatial Reference Systems

- Set Bounds visually Define

- Define metadata per layer

Page 54: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

10

WaterMark Definition

•We are offering a new resource type and a UI in Studio to define one or more watermarks for a MapDefinition.

•The watermark can be an image or text.

Page 55: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

11

Consumer Map Services

I) Google Maps a. Streets b. Aerial c. Terrian d. Hybrid

II) Bing Maps a. Streets b. Aerial c. Hybrid

III) Yahoo Maps a. Streets b. Aerial c. Hybrid

IV) OpenStreetMap a. Streets

Page 56: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

12

Page 57: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

13

Page 58: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

14

Page 59: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

15

Page 60: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

16

Quick Plot functionality

Printing & Plotting

•Today there is functionality in Topobase Web which should be available for MapGuide users. The goal is to make tools like Quick Plot available in Reeses Server. The Quick Plot feature will be ported and not enhanced.

Page 61: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

17

Pre-caching of base layer tiles

Map Tiling

•Base layer tiles can be pre-generated and automated via script •Define bounds, groups and # of levels for map tiles

•Generate Now or Save process to script for automation via OS scheduler

Page 62: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

18

Stylization user interface New Stylization UI

•Choice of ―old‖ or ―new‖ UI •Old Stylization UI will be deprecated

Page 63: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

19

Create rich cartographic maps

Page 64: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

20

Autodesk Infrastructure Studio User's Guide The Autodesk Infrastructure Studio Interface

The collection of servers that process Autodesk Infrastructure Studio requests is called a site. The servers in each site share a single resource repository, which stores resources used to create web layouts.

To work with Infrastructure Studio, you must connect to the site where your resources are stored. The resources on the site are displayed in the Site Explorer. When you double-click a resource, its properties are displayed in the editor, where you can make changes. The features of the editor vary depending on the type of resource you are editing.

The Autodesk Infrastructure Studio interface

Understanding Resources

Resources are the data and other elements used to build an Infrastructure Studio web layout, including the web layout itself. You can load files from a variety of formats and connect to databases to create data resources.

Resources are displayed in the Site Explorer as you load or create them.

Page 65: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

21

Note

Resources have associated permissions that control who views and edits them. For more information about permissions, see Setting Permissions for Resources.

Topics in this section

- Resource Diagram

- Web Layouts

- Maps

- Layers

- Watermark Resources

- Data Resources

- Load Procedures

- Symbol Libraries

- Print Layouts

Page 66: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

22

Resource Diagram

The following diagram shows how you assemble Autodesk Infrastructure Studio resources to build a web layout.

Web Layouts

The Autodesk Infrastructure Studio web layout is the highest-level resource in a hierarchy of resources. It is the end product of your work in Autodesk Infrastructure Studio. You can make the web layout available to users directly or embed it in your application.

For more information about creating web layouts, see Preparing a Map for Presentation in a Web Browser.

Displaying the Map in a Web Browser

After you create a map, you can build a flexible or basic web layout so that users can view and interact with the map on the Internet or an intranet. The flexible web layout is a CSS-based web layout, which allows you to modify the templates provided with Infrastructure Studio and add third party templates. The basic web layout supports the

Page 67: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

23

table-based DWF and AJAX viewers and maintains backward compatibility with your basic web layouts from previous versions of Infrastructure Studio. Test your flexible or basic web layout using either the Previewpane in the Web Layout Editor or by viewing it in your default browser.

When you build a new flexible or basic web layout you only need to specify the map to display. All other settings have default values. Use the Web Layout Editor to perform the following tasks:

- Create a new web layout and specify the map to display.

- Modify default web layout settings.

- Design Viewer toolbars, right-click menus, and a task pane.

- Create custom components.

Topics in this section

- Flexible Layout Viewer

- Basic Layout Viewer

Flexible Layout Viewer (Fusion Technology)

- Setting Up the Web Layout

- Defining the Viewer Toolbars, Right-Click Menu, and Task Pane Menu

- Customizing Components for Flexible Layouts

- Previewing the Flexible Web Layout

Page 68: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

24

Basic Layout Viewer

Setting Up a Basic Web Layout

Defining the Viewer Toolbar, Context Menu, and Task Pane Menu

Customizing Commands for Basic Layouts

Previewing the Basic Web Layout

Page 69: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

25

Working with Maps

Use the Map Editor to specify basic map settings and add layers. Create a new map and drag layers into it from the Site Explorer or work with an existing map and make adjustments as needed.

Topics in this section

- Creating a New Map

- Setting the Coordinate System for Your Map

- Setting the Background Color

- Setting the Initial Map View

- Setting Up Layers

- Setting Up Base Layer Groups

- Scheduling and Pre-caching Tiles for Base Layers

- Previewing the Map

- Publishing WMS Data

Enable WMS

Page 70: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

26

Working with Layers

You can use the Layer Editor to create a layer resource that can be shared and reused in many maps. A preview of the data resource using default styling is provided. Customize the styles or theme the data as needed.

Note

As with any application accessing resources across a network it is advisable to save often after incremental changes are made to prevent the possible loss of work.

Topics in this section

- Specifying the Data Resource for a Layer

- Working with Feature Source Layers

- Creating Styles for Feature Source Layers

- Working with Drawing Source Layers

- Working with Raster Layers and WMS Layers

- Building Text Expressions

- Building Number Expressions

- Adding a Watermark Resource to a Layer or Map Definition

- Previewing the Layer

Page 71: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

27

Preview Mode

Working with Symbols

When you use standard styles, Autodesk Infrastructure Studio provides six mark symbols: square, circle, triangle, star, cross, and X. In addition you can use font symbols and build Infrastructure Studio symbol libraries. (For information about standard and enhanced styles, seeUsing Enhanced and Standard Styles.

Insert symbols in point, line, and polygon layers using standard styles in the appropriate style dialog box. For more information, see Styling Points, Styling Lines, and Styling Areas.

Organize symbols into symbol libraries based on themes or on the frequency with which you use certain symbols. A symbol library is a resource in the Site Explorer.

Symbol Libraries support the following file formats: Bitmap (BMP) Device Independent Bitmap (DIB) Enhanced Metafile (EMF) TrueType Fonts (TTF) Windows Metafile (WMF) Portable Network Graphics (PNG) Joint Photographic Experts Group (JPG/JPEG)

Symbol Libraries support vector as well as bitmap images and complex symbols that combine both formats.

Page 72: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

28

Topics in this section

- Creating a Symbol Library - Importing Images into a Symbol Library - Importing Font Characters as Symbols - Deleting Symbols - Copying Symbols - Creating Symbols

Page 73: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

29

Load Fonts Symbo

l

Page 74: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

30

Setting Options

Use Options to control the default settings for the Site Explorer and Layer Editor. Also use options to specify whether to use the Basic Layout or Flexible Layout Viewer for previews in the Layer, Map, and Web Layout editors.

Topics in this section

- Setting Site Explorer Options

- Setting Layer Editor Options

- Setting Viewer Options

Page 75: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

31

Working with Print Layouts Define any number of print layouts to include with a web layout. When your users

view the web layout in a browser, they can print using a layout from the set you provide. The layout describes the elements to include in the DWF ePlot that is sent to the printer. Print layouts are XML files. The Print Layout Editor requires a basic understanding of XML. You can include the following elements in a layout: Topics in this section

- Creating Print Layouts

- Print Layout Schema

- Print Layout Sample

<?xml version="1.0" encoding="UTF-8"?>

<PrintLayout

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="PrintLayout-1.0.0.xsd">

<PageProperties>

<BackgroundColor>

<Red>255</Red>

<Blue>255</Blue>

<Green>255</Green>

</BackgroundColor>

</PageProperties>

<LayoutProperties>

<ShowTitle>true</ShowTitle>

<ShowLegend>true</ShowLegend>

<ShowScaleBar>true</ShowScaleBar>

<ShowNorthArrow>true</ShowNorthArrow>

<ShowURL>true</ShowURL>

<ShowDateTime>true</ShowDateTime>

<ShowCustomLogos>true</ShowCustomLogos>

<ShowCustomText>false</ShowCustomText>

</LayoutProperties>

Continue………..

<CustomLogos>

<Logo>

<Position>

<Left>8.2</Left>

<Bottom>6.9</Bottom>

<Units>inches</Units>

</Position>

<ResourceId>Library://Samples/Sheboygan/Symbols/Logos.Symbol

Library</ResourceId>

<Name>CityLogo</Name>

<Size>

<Width>1.0</Width>

<Height>1.0</Height>

<Units>inches</Units>

</Size>

<Rotation>0</Rotation>

</Logo>

</CustomLogos>

<CustomText>

<Text>

</Text>

</CustomText>

</PrintLayout>

Page 76: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

32

Creating Print Layouts

When you create a new print layout, all the elements are provide by default. Edit them as necessary. All page elements except custom symbols and text are placed at a predetermined location on the page which cannot be modified. You can specify the placement of custom logos and text.

To create a new print layout 1. Click File menu New Print Layout. 2. The Print Layout Editor displays an XML template that includes all possible print

layout elements. 3. Edit the XML template as necessary.

When specifying a background color, enter color values for red, green, and blue using RGB color values. There are 256 possible values for each of the red, green, and blue components of a color pixel on a computer screen. Each color value ranges from 0 (no color) to 255 (full color). A full color value combines a red, a green, and a blue value. The following table provides sample color values (red, green, blue):

RGB values Color

0, 0, 0 black

255 ,0, 0 bright red

255, 255, 0 bright yellow

0, 0, 255 bright blue

255, 255, 255 white

Custom logos are stored in a Symbol Library resource. If you are adding a logo to a layout, locate the CustomLogos section and specify the logo position, Symbol Library resource, name, size, and rotation. Valid units for LogoPosition are percent, meters, and inches. If the PositionUnitsvalue is not specified, the default is percent. Valid units for LogoSize are metersand inches. Default LogoSize units are inches.

If you are adding text to a layout, locate the CustomText section and specify the text position, font and size, and the text to print. Valid units for TextPosition are percent, meters, and inches. If the PositionUnitsvalue is not specified, the default is percent. Valid units for FontHeight are inches,meters, and points. Default FontHeight units are points.

Page 77: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

33

1. Click Validate to check for syntax errors. 2. Syntax errors are displayed at the bottom of the Print Layout Editor. 3. If errors are detected, click on each error in turn to locate the problem in the XML

code. 4. When you have addressed each error, a message indicates that the layout is valid. 5. Click File menu Save As to save the layout.

Output on DWF File (open by Autodesk Design Review – Free viewer)

Page 78: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

34

Creating Expressions For Query Features

Topics in this section

- Overview of Expressions for Geospatial Features

- Creating Expressions

- Using Expressions to Filter Feature Data

- Managing Expressions

- Customizing Expression Options

- About Expressions and Data Providers

Location Conditions Location conditions are available from the Locate On Map menu. They filter or select data based on a location you specify in your map. For example, you can find all roads within 100 meters of a power line, or all parcels within a specific section of the drawing. In the following illustrations, the objects that are retrieved are highlighted:

Condition Definition Illustration

Page 79: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

35

Inside Circle

Selects features entirely inside a circle drawn on the map.

Inside Rectangle

Selects features entirely inside a rectangle drawn on the map.

Inside Polygon

Selects features entirely inside a polygon drawn on the map.

Touching Any Part Of Circle

Selects features touching a circle drawn on the map.

Touching Any Part Of Rectangle

Selects features touching a rectangle drawn on the map.

Page 80: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

36

Touching Any Part Of Polygon

Selects features touching a polygon drawn on the map.

Touching Any Part Of Fence

Selects features touching a line drawn on the map.

Touching Any Part Of Point

Selects features touching a point drawn on the map.

Page 81: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

37

AIMS Web Applications

AIMS Web Applications

- Visual Studio 2010 with .netframework 3.5 (NOT.netframework 4.0) - Visual Studio 2008 with .netframework 3.5

Create an ASP.Net Website in Visual Studio on local IIS Add MapGuide references •Copy all MapGuide .net assemblies to bin folder

•Initialize MapGuide web tier

•Connect to MapGuide Server

•Embed MapGuide viewer in webpage

Page 82: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

38

No difference with building MGE 2011 applications

1. New Project ASP.NET Web Application, select .NET Framework 3.5

2. Copy all dlls from AIMS web extension to <YourWebApp>\bin <Infrastructure Web Server Extension .>\www\mapviewernet\bin\*.dll

Example : <AIMS.WebcastDemoWebApp>\bin\*.dll

3. Add references to following assemblies and set ―copy local‖ to False

- OSGeo.MapGuide.Foundation.dll - OSGeo.MapGuide.Geometry.dll - OSGeo.MapGuide.MapGuideCommon.dll - OSGeo.MapGuide.PlatformBase.dll - OSGeo.MapGuide.Web.dll

Page 83: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

39

4. InitializeWebTier 5. Connect to MapGuide Server 6. Generate Session String

public string sessionId, weblayout; MapGuideApi.MgInitializeWebTier(@"webconfig.ini"); MgUserInformationuserInfo= new MgUserInformation(defaultUser, defaultPassword); MgSitesite = new MgSite(); site.Open(userInfo); sessionId= site.CreateSession();

Weblayout= "Library://Exercise/WebCast/Hello.weblayout‖"; 7. Pass session string to Ajax Viewer

<html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Exercise 4</title> </head> <frameset rows="100,*" border="0" framespacing="0"> <frame src= ―Banner.htm" /> <frame src="/mapserver./mapviewernet/ajaxviewer.aspx?SESSION=<%= sessionId%>&WEBLAYOUT=<%= webLayout%>" name="ViewerFrame" /> </frameset> </html>

Page 84: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

40

8. Create Web Application in IIS manager, direct to your web app ―MapServerAppPool‖ is recommended

9. Build you application and browse your web page in browser, it should be working

Page 85: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

41

10. DEBUG: Attach process to w3wp.exe, do not use F5 pay attention to the AppPool

11. New Command

•Invoke Script •Invoke URL

12. Add Command to layout

Page 86: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

42

13. Implement the command(JavaScript/Web page)

Page 87: การใช งานโปรแกรม Autodesk Map Guide KM/4 - CCM58.pdf · 2015-06-08 · การใช งานโปรแกรม Autodesk Map Guide ... - Design

43

LAB1: AIMS custom web applications Step by Step 1.Create web application 2.Copy dlls/ Add Reference 3.Embed Ajaxviewer in webpage 4.How to debug 5.Create custom command 6.Implement the custom command Online Resources •Autodesk Infrastructure Map Server http://www.autodesk.com/infrastructuremapserver

•MapGuide Best Practices Wiki http://sandbox.mapguide.com

•Demo Galleries http://enterprise.mapguide.com / http://mapguide.osgeo.org/livegallery.html

•MapGuide Central http://mapguide-central.ennoble.com.au/

•AIMS Online Documentation

http://wikihelp.autodesk.com/Infr._Map_Server/enu/