World Map v1.1 

The map of the world holds coordinate pairs to generate map images from database. This data can be used to draw maps on server side in PNG, JPEG, GIF, WBMP formats and to build click areas (image maps) for processing on client side.

Italy, Mauritania, Mexico, Venezuela, North Korea and Philippines have been removed from the free version of the map. Full version is available in Active Image commercial version. Active Image v 4.4

Platform: Windows 95/98/ME/NT/2000/XP. 

Can be used in all programs that can call ActiveX components. It includes ASP, IIS, MS Word, Access, Excel and many others. Coordinate data can also be used separately in your development projects.

Europe

Sample 1. Client-side image maps (europe.asp)

 

The downloadable distribution package includes:

  • dbw.mdb MS Access Database.
  • airlaine.vbs
  • europe.vbs
  • gradient.vbs 
  • random.vbs
  • worlddiagram.vbs
  • worldgray.vbs
  • worldmap.html


Download demo version World Map v1.1 (it demands installed demo or full version of Active Image).

Features:

  • More than 200 countries and islands
  • Works with ActiveImage 4.4
  • Good performance and high image generation speed
  • Builds client-side image maps from coordinates stored in database
  • Draws special graphics like charts, signs, symbols and text. See example 3.
  • Fills polygons with predefined colors. See sample 2.

Features (for developer):

  • The possibility to change map center and scale
  • Region selection
  • Mainland show
  • Conversion to globe type images
  • Latitude and longitude binding

