- Maps - Bing Maps
·Map Script Writers
·Bing Maps
·Google Maps
Mail List


AddShape Custom Text LatLong Pushpin with Info Box
This is an example of a simple map with a pin (custom text instead of an image is used) added at the coordinate 41.948182, -87.655527 (Wrigley Field) on the map using the addshape method. The pin is also set with an info box with the address which is visable when the mouse pointer hovers over the text. The size of the map is set to 640 x 480.
View the Output
Text View
Print View
Mail this Link

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<title> - AddShape Custom Text LatLong Pushpin with Info Box</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- add a META element with the charset attribute set to "utf-8", as follows
Your page must use UTF-8 encoding to create some elements of the map -->

<!-- Reference to the map control -->
<script type="text/javascript" src=""></script>
<script type="text/javascript">
// set the value of the varible map to null
var map = null;

// create a function to load the details of the map
function GetMap()
// Initialize a new instance of the VEMap class
map = new VEMap('myMap');
// Load the specified map

// set varible pin to VEShape/Type Pushpin with the center of the map as it's specific lat/long location
var pin = new VEShape(VEShapeType.Pushpin,new VELatLong(41.948182, -87.655527));

// Set the title portion of the info box
pin.SetTitle("Wrigley Field");

// Set the title description portion of the info box
pin.SetDescription("<table><tr><td> <font color=#0000FF>1060 W. Addison Street.<br>Chicago, IL</td></tr></table>");

// Place formatted text in place of the default icon
pin.SetCustomIcon("<div style='font-size:10px;border:solid 1px Red;background-color:White;width:60px;'>Wrigley Field</div>");

// use addshape to add the pin
<!-- Run the GetMap function to load the map into the page -->
<body bgcolor=#FFFFFF onload="GetMap();">
<table align=center border=1>
<!-- Add a DIV element to the page to contain the map and assign it a location and size-->
<div id='myMap' style="position:relative; width:640px; height:480px;"></div>
<!-- If not specified a default width of 600 pixels is used and a default height is 400 pixels -->


ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement is hosted by
    Donate Food Online with a Mouse Click at
    Donate Land Online with a Mouse Click at
    © 1999 - 2018
    All Rights Reserved