GoogleMaps JSP Taglibrary  

Example 21 - The Debugger

Ever made a map and wondered, "Where's my marker?", "What happened to my polyline?", "Why doesn't my map do _____ when I _____?". The debugger window can help.

This maps displays how the debugger window functions. You'll see the window in the bottom left hand corner of this page. This map is the same as displayed on our homepage, only it shows you what's going on through the debugger window. Any time a component is added, a map type is registered, or an event listener is added, the debugger window displays it.

The debugger window only works on version 2 maps. Setting the debug option on version 1 maps will have no effect.

Here's the code we used:

<googlemaps:map id="Test" width="780" height="300" version="2" type="STREET"
    debug="true">
  	<googlemaps:key domain="www.lamatek.com" key="xxxxx"/> 	
  	<googlemaps:point id="point3" longitude="-78.0" latitude="39"/>
  	<googlemaps:point id="point2" longitude="-77.0" latitude="38"/>
  	<googlemaps:point id="point1" longitude="-76.0" latitude="37"/>
  	<googlemaps:box id="box1" pointlist="point1, point3" color="#00ff00" weight="5"/>
  	<googlemaps:marker id="marker1" point="point1">
		<googlemaps:infowindow display="false">
		You can use HTML (including images <img src="/GoogleMaps/images/loading.gif"/>)...
		</googlemaps:infowindow>
	</googlemaps:marker>
	<googlemaps:marker id="marker2" point="point2">
		<googlemaps:icon icon="/GoogleMaps/images/g.png" 
		    shadow="/GoogleMaps/images/g_shadow.png"
		    iconWidth="48" iconHeight="48" shadowWidth="64" shadowHeight="48"
		    anchorX="24" anchorY="45" infoWindowAnchorX="24" infoWindowAnchorY="1"/>
		<googlemaps:infowindow display="false">
		You can use forms:<br/><form action=""><input type="text" name="test"><br/>
		<input type="submit" value="Test it"/></form>
		</googlemaps:infowindow>
	</googlemaps:marker>
	<googlemaps:marker id="marker3" point="point3">
		<googlemaps:blowup maptype="satellite" zoom="4"/>
	</googlemaps:marker>
	<googlemaps:circle id="circle1" point="point2" color="#ff0000" radius="25" 
	    weight="5"/>
	<googlemaps:polyline id="poly1" color="#0000ff" opacity="0.50" weight="5" 
	    pointlist="point1, point2, point3"/>
	<googlemaps:panControl enable="true"/>
	<googlemaps:typeControl enable="true"/>
	<googlemaps:zoomControl enable="true" size="large"/>
	<googlemaps:scaleControl enable="true"/>
	<googlemaps:event action="click" url="/GoogleMaps/index.jsp"/>
	<googlemaps:message>
		<img src="/GoogleMaps/images/loading.gif"/> Please wait...
	</googlemaps:message>
</googlemaps:map>
  

You currently cannot set which information is placed in the debugger window, that is set for you.

Our next example demonstrates the new <googlemaps:label> tag.

Google
Search for Google Maps technology:

Java JSP PHP ASP
Google™ and the GoogleMaps API are copyright of Google.