Quick start instruction to use World Map

  • Register ActiveImage component on your computer (it's not necessary to have a server). Run Start->Run dialog and type "path_to_regsvr\regsvr32.exe path_to_activeimage\ActiveImage.dll". Make sure you specify correct paths. For example, "C:\windows\regsvr32.exe C:\ActiveImage\ActiveImage.dll". You should see "ActiveImage DLL registered successfully" message.
  • Run script VBS   

Quick start instruction for ASP developers

  • Create a web-site or virtual directory
  • Register ActiveImage component on your computer (it's necessary to have a Web server like IIS or PWS). Go to menu "Start", choose "Command Prompt" and change the directory to where ActiveImage component is located. Run from command line "regsvr32 ActiveImage.dll". You should see "ActiveImage DLL registered successfully" message.
  • If you have problem with registration, try to specify path before regsvr32.exe and ActiveImage component. For example, "C:\windows\regsvr32.exe C:\ActiveImage\ActiveImage.dll"
  • Place ASP script from distribution package to your virtual directory.
  • Open corresponding url from your browser.

Sample 2. Drawing World Map
WorldDiagram.vbs


Dim im

'Create component to draw the image 
Set im = CreateObject("ActiveImage.Images.1")

'Declare array for coordinate pairs
Dim coord(6000)

'Declare database access objects
Dim AdoConnDim rs

'Connect to database
Set AdoConn = CreateObject ("ADODB.Connection")
AdoConn.Provider = "Microsoft.Jet.OLEDB.4.0"
AdoConn.ConnectionString = "Data Source=dbw.mdb"
Set rs = CreateObject("adodb.recordset")
AdoConn.Open

'Open the table with coordinates
rs.Open "worlddata", AdoConn, 2, 3

w = 2168
h = 1115

'Create image
im.CreateImage w,h

'Select blue color and fill the image
im.SetColor 127,127,255
im.DrawFilledRectangle 0,0,w,h


ipixel = 0
ireg = -1
icountry = -1

'Pass through all points

do  while not rs.eof

x = rs(1)
y = rs(2)
c = rs(3)
r = rs(4)

'If encountered another country, would draw the previous one
if (ireg <> r ) or (icountry <> c) then
  if (ipixel > 2 and ipixel < 9000) then
    'Draw the country in gray with black borders
    im.SetColor 127,127,127
    im.DrawFilledPolygon coord, 2*(ipixel)
    im.SetColor 0,0,0
    im.DrawPolygon coord, 2*(ipixel)
   else
     for ii = 0 to ipixel
      if coord(2*ii) <> "" and coord(2*ii+1) <> "" then
        im.SetPixel Cint(coord(2*ii)), CInt(coord(2*ii+1))
      end if
    next
  end if
  
  ipixel = 0
  icountry = c
  ireg = r
end if

ipixel = ipixel + 1

'Set coordinates in array
coord((ipixel-1)*2) = xcoord((ipixel-1)*2+1) = y

rs.movenext
loop

'Draw the last country
if (ipixel > 2 and ipixel < 9000) then
  'Draw the country in grey with black borders
  im.SetColor 127,127,127
  im.DrawFilledPolygon coord, 2*(ipixel)
  im.SetColor 0,0,0
  im.DrawPolygon coord, 2*(ipixel)
else
  for ii = 0 to ipixel
    if coord(2*ii) <> "" and coord(2*ii+1) <> "" then
      im.SetPixel Cint(coord(2*ii)), CInt(coord(2*ii+1))
   end if
  next 
end if

'Close data access
rs.Close
AdoConn.Close
Set rs = Nothing
Set AdoConn = Nothing
'Save the image into file
im.WriteToFile "worldgray.png"
'Free memory and delete object
im.DestroyImage
Set im = Nothing



 

Picture 2. World Map. One color coloring. The fragment of the full map. Large


Sample 3-4 . Random.vbs Gradient.vbs

 

Picture 3. Random coloring. Large Picture 4. Gradient coloring. Large




Possible application areas:

  • For marketing research
    • Sales volume by country
    • Number of customers
    • Evaluation of advertising campaigns
    • Visualization by drawing charts by countries
  • Ecology, science, history, weather, agriculture
    • Pollution
    • Atmospheric precipitates
    • Temperature
    • Parcel squares
    • Ozone
    • Historical data, discovery dates, directions of military operations
    • Satellite locations
    • Time zones, days and nights
  • Software developers
    • Software development where you need the map of the world
    • Code and data modernizations with SQL language
    • Good source for further development (open source code)
  • Site/Server administrator
    • Web site popularity information
    • Keep track of advertisement campaign statistics
    • Make out possible attacks, checking IP addresses and countries correspondence
    • Trace ways of accessing your site by countries
    • Watch statistics by countries
    • See navigation and other site data
    • The possibility to define site area for a specific country.
    • You can highlight specific countries
    • Show distributions by countries for surveys, polls and quizzes
    • Show maps on your sites
  • For online games like
    • Guess a country
    • Guess country capitals
    • List neighbor countries
  • Travel, tour and airline data
    • Railroads
    • Airlines
    • Bus routes
    • Shipping routes
    • Display the locations of ships, airplanes, and expeditions

 


The following countries are represented on the map:  

Abidjan, Afghanistan, Albania, Algeria, American Samoa, Andorra, Angola, Anguilla, Antarctica, Antigua and Barbuda, Argentina, Armenia, Australia, Austria, Azerbaijan, Bahrain, Bangladesh, Barbados, Belarus, Belgium, Belize, Benin, Bermuda, Bhutan, Bolivia, Botswana, Brazil, British Virgin Islands, Brunei, Bulgaria, Burkina Faso, Burundi, Cambodia, Cameroon, Canada, Cape Verde, Cayman Islands, Central African Republic, Chad, Chile, China, Colombia, Comoros, Congo, Cook Islands, Costa Rica, Cuba, Cyprus, Czech Republic, Denmark, Djibouti, Dominica, Dominican Republic, Ecuador, Egypt, El Salvador, Equatorial Guinea, Eritrea, Estonia, Ethiopia, Falkland Islands (Islas Malvinas), Fiji, Finland, France, French Guiana, French Polynesia, Gabon, Georgia, Germany, Ghana, Greece, Greenland, Grenada, Guadeloupe, Guam, Guatemala, Guinea, Guinea-Bissau, Guyana, Haiti, Honduras, Hungary, Iceland, India, Indonesia, Iran, Iraq, Ireland, Israel, Italy, Jamaica, Japan, Jordan, Kanar Islands, Kazakstan, Kenya, Kiribati, Korea, North, Korea, South, Krait, Kuwait, Kyrgyzstan, Laos, Latvia, Lebanon, Lesotho, Liberia, Libya, Liechtenstein, Lithuania, Luxembourg, Madagascar, Malawi, Malaysia, Malazia, Maldives, Mali, Malta, Martinique, Mauritania, Mauritius, Mexico, Micronesia, Miena, Moldova, Monaco, Mongolia, Morocco, Mozambique, Namibia, Nauru, Nepal, Netherlands, New Caledonia, New Zealand, Nicaragua, Niger, Nigeria, Northern Mariana Islands, Norway, Oman, Pakistan, Palau, Panama, Papua New Guinea, Paraguay, Peru, Philippines, Poland, Portugal, Qatar, Reunion, Romania, Russia, Rwanda, Saint Kitts and Nevis, Saint Lucia, Saint Vincent and the Grenadines, San Chuan, Sao Tome and Principe, Saudi Arabia, Senegal, Seychelles, Sierra Leone, Singapore, Slovakia, Slovenia, Solomon Islands, Somalia, South Africa, Spain, Sri Lanka, Sudan, Suriname, Swaziland, Sweden, Switzerland, Syria, Taiwan, Tajikistan, Tanzania, Thailand, The Bahamas, The Gambia, Togo, Tokelau, Tonga, Trinidad and Tobago, Tunisia, Turkey, Turkmenistan, Turks and Caicos Islands, Tuvalu, Uganda, Ukraine, United Arab Emirates, United Kingdom, United States, Uruguay, Uzbekistan, Vanuatu, Venezuela, Verging Island, Vietnam, Western Sahara, Yemen, Yugoslavia, Zaire, Zambia, Zimbabwe.

 


Note that Tonec Inc. also provides custom programming and cost-effective offshore software development services. 

If you have any questions or bug reports, write to active.image@tonec.com for technical support.