Class GoogleMapsTileFactoryInfo

java.lang.Object
org.jxmapviewer.viewer.TileFactoryInfo
org.jxmapviewer.google.GoogleMapsTileFactoryInfo

public class GoogleMapsTileFactoryInfo
extends TileFactoryInfo
Uses Google Maps API - it has several glitches, so don't use it unless you know what you're doing. Most importantly, gmaps cuts of small text leftovers that reach into the visible tile. As a result you cannot really tile the rendered tiles.
  • Constructor Details

    • GoogleMapsTileFactoryInfo

      public GoogleMapsTileFactoryInfo​(java.lang.String key)
      Parameters:
      key - the Google Map API key
    • GoogleMapsTileFactoryInfo

      public GoogleMapsTileFactoryInfo​(java.lang.String name, java.lang.String baseURL, java.lang.String key)
  • Method Details

    • getTileUrl

      public java.lang.String getTileUrl​(int x, int y, int zoom)
      Description copied from class: TileFactoryInfo
      Returns the tile url for the specified tile at the specified zoom level. By default it will generate a tile url using the base url and parameters specified in the constructor. Thus if
      baseURl =
       http://www.myserver.com/maps?version=0.1 xparam = x yparam = y zparam = z tilepoint = [1,2] zoom level = 3
        
      then the resulting url would be:
      http://www.myserver.com/maps?version=0.1&x=1&y=2&z=3
      Note that the URL can be a file: url.
      Overrides:
      getTileUrl in class TileFactoryInfo
      Parameters:
      x - the x value, measured from left to right
      y - the y value, measured from top to bottom
      zoom - the zoom level
      Returns:
      a valid url to load the tile
    • getAttribution

      public java.lang.String getAttribution()
      Description copied from class: TileFactoryInfo
      Some map providers require explicit attribution, can be null
      Overrides:
      getAttribution in class TileFactoryInfo
      Returns:
      the attribution text
    • getLicense

      public java.lang.String getLicense()
      Overrides:
      getLicense in class TileFactoryInfo
      Returns:
      the license of the map provider, can be null