Additional Customization
Below are some additional things you can do to customize CanvasMap.
Subclass an element
Create the element and use SetElement() to specify the new element before initialization. The element should have the standard ID with "_<Index>" added.
Do your own positioning on resize
If you just want to change the resizing for a few elements, you can call CanvasMap.Resize() and then reposition any element you desire. If you are going to provide positioning for all elements in the map, there is no reason to call CanvasMap.Resize().
Provide an HTML layout for the map:
This is definitely an advanced feature but can be done with CanvasMap. You will need to provide an entire set of elements for CanvasMap to work with.
- Examples: Move layer list to the left side of the map
- Use the same names as those defined in CanvasMap.js for the elements. Remember to and "_<Index>" where "<Index>" is the index to the CanvasMap on your page (e.g. the first map would have ("_0") added to each name, the second would have ("_1"), etc.). Then, call SetGetExistingElement() and CanvasMap will search for your elements when initializing the map.
- In this case, you will typically need to replace the Resize() function in CanvasMap as well so that CanvasMap does not try to position the elements where it traditionally does.