Визиком карты

Map

This page shows an example of a simple integration of maps into a web page.

Example:

Source code:

To show the map on your site, just create a HTML file with the following content.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
 <head>
  <title>Maps of Ukraine - Visicom Maps API 2.0.0</title>
  <meta http-equiv="imagetoolbar" content="no" />
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
 </head>
 
 <body>
  <script type="text/javascript" src="http://maps.visicom.ua/api/2.0.0/map/world_ru.js"></script>
  <div id="viewport" style="width: 740px; height: 580px;">
   <a id="visicom_copyright_link" href="http://maps.visicom.ua/">map of the Kiev</a>
  </div>
 
 <script type="text/javascript">
 
  var map;
  function createVisicomMap() {
   map = new VMap(document.getElementById('viewport'));
   var point = {lng: 30.5112, lat: 50.4550};
   map.center(point, 5);
  }
 
 </script>
 
 </body>
</html>

Initialize must perform the function createVisicomMap().
String var map = new VMap (document.getElementById('viewport')); creates an object map.
As a mandatory parameter passed a reference to HTML element on the page, in which the map will be displayed.

Options of the map

When you create VMap object you can pass options to customize the appearance of the map.

The next example removes the scale ruler and sets minimum and maximum scales of the map.