
new sg.layers.MapImage()
Description
Create a MapImage object
Position
MapImage.js
Parameters
Parameter
|
Type
|
Description
|
param
|
Object
|
Initial Settings:
set object
Name
|
Type
|
Description
|
width
|
Number
|
image width(pixel)
|
height
|
Number
|
image height(pixel)
|
extent
|
sg.geometry.Extent
|
layer extent
|
href
|
String
|
image URL
|
|
Properties
Properties
|
Type
|
Description
|
extent
|
sg.geometry.Extent
|
Image extent
|
height
|
Number
|
Image height in pixels
|
herf
|
String
|
Image url
|
width
|
Number
|
Image width in pixels
|
opacity
|
Number
|
transparency, zero to one
0:transparent
1:opaque
|
Example
<script type="text/javascript" src="scripts/Layer.js"></script>
<script type="text/javascript" src="scripts/Geometry.js"></script>
//Create the extent of MapImage
var pmapExt = new sg.geometry.Extent(13277608.9807431, 2449664.06609527, 13640272.4782023, 2972946.29177018);
//Create the MapImage
var option = {
extent: pmapExt,
width:430, //the width of this image
height:620, //the height of this image
opacity:0.7,
href:"images/TaiwanHistoricMap.png" // the source of the imape. Could be a URL.
};
var MapImg = new sg.layers.MapImage(option);
|
|
See live example
©2015 Supergeo Technologies Inc.