The MapProvision Viewer can be embedded
on your website and gives your website visitors the ability to select
thematic overlay layers to display your data on Google Maps and to
analyze the data using animation and charting.
Here are the steps to publish your
spatial data on your website, blog or intranet and store your data
in your own personal Google Fusion Table owned by your Google
account.
- Launch the MapProvision Manager from the www.mapprovision.com website.
- You will be prompted to log in to your Google account which will be used to store your data uploads.
If you do not have a Google account you can click sign up to create your Google account.Once you have logged in to your Google account if it is your first time using the Manager you will be prompted to authorize the MapProvision application to access your Google Fusion Tables on your behalf. The OAuth authorization screen is shown below.
- After granting access you will be redirected to the MapProvision Manager. A Freemium account will be created for you containing an example Data Collection called Examples containing datasets and image layers that you can experiment with.
- The next step is to create a new Data Collection to contain the data that you are going to upload. A Data Collection is set of data sets that has its own unique link that can be published to your website or viewed as a stand alone web page. It also contains options for how you want the Map to appear such as location, zoom level and how the layers will be displayed in the layer tree presented to the user. To create a new data collection open up the Manage Data Collections tree on the left and select: *New Data Collection.
- This will show a form asking for the name of your Data Collection. Give it a name and click Save.
- The Manage Data Collection tree on the left will refresh and
you can re-open it to see your newly created data collection in the
tree. Clicking on Manage <your newly create data collection name>, will show the Manage tab to start managing your
data collection.
- The first thing we want to do is upload some spatial data.
You can use your own but in this walk through we will be uploading a
data file containing flood modeling data and infrastructure
information about the Boston Metropolitan area.
You can download the file used in this example by clicking here.
- Click the 'Add Data Set' button. This will launch the add data set wizard. Enter the dataset name, description, and creator name
- Then click the Layers tab to select your layers. For this
data set we want to select the Raster Grid and Density layers.
Because we are selecting the Raster Grid layer which is a grid layer we need to select the aggregation function that will be used to represent all the values that occur within each grid on the map. For this data set we will chose Mean which will use an average of all the data points inside each grid cell.
- Next click the Import Data tab. This is the tab we will use
to upload your data file.
Select File from the Data Source drop down box. This will show the file upload tools.
-
Click the Browse button to locate your spatial data file on your
local hard drive. Select the Boston Flood Model file and click Open.
This will start the file upload with the progress shown in the
progress bar. Once this has finished you will see all the fields identified in the data file shown in the dual select box. The fields on the right
are fields that have been identified as having a numeric value. If
there are any fields shown that you do not want to be represented as
spatial layers then you can move them to the left box by selecting
then and using the left arrow.
- Once you are happy you can click Save which will then store your newly created dataset into your data collection.
- Next we want to make changes to how the map will be
presented for this data collection in the MapProvision viewer. To do
this click the Options button.
This will launch the Options form.
Using the map's drag and zoom tools position the map so it is covering the Boston metropolitan area. Also we want to set the width of the layer tree to 270 so the layer tree can fit the names of all the layers without the user having to scroll. So put the value of 270 into the field called "Layer Tree Width". Once this is done click Save. From now on when this data collection is loaded in the viewer the map will be at the position that you have selected.
- Next we want to configure how our layers will be arranged in
the viewer's layer tree. To do this click the Organize Folders
button.
This will launch the Organize Folders tool.
For this data set we want the flood model attributes to be displayed as raster grid layers and the infrastructure attributes to be displayed as density layers. To do this open up the Raster Grid folder and drag the minimum, average, and maximum flood level layers to the the bottom of the tree so they are outside all the folders. Do the same with the density infrastructure layers so the tree looks like this.
We also want to change the name of the individual layers from the default generated layer names. In this case we want to remove the "(Mean)" label from the end, as all our aggregated layers are of type Mean. To do this double click the layer label to put it into edit mode and delete the "(Mean)" from the end of the label.
Now we can simply delete all the folders as we no longer require them as this data collection only has a few layers, and folders are not necessary to organize them. To delete the folders select them and right click and choose Remove. Once your layer tree looks like the following click save.
- That’s it now we can preview our newly created data
collection. Click the Publish button to launch the data collection
publish tool.
Select “Stand Alone URL” from the drop down box. Copy the web address shown by selecting it and right clicking Copy. Open up a new browser tab and right click in the URL text box and select Paste and hit return. Your newly created data collection containing Boston Flood data is displayed.
You can also embed it in your website by selecting “Show Full Screen Link” and copying and pasting the HTML code shown into your webpage which I have done here in this blog entry:
The following diagram shows how attributes are mapped to spatial layers in the data collection.
+ Full Screen
No comments:
Post a Comment