本文整理汇总了Java中com.google.gwt.maps.client.overlay.MarkerOptions类的典型用法代码示例。如果您正苦于以下问题:Java MarkerOptions类的具体用法?Java MarkerOptions怎么用?Java MarkerOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MarkerOptions类属于com.google.gwt.maps.client.overlay包,在下文中一共展示了MarkerOptions类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createNativePin
import com.google.gwt.maps.client.overlay.MarkerOptions; //导入依赖的package包/类
@Override
protected Marker createNativePin(Pin pin) {
final MarkerOptions options = MarkerOptions.newInstance();
if(pin.getTitle() != null) {
options.setTitle(pin.getTitle());
}
options.setDraggable(pin.isDraggable());
if(pin.getImageURL() != null) {
final Icon icon = Icon.newInstance(pin.getImageURL());
icon.setIconSize(Size.newInstance(pin.getImageWidth(), pin.getImageHeight()));
icon.setIconAnchor(Point.newInstance(
// Horizontal center
pin.getImageWidth() / 2,
// Bottom
pin.getImageHeight()));
options.setIcon(icon);
}
return new Marker(
LatLng.newInstance(pin.getLatitude(), pin.getLongitude()),
options);
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:26,代码来源:GoogleWorldMap.java
示例2: createMarker
import com.google.gwt.maps.client.overlay.MarkerOptions; //导入依赖的package包/类
private Marker createMarker(final GWTMarkerState marker) {
final Icon icon = Icon.newInstance();
icon.setIconSize(Size.newInstance(32, 32));
icon.setIconAnchor(Point.newInstance(16, 32));
String markerImageURL = marker.getImageURL();
icon.setImageURL(markerImageURL);
final MarkerOptions markerOptions = MarkerOptions.newInstance();
markerOptions.setAutoPan(true);
markerOptions.setClickable(true);
markerOptions.setTitle(marker.getName());
markerOptions.setIcon(icon);
Marker m = new Marker(toLatLng(marker.getLatLng()), markerOptions);
m.setVisible(marker.isVisible());
m.addMarkerClickHandler(new DefaultMarkerClickHandler(marker));
return m;
}
开发者ID:qoswork,项目名称:opennmszh,代码行数:19,代码来源:GoogleMapsPanel.java
示例3: showPointSelection
import com.google.gwt.maps.client.overlay.MarkerOptions; //导入依赖的package包/类
public void showPointSelection(LatLng pt)
{
MarkerOptions mo = MarkerOptions.newInstance(_pointSelectionIcon);
final Marker m = new Marker(pt,mo);
mo.setClickable(true);
mo.setDraggable(false);
_map.addOverlay(m);
Timer t = new Timer(){
public void run() {
_map.removeOverlay(m);
}
};
t.schedule(4000);
}
开发者ID:lachlanhurst,项目名称:BikeBingle,代码行数:18,代码来源:MapManager.java
示例4: onClick
import com.google.gwt.maps.client.overlay.MarkerOptions; //导入依赖的package包/类
public void onClick(MapClickEvent e)
{
MapWidget sender = e.getSender();
Overlay overlay = e.getOverlay();
LatLng point = e.getLatLng();
sender.clearOverlays();
MarkerOptions options = MarkerOptions.newInstance();
options.setDraggable(false);
Marker m = new Marker(point,options);
sender.addOverlay(m);
_mapManager.setPickedLocation(point);
/*if (overlay != null && overlay instanceof Marker)
{
sender.removeOverlay(overlay);
} else {
sender.addOverlay(new Marker(point));
}*/
}
开发者ID:lachlanhurst,项目名称:BikeBingle,代码行数:22,代码来源:MapClickHandlerPickLocation.java
示例5: getDefaultMarkerOptions
import com.google.gwt.maps.client.overlay.MarkerOptions; //导入依赖的package包/类
private MarkerOptions getDefaultMarkerOptions(HasLatLng coord) {
MarkerOptions markerOpts = new MarkerOptions();
markerOpts.setPosition(coord);
markerOpts.setVisible(true);
markerOpts.setMap(mapWidget.getMap());
markerOpts.setDraggable(true);
return markerOpts;
}
开发者ID:Hellek1,项目名称:viaja-facil,代码行数:9,代码来源:M.java
示例6: drawPickedPointOntoMap
import com.google.gwt.maps.client.overlay.MarkerOptions; //导入依赖的package包/类
protected void drawPickedPointOntoMap()
{
if (_pickedPoint != null)
{
MarkerOptions options = MarkerOptions.newInstance();
//options.setClickable(true);
options.setDraggable(false);
Marker aStackMarker = new Marker(_pickedPoint,options);
_map.addOverlay(aStackMarker);
_map.panTo(_pickedPoint);
}
}
开发者ID:lachlanhurst,项目名称:BikeBingle,代码行数:14,代码来源:MapManager.java
示例7: setMarker
import com.google.gwt.maps.client.overlay.MarkerOptions; //导入依赖的package包/类
private void setMarker(LatLng point) {
MarkerOptions options = MarkerOptions.newInstance();
options.setDraggable(true);
marker = new Marker(point, options);
marker.setDraggingEnabled(true);
map.addOverlay(marker);
}
开发者ID:jchaganti,项目名称:gharonda,代码行数:8,代码来源:ModifyPropertyView.java
示例8: drawStacksOntoMapAsIcons
import com.google.gwt.maps.client.overlay.MarkerOptions; //导入依赖的package包/类
/**
* draws the current list of stack onto the map currently displayed.
*/
protected void drawStacksOntoMapAsIcons()
{
Iterator stacks = _stacks.iterator();
while (stacks.hasNext())
{
final BikeStack aStack = (BikeStack)stacks.next();
MarkerOptions options;
if (_displayStacksAs == DISPLAY_STACKS_AS_ICONS)
{
options = MarkerOptions.newInstance(_bingleTypeManager.getIconById(aStack.getType(),true));
}
else if (_displayStacksAs == DISPLAY_STACKS_AS_LARGE_ICONS)
{
options = MarkerOptions.newInstance(_bingleTypeManager.getIconById(aStack.getType(),false));
}
else
{
options = MarkerOptions.newInstance();
}
options.setClickable(true);
options.setDraggable(false);
final Marker aStackMarker = new Marker(aStack.getPosition(),options);
MarkerClickHandler myMarkerClickHandler = new MarkerClickHandler() {
public void onClick(MarkerClickEvent event)
{
InfoWindow info = _map.getInfoWindow();
BikeStackInfoWindowContent cont = new BikeStackInfoWindowContent(aStack,_bingleTypeManager);
InfoWindowContent content = new InfoWindowContent(cont);
info.open(aStackMarker.getLatLng(),content);
}
};
aStackMarker.addMarkerClickHandler(myMarkerClickHandler);
_map.addOverlay(aStackMarker);
if (aStack.getId() == _popupStackId &&
_modeSetting == MODE_SETTING_VIEW &&
_displaySetting == DISPLAY_SETTING_ICONS)
{
myMarkerClickHandler.onClick(null);
panTo(aStack.getPosition());
GWT.log("showing", null);
_popupStackId = -1;
}
}
}
开发者ID:lachlanhurst,项目名称:BikeBingle,代码行数:53,代码来源:MapManager.java
注:本文中的com.google.gwt.maps.client.overlay.MarkerOptions类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论