Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linking with other types of file when clicking map features on web browser

8 REPLIES 8
Reply
Message 1 of 9
GtiCloud
573 Views, 8 Replies

Linking with other types of file when clicking map features on web browser

Hello everyone, Smiley Happy

 

I am just starting to learn Infrastructure Map Server 2015 and with no programming background.Smiley Sad

 

I would like to take this opportunity to ask some questions and hope experienced user/developer can help/teach me how to solve.

 

I now have a .dwg in Map3D connecting to a SDF which stores a number of polygons representing different buildings within an area, and published to Map server already.

 

So I would to ask when viewing those polygons on web browser, I would like to have a function when user clicking one of the building, say the name of the building is 'Block A', it will pop-up ( or re-direct ) a window and display a drawing ( may be a .dwf or revit format 3D model ) describing the details of Block A. When choosing another building , for example, Block B will then show out the Block B detail drawings.

 

Would you please give me some hints on what should I do in order to finish the above task?

For my guessing, is that I need to upload the detail drawings to the published server folder location? ( the location such as \\localhost\mapserver2015\Building... ... ? But how to get the access address of this location of dfferent document? )

Any scripting do I need to know in order the handle this event?

 

Thank you very much.Smiley Embarassed

8 REPLIES 8
Message 2 of 9
gluckett
in reply to: GtiCloud

It sounds like a great application.

 

If you have the building names in your SDF (i.e. BUILDING_A, BUILDING_B) you can build a URL in your layer to load another map.

 

For example your URL in your layer might look like this:

 

CONCAT('/mapserver2015/fusion/templates/mapguide/aqua/?theme=Library://MAPS/', SDF_COLUMN_BUILDING_NAMES , '.MapDefinition')

 

You would have to make a bunch of maps for each building such as

 

Library://MAPS/BUILDING_A.MapDefinition

Library://MAPS/BUILDING_B.MapDefinition

Library://MAPS/BUILDING_C.MapDefinition

 

Hope that helps.

 

gordon

 

Message 3 of 9
GtiCloud
in reply to: gluckett


@gluckett wrote:

It sounds like a great application.

 

If you have the building names in your SDF (i.e. BUILDING_A, BUILDING_B) you can build a URL in your layer to load another map.

 

For example your URL in your layer might look like this:

 

CONCAT('/mapserver2015/fusion/templates/mapguide/aqua/?theme=Library://MAPS/', SDF_COLUMN_BUILDING_NAMES , '.MapDefinition')

 

You would have to make a bunch of maps for each building such as

 

Library://MAPS/BUILDING_A.MapDefinition

Library://MAPS/BUILDING_B.MapDefinition

Library://MAPS/BUILDING_C.MapDefinition

 

Hope that helps.

 

gordon

 


Gordon,

 

Really Thx for your reply. Heart

 

I 've got the general concept of locating a specific file ( as well as display it with a selected template )

I have uploaded my sample .DWG drawing ( file name "Block 3.dwg and "Block 4.dwg, in which same as the properties of BUILDING SDF named in STRING field )

 

However, I still can not successfully link the file. Smiley Sad

A Blank web page with aqua template displayed only. 

I hereby attached my folder directory structure for better presentations. 

 

I have used the "Load DWG Data..." command and import the Block 3.dwg and Block 4.dwg to my project ( I hope I am using the right command to import file correctly... )

After that I input the following script to the "TESTING-BLDGPOLY_W_NAME" Layer which stores all my building informations ( such as the Name of building stored in 'STRING' field ) in "URL activated for feature:"

 

Here is the scripting:

 

CONCAT('/mapserver2015/fusion/templates/mapguide/aqua/?theme= Library://DisplayBuilding/',  STRING  , '/Data/DWG.FeatureSource')

 

Did I made any scripting mistake? 

 

Thank you very muchSmiley Happy

Message 4 of 9
gluckett
in reply to: GtiCloud

You can't link to the loaded DWG.  But you have to make a MAP with each DWG.

 

So then you would change this:

 

CONCAT('/mapserver2015/fusion/templates/mapguide/a​qua/?theme= Library://DisplayBuilding/',  STRING  , '/Data/DWG.FeatureSource')

 

to

 

