当前位置: 首页>>代码示例>>Java>>正文


Java MapTypeIdEnum类代码示例

本文整理汇总了Java中com.lynden.gmapsfx.javascript.object.MapTypeIdEnum的典型用法代码示例。如果您正苦于以下问题:Java MapTypeIdEnum类的具体用法?Java MapTypeIdEnum怎么用?Java MapTypeIdEnum使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MapTypeIdEnum类属于com.lynden.gmapsfx.javascript.object包,在下文中一共展示了MapTypeIdEnum类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: mapInitialized

import com.lynden.gmapsfx.javascript.object.MapTypeIdEnum; //导入依赖的package包/类
@Override
public void mapInitialized() {
    // TODO: 11/23/2017 move it into global settings
    final LatLong center = new LatLong(34.0219, -118.4814);
    final MapOptions options = new MapOptions()
            .center(center)
            .mapType(MapTypeIdEnum.ROADMAP)
            //maybe set false
            .mapTypeControl(true)
            .overviewMapControl(false)
            .panControl(true)
            .rotateControl(false)
            .scaleControl(false)
            .streetViewControl(false)
            .zoom(8)
            .zoomControl(true)
            .styleString(ApplicationSettingsController.doBigMagicToRetrieveStyleForMap());
    //it returns control for created map
    map = mapComponent.createMap(options);
    MOUSE_CLCK_FOR_GET_COORD_LISTENER.setMap(map);
}
 
开发者ID:Evegen55,项目名称:main_carauto_board,代码行数:22,代码来源:GmapfxController.java

示例2: mapInitialized

import com.lynden.gmapsfx.javascript.object.MapTypeIdEnum; //导入依赖的package包/类
@Override
public void mapInitialized() {
	final LatLong center = new LatLong(32.777, 35.0225);
	final MapOptions options = new MapOptions();
	options.center(center).zoom(12).overviewMapControl(false).panControl(false).rotateControl(false)
			.scaleControl(true).streetViewControl(true).zoomControl(true).mapType(MapTypeIdEnum.ROADMAP);

	map = mapComponent.createMap(options, false);
	map.setHeading(123.2);
	map.fitBounds(new LatLongBounds(new LatLong(32.781605, 35.016952), new LatLong(32.774531, 35.028263)));

	mapComponent.addMapReadyListener(() -> {
		for (final String key : parkingToLocation.keySet()) {
			final MapLocation ml = parkingToLocation.get(key);
			final Circle c = new Circle(new CircleOptions().center(new LatLong(ml.getLat(), ml.getLon()))
					.fillColor(parkingToColor.get(key).toLowerCase()).radius(20.0).fillOpacity(0.40).editable(false)
					.clickable(true));
			shapes.put(key, c);
			map.addMapShape(c);
		}
	});
}
 
开发者ID:TechnionYP5777,项目名称:SmartCity-ParkingManagement,代码行数:23,代码来源:ManegerMap.java

示例3: createMap

import com.lynden.gmapsfx.javascript.object.MapTypeIdEnum; //导入依赖的package包/类
private GoogleMap createMap() {
    MapOptions options = new MapOptions();
    options.zoom(15)
            .overviewMapControl(false)
            .mapTypeControl(false)
            .panControl(false)
            .rotateControl(false)
            .scaleControl(false)
            .streetViewControl(false)
            .zoomControl(false)
            .mapType(MapTypeIdEnum.ROADMAP);
    return mapView.createMap(options, false);
}
 
开发者ID:dlemmermann,项目名称:CalendarFX,代码行数:14,代码来源:GoogleEntryGMapsFXView.java

示例4: mapInitialized

import com.lynden.gmapsfx.javascript.object.MapTypeIdEnum; //导入依赖的package包/类
@Override
public void mapInitialized() {
	// TODO Auto-generated method stub
	MapOptions mapOptions = new MapOptions();

    mapOptions.center(new LatLong(47.6097, -122.3331))
            .mapType(MapTypeIdEnum.SATELLITE)
            .overviewMapControl(false)
            .panControl(false)
            .rotateControl(false)
            .scaleControl(false)
            .streetViewControl(false)
            .zoomControl(false)
            .zoom(14);

    map = mapView.createMap(mapOptions);

    //Add a marker to the map
    MarkerOptions markerOptions = new MarkerOptions();
    URL t = this.getClass().getResource("copter3.png");
    markerOptions.position( new LatLong(47.6, -122.3) ).icon(t.getPath())//icon("../src/gnd_control/guiview/copter3.png")
                .visible(Boolean.TRUE)
                .title("My Marker");

    copterMarker = new Marker( markerOptions );
    map.addMarker(copterMarker);map.centerProperty();
}
 
开发者ID:AndriiDSD,项目名称:GND_Control,代码行数:28,代码来源:MapPanel.java

示例5: configureMap

