GoogleMaps JSP Taglibrary  

Example 4

Now we've put on our first layer, a circle that represents a 10 mile radius around our location. In addition, we've add a map scale that changes as we zoom in and out. To better see the circle, we've also changed the defined zoom level to 8.

Here's the code we used (changes & additions are highlighted):

<googlemaps:map id="map" width="250" height="300" version="1" type="STREET" 
		zoom="8">
  	<googlemaps:key domain="localhost" key="xxxx"/>
  	<googlemaps:point id="point1" address="74 Connors Lane" city="Elkton" 
  			state="MD" zipcode="21921" country="US"/>
	<googlemaps:marker id="marker1" point="point1">
		<googlemaps:infowindow display="false">
		74 Connor Lane<br/>Elkton, MD
		</googlemaps:infowindow>
	</googlemaps:marker>
	<googlemaps:circle id="circle1" point="point1" radius="10" color="#ff0000" 
			weight="3"/>
	<googlemaps:panControl enable="true"/>
	<googlemaps:typeControl enable="true"/>
	<googlemaps:zoomControl enable="true" size="large"/>
	<googlemaps:wheelControl enable="true"/>
	<googlemaps:scaleControl enable="true"/>
</googlemaps:map>
  

That's just the first of the layers, next we'll add a second marker so we can generate some other layer examples. In example 5, we'll add the second marker and draw a line to connect them.
Google
Search for Google Maps technology:

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