Hello everyone,
I am just starting to learn Infrastructure Map Server 2015 and with no programming background.
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.
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
@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.
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.
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 much
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/aqua/?theme= Library://DisplayBuilding/', STRING , '/Data/DWG.FeatureSource')
to
CONCAT('/mapserver2015/fusion/templates/mapguide/aqua/?theme= Library://DisplayBuilding/Maps/', STRING , '.MapDefinition)
@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/aqua/?theme= Library://DisplayBuilding/', STRING , '/Data/DWG.FeatureSource')
to
CONCAT('/mapserver2015/fusion/templates/mapguide/aqua/?theme= Library://DisplayBuilding/Maps/', STRING , '.MapDefinition)
Thanks for your reply again, Gordon
I followed your advice and I can not get the result
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.
Thanks for your reply again, Gordon
I followed your advice and I can not get the result
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.
Thanks for Gordon's reply again.
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.
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
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?
If you use New > Load DWG Data
And you choose MapEntityObjectData (this retains the Object Data and the graphics that go with it).
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