Markers > Connectors |
||||||||||||||||||||||||||||||||||||||||||||||||
FusionMaps also allows you to connect any two defined markers on the map using Marker Connectors. You can show custom labels for the marker connectors, link it to external URLs, show tool tips for the connector and customize all the cosmetics. Here, we'll see how to define and use marker connectors. Shown below is an example of marker connectors where we've defined a few cities on the US Map and then connected them using connectors: |
||||||||||||||||||||||||||||||||||||||||||||||||
As you can see above, we've defined a few cities as markers and used the image marker feature to show a plane icon for each of them. Thereafter, we've connected the markers using connectors. The following XML drives this map: |
||||||||||||||||||||||||||||||||||||||||||||||||
<map showShadow='0' showBevel='0' showMarkerLabels='0' useHoverColor='0' showLabels='0' showCanvasBorder='0' mapRightMargin='0' fillColor='AFCED9' bordercolor='FFFFFF' markerBgColor='00577F' animation='1' </markers> |
||||||||||||||||||||||||||||||||||||||||||||||||
Here, we first define the properties of map as attributes of <map> element. Then, we define the data for the map (which has been intentionally omitted in the XML above). Soon after that, we first define our custom markers for the map and apply them. As previously explained, each marker has its id, x, y and label. Also, we use an image marker shape to show each marker on the map. The newly introduced element in this XML is the <connectors> element. As children of this element, you'll find multiple <connector> element - one for each connector on the map. Each connector element helps you connect two defined markers on the map. To define which connectors to connect, you specify the marker ID as: <connector from='From_Marker_ID' to='To_Marker_Id' .../> You need to make sure that the marker IDs specified in <connector> element is defined in the XML. Additionally, we've defined the toolText for each connector and specified a few cosmetic properties here. Each <connector> element can have the following attributes: |
||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||