Using Data URL Method |
In this section we will see how to render a map using Data URL method - where the XML data is created in a file other than what we use to generate the map. The page that contains the code to render the map is referred to as Map Container Page and the other one which creates the XML data is called Data Provider Page. |
Before proceeding further, we recommend to go through the section How FusionMaps XT works? for a better insight. |
All code discussed here is present in Download Package > Code > PHP > BasicExample folder. |
Map Container Page |
Map Container Page contains the following code. You can view this code in BasicMapsURL.php file. |
<HTML> # Finally Rendering the World8 Maps with renderChart() php function present in FusionCharts.php (which we have already included) |
Steps involved in this code: |
|
Now, let us discuss about the Data Provider Page getURLdata.php in details. |
Data Provider Page |
Here is the code used in the Data Provider Page, which is getURLdata.php in this example. |
<?php |
(Here we have used the same code for XML creation that we used in the Data String example.) |
Steps involved in this code |
|
Here is the snapshot of the final map: |