OCAD Internet Map: Difference between revisions

From OCAD 12 Wiki - English
Jump to navigation Jump to search
No edit summary
No edit summary
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Export OIM [[File:Space.PNG]][[File:Pro40px.PNG|This function is available in OCAD 11 Professional.|link=https://www.ocad.com/en/products/ocad-for-cartography]]==
==Export OIM [[File:Space.PNG]][[File:Pro40px.PNG|This function is available in OCAD 12 Professional.|link=https://www.ocad.com/en/products/ocad-for-cartography]]==


[[File:Export.PNG]]
[[File:Export.PNG|250px]]




Choose '''Export OCAD Internet Map''' from '''File''' menu to export the map as OIM (OCAD Internet Map).  
Choose '''Export OCAD Internet Map''' from '''File''' menu to export the map as OIM (OCAD Internet Map).  
With OIM you can publish big OCAD maps on internet. You can insert the OCAD Internet Map to a HTML file.
With OIM you can publish big OCAD maps on internet. Additionally, it is possible to display and query Points of Interest (POI). You can insert the OCAD Internet Map to a HTML file.


* '''Resolution:''' Enter here the resolution for the map tiles (GIF).
* '''Resolution:''' Enter here the resolution for the map tiles (GIF).
Line 25: Line 25:
* Map title - heading of the map
* Map title - heading of the map
* Map subtitle - may be a copyright statement or similar
* Map subtitle - may be a copyright statement or similar
* Choose the favoured postition of the Map tile/ Map subtitle by clicking on the corresponding button.


'''Base map layout:'''
'''Base map layout:'''
: Base layer name - name of the map (e.g. Citymap of Baar)
* Base layer name - name of the map (e.g. St. Moritz - OCAD Internet Map Example)
: Edit layer enable - enables the users the ability to draw on the map
* Edit layer enable - enables the users the ability to draw on the map
: Global searchbox - search for POI's (works only with PHP support)
* Search with selection - search only in one POI category, for example streets
: Search with selection - search only in one POI category, for example streets
* Classic layout - use default layout for export
* Global searchbox - search for POI's (works only with PHP support)
* OCAD Slogan - displays OCAD slogan on your exported map
: POI selection hint - change default label for POI selection hint
: Search with selection heading - change default heading for Search with selection
: Global search box heading - change default heading for Global search box
: Search button (Global search box) - change default label for Search button
 
* Create tiles - need to be selected if the map tiles should be created, otherwise only the meta files are created
* Create tiles - need to be selected if the map tiles should be created, otherwise only the meta files are created


Line 55: Line 63:


'''Control Options:'''
'''Control Options:'''
* Show layer selector - enables the user select different POI groups
* Show layer selector - enables the user to select different POI groups
* Show overview map - enables the overview map feature
* Show overview map - enables the overview map feature
: Maximize overview map - shows the map maximized by default
: Maximize overview map - shows the map maximized by default
* Show coordinates - show coordinates in the lower right corner
* Show coordinates - show coordinates in the lower right corner
* Show permalink - enables the user the ability to link to a specific zoom, map view and layers
* Show permalink - enables the user the ability to link to a specific zoom, map view and layers
* Map legend - if activated, you can select a file to display a map legend (jpg, png, gif)
* Advertisement - if activated, you can select a file for an advertisement (jpg, png, gif)


'''Color and Size Settings:'''
'''Color and Size Settings:'''
* Header font color - color of the map title
* Header text color - color of the map title
* Header background color - background of the map title
* Header background color - background of the map title
* Sub header font color - color of the map subtitle
* Subheader font color - color of the map subtitle
* Subhead background color - background of the map subtitle
* Subheader background color - background of the map subtitle
* Border color - border color of the map
* Border color - border color of the map
* Site background color - general site background
* Site background color - general site background


* Font size - font size of the map title
* Font size - font size of the map title
* Sub header font size - font size of the map subtitle (e.g. copyright)
* Subheader font size - font size of the map subtitle (e.g. copyright)
* Border width - thickness of the border
* Border width - thickness of the border


Line 84: Line 94:
|[[File:OIMExportAssistantPOIOverview.png‎|thumb|left|400px|Overview about all POI's exported]]
|[[File:OIMExportAssistantPOIOverview.png‎|thumb|left|400px|Overview about all POI's exported]]
|}
|}
[[File:Hint.jpg]] Points of Interest (POI), like Restaurants, Hotels or train stations can only displayed in the web map, if they have been added to the OCAD map before.


Choose '''Add''' to add a POI layer. The '''POI Selector''' dialog box appears:
Choose '''Add''' to add a POI layer. The '''POI Selector''' dialog box appears:
Line 91: Line 102:
* Condition - with an SQL expression the result set can be limited.<BR>  
* Condition - with an SQL expression the result set can be limited.<BR>  
e.g.:<BR>  
e.g.:<BR>  
location like 'myplace'<BR>
TYPE LIKE “Hotel”
or<BR>
or<BR>
symbolnumber = 521.000<BR>
symbolnumber = 521.000<BR>
* Location field - name, it's the main name of the POIs, which is shown in the search
* Location field - Name. It's the main name of the POIs, which is shown in the search
* Hover title on mouse over - a tooltip will be provided if the mouse moves over the poi
* Hover title on mouseover - a tooltip will be provided if the mouse moves over the POI
* Highlight POI through search result - an arrow will blink three times when the POI is selected from the search box
* Highlight POI through search result - an arrow will blink three times when the POI is selected from the search box
* Visible from zoom level - shows the entire overlay starting from the given zoom level. e.g.: show from zoom level 3 on
* Visible from zoom level - shows the entire overlay starting from the given zoom level. e.g.: show from zoom level 3 on
* Point of interest type:
* Points of Interest type:
:: -Point (vector) - POIs are drawn as yellow dot on the map
:: -Point (vector) - POIs are drawn as vector points on the map
:: -Icon (information bubbles) - POIs are represented with the provided icon file
:: -Icon (information bubbles) - POIs are represented by the provided icon file


-> Click '''Next'''
-> Click '''Next'''


===== POI Icon Settings (if choosen) =====
===== POI Selector: Icon Settings (if choosen) =====
Icon settings (only if '''icon''' is chosen in the previous step):
Icon settings (only if '''icon''' is chosen in the previous step):
* Icon - click the '''select''' button and choose a file (red background if file not found)
* Icon - click the '''select''' button and choose a file (red background if file not found)
Line 112: Line 123:
-> Click '''Next'''
-> Click '''Next'''


===== POI Vector Settings (if chosen) =====
===== POI Selector: Vector Settings (if chosen) =====
Vector settings (only if '''vector''' is chosen in the previous step):
Vector settings (only if '''vector''' is chosen in the previous step):
* Point fill color - represents the main color of the vector point. Opacity settings apply to this color.
* Point fill color - represents the main color (fill color) of the vector point.  
* Point stroke color
* Point stroke color - represents the outline color
* Point radius - size of the vector point
* Point radius - size of the vector point
* Point fill opacity - applies to the main color.
* Point fill opacity - applies to the main color
* Point stroke opacity - applies on the stroke color
* Point stroke opacity - applies to the stroke color


If you set both values to 0 - they are transparent to the web map user.
[[File:Hint.jpg]] If you set both opacity values to 0, the vector points are transparent to the web map user. However,the points will still provide information for queries and mouseover events.
-> Click '''Next'''
-> Click '''Next'''


===== POI General settings =====
===== POI Selector: General settings (if previously chosen Vecor Settings)=====


* Short description - database field containing short description (important for search)
* Short description - database field containing short description (important for search)
* Description - database field containing description for the info bubble or the right info box
* Description - database field containing description for the info bubble or the right info box
* URL field - database field containing the URL
* URL field - database field containing the URL
* Link name - database field containing a link name - if the URL should be shown select the same as in URL
* Link name - database field containing a link name  
[[File:Hint.jpg]] If the URL should be shown select the same field as for the URL
* Link target - link target for the browser
* Link target - link target for the browser
: _blank - opens the linked target in a new window or tab
: _parent - opens the linked target in the parent frame 
: _self - opens the linked target in the same window/tab as it was clicked
: _top - opens the linked target in the full body of the window


URL, Link name and target are not mandatory fields.
URL, Link name and target are not mandatory fields.
Line 143: Line 159:




Choose a directory and '''Save''' the file. To see the exported internet map open the *.html file in the browser.
Choose a directory and '''Save''' the file. To see the exported internet map, open the *.html file in the browser.


The search functionality only works on a server with PHP support otherwise the error message '''AJAX error: 0''' occurs.<br>
The search functionality only works on a server with PHP support otherwise the error message '''AJAX error: 0''' occurs.<br>
Line 150: Line 166:
On the site [[HTML_Entities| HTML Entities]] the supported and convertable HTML characters can be seen.
On the site [[HTML_Entities| HTML Entities]] the supported and convertable HTML characters can be seen.


More advanced functions can be scripted. Examples can be found under [[OCAD_Internet_Map_scripting | OIM scripting]]
[[File:Hint.jpg]] If you have stored your web map files locally, the POI will be displayed correctly only in Firefox at the moment. However, as soon as the web map files have been uploaded on your web server, the POI are also displayed correctly in other common browsers.
 
[[File:Hint.jpg]] Let’s assume you check your OIM in your browser after the export. The map tiles have been exported properly, but there’s something wrong with your POI. So, if you re-export your map, just skip the option '''Create tiles''' in the General project settings. The export will thereby run much faster, especially if you have big maps.


=== OCAD Internet Map Example St.Moritz===
Example of an OCAD Internet Map export: [http://ocad.com/demo/OIM_StMoritz/StMoritz.html Internet Map St. Moritz]
Example of an OCAD Internet Map export: [http://ocad.com/demo/OIM_StMoritz/StMoritz.html Internet Map St. Moritz]
== Extend OIM Functionality with Scripting==
More advanced functions can be scripted. Examples can be found under [[OCAD_Internet_Map_scripting | OIM scripting]]




== How To Add Second Base Map Layer to the OCAD Internet Map==
== How To Add Second Base Map Layer to the OCAD Internet Map==


* Make 2 OCAD Internet Map exports with different base map (ex. one with a topographic map and the other with an aerial image). Save them to different folders.
* Export two OCAD Internet Map exports with a different base map (ex. one with a topographic map and the other with an aerial image). Save them to different folders.
* Navigate to the folder of the 2nd export and rename the sub folder ''map_tiles'' to ''map_tiles2''.
* Navigate to the folder of the 2nd export and rename the sub folder ''map_tiles'' to ''map_tiles2''.
* Copy ''map_tiles2'' to the folder of the 1st OIM export. There should be now two sub folders ''map_tiles'' and ''map_tiles2''.
* Copy ''map_tiles2'' to the folder of the 1st OIM export. There should be now two sub folders ''map_tiles'' and ''map_tiles2''.
Line 172: Line 194:
</gallery>
</gallery>


Previous Chapter: [[Server Client]]


Next Chapter : [[Tutorials]]
----
Back to [[Main Page]]
 
Previous Chapter: [[Client Server Architecture]]


Back to [[Main Page]]
Next Chapter: [[Tutorials]]

Latest revision as of 16:05, 23 May 2017

Export OIM Space.PNGThis function is available in OCAD 12 Professional.

Export.PNG


Choose Export OCAD Internet Map from File menu to export the map as OIM (OCAD Internet Map). With OIM you can publish big OCAD maps on internet. Additionally, it is possible to display and query Points of Interest (POI). You can insert the OCAD Internet Map to a HTML file.

  • Resolution: Enter here the resolution for the map tiles (GIF).
  • Part of map: Activate this check box to export a part of the map. The map section will be shown with a rectangle on the drawing window. You can alter the rectangle with the mouse.
Click the Setup button setup to define the part of map to be exported by coordinates. The dialog box Setup Part of Map (Export) appears.
Click the Entire map button entire map to export the entire map.
Click the To current view button to current view to export the currently on the screen displayed map.
If this check box is not active the entire map will be exported.

Hint.jpg It is also possible to choose a defined format like A4 landscape.

-> Click Export. The Export OCAD Internet Map dialog box appears.

OCAD Internet Map (OIM) Export Wizard

General Project Settings

  • Map title - heading of the map
  • Map subtitle - may be a copyright statement or similar
  • Choose the favoured postition of the Map tile/ Map subtitle by clicking on the corresponding button.

Base map layout:

  • Base layer name - name of the map (e.g. St. Moritz - OCAD Internet Map Example)
  • Edit layer enable - enables the users the ability to draw on the map
  • Search with selection - search only in one POI category, for example streets
  • Classic layout - use default layout for export
  • Global searchbox - search for POI's (works only with PHP support)
  • OCAD Slogan - displays OCAD slogan on your exported map
POI selection hint - change default label for POI selection hint
Search with selection heading - change default heading for Search with selection
Global search box heading - change default heading for Global search box
Search button (Global search box) - change default label for Search button
  • Create tiles - need to be selected if the map tiles should be created, otherwise only the meta files are created

-> Click Next

Zoom Level Settings

Select Zoom from and Zoom to levels which are created. Be aware that the overview map need a zoom level 0.

Generated levels are highlighted green, not created levels are grayed out. If the file is not found it is highlighted in red.

  • Relink - change the folder of all maps
  • Change - change the map for the selected zoom level
  • Reset all to current file - currently opened file is taken for all zoom levels

-> Click Next

Layout and Functionality Settings

Control Options:

  • Show layer selector - enables the user to select different POI groups
  • Show overview map - enables the overview map feature
Maximize overview map - shows the map maximized by default
  • Show coordinates - show coordinates in the lower right corner
  • Show permalink - enables the user the ability to link to a specific zoom, map view and layers
  • Map legend - if activated, you can select a file to display a map legend (jpg, png, gif)
  • Advertisement - if activated, you can select a file for an advertisement (jpg, png, gif)

Color and Size Settings:

  • Header text color - color of the map title
  • Header background color - background of the map title
  • Subheader font color - color of the map subtitle
  • Subheader background color - background of the map subtitle
  • Border color - border color of the map
  • Site background color - general site background
  • Font size - font size of the map title
  • Subheader font size - font size of the map subtitle (e.g. copyright)
  • Border width - thickness of the border

-> Click Next

Points of Interest (POI)

Overview about all POI's exported

Hint.jpg Points of Interest (POI), like Restaurants, Hotels or train stations can only displayed in the web map, if they have been added to the OCAD map before.

Choose Add to add a POI layer. The POI Selector dialog box appears:

  • Title - name of the layer
  • Dataset - dataset to choose from
  • Condition - with an SQL expression the result set can be limited.

e.g.:
TYPE LIKE “Hotel” or
symbolnumber = 521.000

  • Location field - Name. It's the main name of the POIs, which is shown in the search
  • Hover title on mouseover - a tooltip will be provided if the mouse moves over the POI
  • Highlight POI through search result - an arrow will blink three times when the POI is selected from the search box
  • Visible from zoom level - shows the entire overlay starting from the given zoom level. e.g.: show from zoom level 3 on
  • Points of Interest type:
-Point (vector) - POIs are drawn as vector points on the map
-Icon (information bubbles) - POIs are represented by the provided icon file

-> Click Next

POI Selector: Icon Settings (if choosen)

Icon settings (only if icon is chosen in the previous step):

  • Icon - click the select button and choose a file (red background if file not found)
  • Icon offset - offset from the anchor point
  • Icon size - size of the icon (only in html, image will not be resized)

-> Click Next

POI Selector: Vector Settings (if chosen)

Vector settings (only if vector is chosen in the previous step):

  • Point fill color - represents the main color (fill color) of the vector point.
  • Point stroke color - represents the outline color
  • Point radius - size of the vector point
  • Point fill opacity - applies to the main color
  • Point stroke opacity - applies to the stroke color

Hint.jpg If you set both opacity values to 0, the vector points are transparent to the web map user. However,the points will still provide information for queries and mouseover events. -> Click Next

POI Selector: General settings (if previously chosen Vecor Settings)
  • Short description - database field containing short description (important for search)
  • Description - database field containing description for the info bubble or the right info box
  • URL field - database field containing the URL
  • Link name - database field containing a link name

Hint.jpg If the URL should be shown select the same field as for the URL

  • Link target - link target for the browser
_blank - opens the linked target in a new window or tab
_parent - opens the linked target in the parent frame
_self - opens the linked target in the same window/tab as it was clicked
_top - opens the linked target in the full body of the window

URL, Link name and target are not mandatory fields.

-> Click Finish


Choose a directory and Save the file. To see the exported internet map, open the *.html file in the browser.

The search functionality only works on a server with PHP support otherwise the error message AJAX error: 0 occurs.
ExportOimAjaxError0.png

On the site HTML Entities the supported and convertable HTML characters can be seen.

Hint.jpg If you have stored your web map files locally, the POI will be displayed correctly only in Firefox at the moment. However, as soon as the web map files have been uploaded on your web server, the POI are also displayed correctly in other common browsers.

Hint.jpg Let’s assume you check your OIM in your browser after the export. The map tiles have been exported properly, but there’s something wrong with your POI. So, if you re-export your map, just skip the option Create tiles in the General project settings. The export will thereby run much faster, especially if you have big maps.

OCAD Internet Map Example St.Moritz

Example of an OCAD Internet Map export: Internet Map St. Moritz

Extend OIM Functionality with Scripting

More advanced functions can be scripted. Examples can be found under OIM scripting


How To Add Second Base Map Layer to the OCAD Internet Map

  • Export two OCAD Internet Map exports with a different base map (ex. one with a topographic map and the other with an aerial image). Save them to different folders.
  • Navigate to the folder of the 2nd export and rename the sub folder map_tiles to map_tiles2.
  • Copy map_tiles2 to the folder of the 1st OIM export. There should be now two sub folders map_tiles and map_tiles2.
  • Navigate from the 1st OIM export folder to the sub folder scripts and open the file BasisFunctions.js in a text editor. Duplicate the function overlay_getTileURL and rename the 2nd to overlay_getTileURL2. Within this ''overlay_getTileURL2 function rename map_tiles to map_tiles2.
  • Open the OIM main html file from the OIM export folder in an editor and duplicate the basemap section and add them as basemap1 and basemap2. Change the layer name for basemap2 to Orthophoto (or something else...) and call the overlay_getTileURL2. Duplicate also map.addLayer(basemap) add it as map.addLayer(basemap1) and map.addLayer(basemap2).



Back to Main Page

Previous Chapter: Client Server Architecture

Next Chapter: Tutorials