Imager-Bing-MapLayer

 view release on metacpan or  search on metacpan

lib/Imager/Bing/MapLayer.pm  view on Meta::CPAN

Draw an arc.

See the corresponding method in L<Imager::Draw> for more information.

=head2 C<circle>

Draw a circle.

See the corresponding method in L<Imager::Draw> for more information.

=head2 C<string>

Draw a text string.

TODO - the size is not scaled.

See the corresponding method in L<Imager::Draw> for more information.

=head2 C<align_string>

Draw an aligned text string.

TODO - the size is not scaled.

See the corresponding method in L<Imager::Draw> for more information.

=cut

foreach my $method (
    qw/
    radial_circle colourise colorize
    filter setpixel line box polyline polygon arc circle flood_fill
    string align_string
    /
    )
{

    __PACKAGE__->_make_imager_wrapper_method( { name => $method } );

}

=head2 C<save>

Save the tiles.

=cut

sub save {
    my ( $self, @args ) = @_;

    foreach my $level ( @{ $self->levels } ) {
        $level->save(@args);
    }
}

=head1 VIEWING MAP LAYERS

=head2 Bing Maps

You can view tiles using the following web page, replacing the
C<credentials> option with your Bing Maps Key:

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"
        xml:lang="en" lang="en">
    <head>
      <title>Tiles Test</title>
      <script src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=en-gb"></script>
      <script>
       //<![CDATA[
       var map;
       function init(){
         var map_options = {
           credentials         : "YOUR BING MAPS KEY HERE",
           center              : new Microsoft.Maps.Location(51.5171, 0.1062),
           zoom 	       : 10,
           showMapTypeSelector : false,
           useInertia          : true,
           inertiaIntensity    : 0,
           tileBuffer          : 1,
           enableSearchLogo    : false,
           enableClickableLogo : false,
           showScalebar        : false
         }
         map = new Microsoft.Maps.Map(document.getElementById('mapviewer'), map_options);
         addDefaultTileLayer();
       }

       function addDefaultTileLayer(){
         var options = { uriConstructor: 'tiles/{quadkey}.png' };
         var tileSource = new Microsoft.Maps.TileSource(options);
         var tilelayer= new Microsoft.Maps.TileLayer({ mercator: tileSource });
         map.entities.push(tilelayer);
       }
      // ]]>
      </script>
    </head>
    <body onload="init();">
      <div id="mapviewer" style="position:relative;width:100%;height:700px;"></div>
    </body>
  </html>

You can apply for a Bing Maps Key at L<https://www.bingmapsportal.com>.

=for readme continue

=head1 SEE ALSO

=over

* Bing Maps Tile System

L<http://msdn.microsoft.com/en-us/library/bb259689.aspx>

=back

=head1 AUTHOR

Robert Rothenberg, C<< <rrwo at cpan.org> >>

=head1 BUGS

Please report any bugs or feature requests to the author, or through
the web interface at
L<https://github.com/robrwo/Imager-Bing-MapLayer/issues>.

=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Imager::Bing::MapLayer

You can also look for information at:



( run in 0.550 second using v1.01-cache-2.11-cpan-39bf76dae61 )