|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.formats.google.GoogleMapBuilder
public class GoogleMapBuilder
Builder for Google Map html files.
No output is generated until build() is called.
Reference at: http://code.google.com/apis/maps/documentation/
Copyright 2009 Partner Software, Inc.
| Constructor Summary | |
|---|---|
GoogleMapBuilder(java.io.BufferedOutputStream out,
GoogleMapLib.CreationOptions creationOption)
Creates a new GoogleMapBuilder writing to the passed BufferedOutputStream. |
|
GoogleMapBuilder(VfsFile destination)
Creates a new GoogleMapBuilder writing to the passed VfsFile. |
|
GoogleMapBuilder(VfsFile destination,
GoogleMapLib.CreationOptions creationOption)
Creates a new GoogleMapBuilder writing to the passed VfsFile. |
|
| Method Summary | |
|---|---|
void |
addMapControl(GoogleMapLib.MapComponents component)
Adds passed GoogleMapLib.MapComponent. |
void |
addMarker(double longitude,
double latitude,
java.lang.String styleName,
java.lang.String htmlInfo)
Adds GoogleMapMarker to this map. |
void |
addMarker(GoogleMapMarker marker)
Adds GoogleMapMarker to this map. |
void |
addPolygon(GoogleMapPolygon polygon)
|
void |
addPolygon(java.lang.String lineColor,
XyPolyline line,
int lineWidth,
double lineOpacity,
java.lang.String fillColor,
double fillOpacity)
|
void |
addPolyline(GoogleMapPolyline line)
|
void |
addPolyline(java.lang.String lineColor,
XyPolyline polyline,
int lineWidth,
double lineOpacity)
|
void |
build()
Generates output to specified destination. |
void |
setCenter(double longitude,
double latitude)
Sets the starting center position for the map. |
void |
setGoogleKey(java.lang.String key)
Sets the Google Map key used to allow generated file to be viewable from a non-local location. |
void |
setHtmlRefresh(int htmlRefreshInSeconds)
Sets how often the generated html file should reload itself. |
void |
setMapHeight(int height)
Sets the map height in pixels. |
void |
setMapOption(GoogleMapLib.MapOptions option,
boolean enable)
Enables or disables the passed option based on 'enable' value. |
void |
setMapWidth(int width)
Sets the map width in pixels. |
void |
setStyle(java.lang.String styleName,
java.lang.String url)
Maps the passed style name to the passed url. |
void |
setTitle(java.lang.String docName)
Sets the title for the generated google map. |
void |
setZoom(double zoom)
Sets the starting zoom for the map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GoogleMapBuilder(VfsFile destination)
throws java.io.IOException
destination - - VfsFile to write to.
java.io.IOException - if an exception occurs creation output stream to passed destination.
public GoogleMapBuilder(VfsFile destination,
GoogleMapLib.CreationOptions creationOption)
throws java.io.IOException
destination - - VfsFile to write to.creationOption - - Flag determining what to build.
java.io.IOException - if an exception occurs creation output stream to passed destination.
public GoogleMapBuilder(java.io.BufferedOutputStream out,
GoogleMapLib.CreationOptions creationOption)
out - - BufferedOutputStream to write to.creationOption - - Flag determining what to build.| Method Detail |
|---|
public void setCenter(double longitude,
double latitude)
Note, if this method isn't called - the average latitude and longitude of all added objects will be used for center.
longitude - - initial longitude for map center.latitude - - initial latitude for map center.public void setGoogleKey(java.lang.String key)
Key signup can be found at http://code.google.com/apis/maps/signup.html
key - - Google Map key as issued from Google.public void setZoom(double zoom)
zoom - public void setTitle(java.lang.String docName)
docName -
public void setStyle(java.lang.String styleName,
java.lang.String url)
styleName - url - public void addMapControl(GoogleMapLib.MapComponents component)
Default map controls are LARGE_MAP_CONTROL and MAP_TYPE_CONTROL
component - - GoogleMapLib.MapComponent to add to map.
public void setMapOption(GoogleMapLib.MapOptions option,
boolean enable)
option - - GoogleMapLib.MapOptions option to enable/disableenable - - if true, passed option is enabled. Option is disabled otherwise.
public void build()
throws java.io.IOException
java.io.IOException - if an exception occurs writing output.public void setMapWidth(int width)
width - public void setMapHeight(int height)
height -
public void addMarker(double longitude,
double latitude,
java.lang.String styleName,
java.lang.String htmlInfo)
longitude - latitude - styleName - htmlInfo - public void addMarker(GoogleMapMarker marker)
marker -
public void addPolyline(java.lang.String lineColor,
XyPolyline polyline,
int lineWidth,
double lineOpacity)
public void addPolyline(GoogleMapPolyline line)
public void addPolygon(java.lang.String lineColor,
XyPolyline line,
int lineWidth,
double lineOpacity,
java.lang.String fillColor,
double fillOpacity)
public void addPolygon(GoogleMapPolygon polygon)
public void setHtmlRefresh(int htmlRefreshInSeconds)
htmlRefreshInSeconds -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||