Exemple #1
0
        /// <summary>
        /// Retrieves a static map image at a default size of 512x512 and using the specified image format.
        /// </summary>
        /// <param name="center">A location to center the map on</param>
        /// <param name="zoom">Zoom level to use</param>
        /// <param name="sensor">Pass true if the location was provided via a sensor</param>
        /// <param name="imageFormat">The format of the image</param>
        /// <returns></returns>
        public byte[] GetMap(Location center, int zoom, GMapsImageFormats imageFormat, bool sensor)
        {
            StaticMapRequest request = new StaticMapRequest()
            {
                Format = imageFormat,
                Center = center,
                Zoom   = zoom,
                Sensor = sensor
            };

            return(GetImageBytes(request));
        }
        /// <summary>
        /// Retrieves a static map image at a default size of 512x512 and using the specified image format.
        /// </summary>
        /// <param name="center">A location to center the map on</param>
        /// <param name="zoom">Zoom level to use</param>
        /// <param name="sensor">Pass true if the location was provided via a sensor</param>
        /// <param name="imageFormat">The format of the image</param>
        /// <returns></returns>
        public byte[] GetMap(Location center, int zoom, System.Drawing.Size size, GMapsImageFormats imageFormat, bool sensor)
        {
            StaticMapRequest request = new StaticMapRequest()
            {
                Format = imageFormat,
                Size = size,
                Center = center,
                Zoom = zoom,
                Sensor = sensor
            };

            return GetImageBytes(request);
        }