import com.lynden.gmapsfx.javascript.object.MapTypeIdEnum; //导入依赖的package包/类
protected void configureMap() {
    MapOptions mapOptions = new MapOptions();

    mapOptions.center(new LatLong(47.6097, -122.3331))
            .mapType(MapTypeIdEnum.ROADMAP)
            .zoom(9);
    map = googleMapView.createMap(mapOptions, false);

    map.addMouseEventHandler(UIEventType.click, (GMapMouseEvent event) -> {
        LatLong latLong = event.getLatLong();
        latitudeLabel.setText(formatter.format(latLong.getLatitude()));
        longitudeLabel.setText(formatter.format(latLong.getLongitude()));
    });

}
 
开发者ID:rterp,项目名称:GMapsFX,代码行数:16,代码来源:LatLongFXMLController.java

示例6: mapInitialized

import com.lynden.gmapsfx.javascript.object.MapTypeIdEnum; //导入依赖的package包/类
@Override
    public void mapInitialized() {
        Thread t = new Thread( () -> {
           try {
               Thread.sleep(3000);
               System.out.println("Calling showDirections from Java");
               Platform.runLater(() -> mapComponent.getMap().hideDirectionsPane());
           } catch( Exception ex ) {
               ex.printStackTrace();
           }
        });
        t.start();
        //Once the map has been loaded by the Webview, initialize the map details.
        LatLong center = new LatLong(47.606189, -122.335842);
        mapComponent.addMapReadyListener(() -> {
            // This call will fail unless the map is completely ready.
            checkCenter(center);
        });
        
        MapOptions options = new MapOptions();
        options.center(center)
                .mapMarker(true)
                .zoom(9)
                .overviewMapControl(false)
                .panControl(false)
                .rotateControl(false)
                .scaleControl(false)
                .streetViewControl(false)
                .zoomControl(false)
                .mapType(MapTypeIdEnum.TERRAIN);

        map = mapComponent.createMap(options);
        
        map.setHeading(123.2);
//        System.out.println("Heading is: " + map.getHeading() );

        
        //map.showDirectionPane();
    
        
    }
 
开发者ID:rterp,项目名称:GMapsFX,代码行数:42,代码来源:MainApp2.java

示例7: start

import com.lynden.gmapsfx.javascript.object.MapTypeIdEnum; //导入依赖的package包/类
@Override
  public void start(final Stage stage) throws Exception {
      System.out.println("Java version: " + System.getProperty("java.home"));
      mapComponent = new GoogleMapView(Locale.getDefault().getLanguage(), null);
      mapComponent.addMapInitializedListener(this);
              
      BorderPane bp = new BorderPane();
      ToolBar tb = new ToolBar();

      btnZoomIn = new Button("Zoom In");
      btnZoomIn.setOnAction(e -> {
          map.zoomProperty().set(map.getZoom() + 1);
      });
      btnZoomIn.setDisable(true);

      btnZoomOut = new Button("Zoom Out");
      btnZoomOut.setOnAction(e -> {
          map.zoomProperty().set(map.getZoom() - 1);
      });
      btnZoomOut.setDisable(true);

      lblZoom = new Label();
      lblCenter = new Label();
      lblClick = new Label();
      
      mapTypeCombo = new ComboBox<>();
      mapTypeCombo.setOnAction( e -> {
         map.setMapType(mapTypeCombo.getSelectionModel().getSelectedItem() );
      });
      mapTypeCombo.setDisable(true);
      
      Button btnType = new Button("Map type");
      btnType.setOnAction(e -> {
          map.setMapType(MapTypeIdEnum.HYBRID);
      });

btnHideMarker = new Button("Hide Marker");
btnHideMarker.setOnAction(e -> {hideMarker();});

btnDeleteMarker = new Button("Delete Marker");
btnDeleteMarker.setOnAction(e -> {deleteMarker();});

      tb.getItems().addAll(btnZoomIn, btnZoomOut, mapTypeCombo,
              new Label("Zoom: "), lblZoom,
              new Label("Center: "), lblCenter,
              new Label("Click: "), lblClick,
		btnHideMarker, btnDeleteMarker);

      bp.setTop(tb);
      
      bp.setCenter(mapComponent);

      Scene scene = new Scene(bp);
      stage.setScene(scene);
      stage.show();
  }
 
开发者ID:rterp,项目名称:GMapsFX,代码行数:57,代码来源:MainApp.java

示例8: testSetProperty_JavascriptEnum

import com.lynden.gmapsfx.javascript.object.MapTypeIdEnum; //导入依赖的package包/类
@Test
public void testSetProperty_JavascriptEnum() {
    MapTypeIdEnum mapType = MapTypeIdEnum.TERRAIN;
    testJavascriptObject.setProperty("MapType", mapType);
    verify(mockJsObject).setMember("MapType", mapType.getEnumValue());
}
 
开发者ID:rterp,项目名称:GMapsFX,代码行数:7,代码来源:JavascriptObjectTest.java


注:本文中的com.lynden.gmapsfx.javascript.object.MapTypeIdEnum类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。