CONCAT('/mapserver2015/fusion/templates/mapguide/a​qua/?theme= Library://DisplayBuilding/Maps/', STRING  , '.MapDefinition)

Message 5 of 9
GtiCloud
in reply to: gluckett


@gluckett wrote:

You can't link to the loaded DWG.  But you have to make a MAP with each DWG.

 

So then you would change this:

 

CONCAT('/mapserver2015/fusion/templates/mapguide/a​qua/?theme= Library://DisplayBuilding/',  STRING  , '/Data/DWG.FeatureSource')

 

to

 

CONCAT('/mapserver2015/fusion/templates/mapguide/a​qua/?theme= Library://DisplayBuilding/Maps/', STRING  , '.MapDefinition)


Thanks for your reply again, Gordon Smiley Happy

 

I followed your advice and I can not get the result Smiley Sad

 

I attached what I have created so far.

I have created a new folder named "Maps" under the "DisplayBuilding" directory.

And then I create a .MapDefinition named "Block 3" under the 'Maps' directory

( Right click "Map" folder > New > Map > adding Description and Coordinate system , save it and named "Block 3" same as the Building name stores in SDF STRING field and the .dwg name )

 

May I ask did I miss out something to set or associate with?

Or I misunderstand something?

 

Thank you. Smiley Happy

Message 6 of 9
GtiCloud
in reply to: gluckett

Thanks for your reply again, Gordon Smiley Happy

I followed your advice and I can not get the result Smiley Sad

I attached what I have created so far.
I have created a new folder named "Maps" under the "DisplayBuilding" directory.
And then I create a .MapDefinition named "Block 3" under the 'Maps' directory
( Right click "Map" folder > New > Map > adding Description and Coordinate system , save it and named "Block 3" same as the Building name stores in SDF STRING field and the .dwg name )

May I ask did I miss out something to set or associate with?
Or I misunderstand something?

Thank you. Smiley Happy

Message 7 of 9
gluckett
in reply to: GtiCloud

Your Map requires Layers.

Every Layout needs a Map.
Every map needs a Layer.
Every layer needs a Datasource.

Ensure your maps have the layers you want to display.
Message 8 of 9
GtiCloud
in reply to: gluckett

Thanks for Gordon's reply again. Smiley Happy

Your replies are really useful and important.

And I would like to use this post to share the detailed solution I have worked out so far step by step to everyone who are interested in the same development. Smiley Wink

 

OK lets begin

It would be good if you create a new folder for storing those details drawings ( say "CAD_Drawings" )

You need to upload your .dwf / .dwg to Infrastructure Map server Project folder by using "Load Procedure..." ( Right click folder "CAD_Drawing" > "Load Procedure..." )

Setting your co-ordinate system if necessary.

System will help you to make default folder. ( "Data" and "Layers" folder )

Let Feature Sources(s) loading into "Data" folder and Layer(s) into "Layers folder ( doesn't matter you do not create any new folder )

It will then help to import your .dwf / .dwg to your selected folder.

 

Then input the following script into your building polygon layer which you want to display / interactive with at "URL activiate for feature:"

CONCAT('/mapserver2015/fusion/templates/mapguide/aqua/?theme=Library://(Your project name here)/CAD_Drawings/Layers/', STRING, '.MapDefinition')

 

Try to view at web browser and 'ctrl + left click' the polygon and you will get the result Smiley Embarassed

 

I have tried to import both .dwf and .dwg format to Infrastructure Map Server.

All of your drawings style such as hatched style or colored polygons can be maintained perfectly with .dwf.

However the .dwg format has some problems in result your style are not fully retained.

I am now working with it or anybody can give me some advices?

Message 9 of 9
gluckett
in reply to: GtiCloud

If you use New > Load DWG Data

loaddwg.png

 

And you choose MapEntityObjectData (this retains the Object Data and the graphics that go with it).

loaddwg2.png

 

Once you have that loaded, I would recommend renaming your "Default" map to the name of the dwg you want (i.e. P123)

 

The default location of the map will be where you set the load procedure for the DWG so you may want to move it after you re-name it.

 

Once you know where all your MAPS are, you can link to them using the URL.

 

For example if I have a "P123" dwg map at Library://DWG/4_MAPS/P123.MapDefinition, I can easily view it at:

 

http://myservername/mapserver2015/fusion/templates/mapguide/aqua/?theme=Library://DWG/4_MAPS/P123.MapDefinition

 

You just need to make sure your URLs point to this link. 

 

If you want to customize the web layout, just create a default on and add it to your url:

 

http://myservername/mapserver2015/fusion/templates/mapguide/aqua/?theme=Library://DWG/4_MAPS/P123.MapDefinition&applicationdefinition=Library://DWG/5_LAYOUTS/flex.ApplicationDefinition

 

regards

gordon

 

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report