Getting Started with iClient Classic |
SuperMap iClient Classic for JavaScript development process is as follows:
Figure 1 SuperMap iClient Classic for JavaScript development process
Below we will show you how to use SuperMap iClient Classic for JavaScript to build a simple map application.
Figure 2 SuperMap iClient Classic for JavaScript package structure
Create a new folder on any location of the disk and rename it, here rename it "MyFirst"; Create a html page named "GettingStarted.html" with text editing tool (like NotePad++) in the folder, save the html page in UTF-8 encoding formating, add the following code:
HTML | |
---|---|
|
Two steps for the referencing:
Copy the "resource" folder in Step1 to "MyFirst" folder;
Copy the libs folder to "MyFirst" folder;
Of course, the libs and the resource folder can also be placed in other places, then need to modify the code in the next step in the relative path of the reference script.
Add the following code between <html> and <body> to create the map.
JavaScript | |
---|---|
|
Start SuperMap iserver Classic and run the GettingStarted.html file, view map data.
Figure 3 World Map visiting the SuperMap iServer services