My account
Shopping cart
Knowledge base
Support


JC Flash Map Properties



Overview | Properties | Methods | Events | Markers

Most of these properties can be set in the Component Inspector (Alt + F7).

Property Type
Component Inspector
Description
bounds Rectangle
no
The Rectangle object delimiting the portion of the map currently displayed in the viewing area. The object represents the coordinates (latitude, longitude) of the top-left corner of the map and the width and height of the map which is the map's span on latitude and longitude.

Example
var myMap:JC Flash Map = new JCFlashMap();
myMap.x = 10;
myMap.y = 10;
myMap.width = 400;
myMap.height = 250;
myMap.mapType = "GoogleHybrid";
myMap.lat = 47.067;
myMap.lng = 21.933;
myMap.zoom = 12;

this.addChild(myMap);

trace("Visible map area:");
trace("("+ myMap.bounds.x + ", " + myMap.bounds.y + ") :: " + myMap.bounds.width + " x " + myMap.bounds.height); // Visible map area:(19.7314453125, 46.12655630241851) :: 4.39453125 x 1.8707175656262294
center LatLng
no
The coordinates of the center of the map, using a LatLng type of object. It contains the latitude and longitude of the coordinate. By setting this property the map can be positioned to the new location.

Example
var myMap:JC Flash Map = new JCFlashMap();
myMap.x = 10;
myMap.y = 10;
myMap.width = 400;
myMap.height = 250;
myMap.mapType = "GoogleHybrid";
myMap.lat = 47.067;
myMap.lng = 21.933;
myMap.zoom = 12;

this.addChild(myMap);

trace(myMap.center.lat+", "+myMap.center.lng); // 47.067, 21.933
centerMP MapPoint
no
The MapPoint object representing the center of the map. A MapPoint object contains X and Y coordinates of a point. By setting this property the map can be positioned to the new location.

Example
import com.jumpeye.jcflashmap.components. MapPoint;

var myMap:JC Flash Map = new JCFlashMap();
myMap.x = 10;
myMap.y = 10;
myMap.width = 400;
myMap.height = 250;
myMap.mapType = "GoogleHybrid";
myMap.lat = 47.067;
myMap.lng = 21.933;
myMap.zoom = 12;

this.addChild(myMap);

trace("previous x = "+myMap.centerMP.x); // previous x = 18380
trace("previous y = "+myMap.centerMP.y); // previous y = 11516

var newLocation:MapPoint = new MapPoint(18000, 11000);
myMap.centerMP = newLocation;

trace("current x = "+myMap.centerMP.x); // current x = 18000
trace("current y = "+myMap.centerMP.y); // current y = 11000
customMapType String
no
A custom type of the map. It is the name of a class that extends MapType.
inZoom Boolean
no
[read-only] A boolean value that specifies if the map is currently performing a zoom animation.

Example
if (myMap.inZoom)
     trace("The map is currently zooming in or out);
else
     trace("The zoom value is not changing");
lat Number
yes
Latitude - the initial coordinate of the center of the map.

Default
0

Example
var myMap:JCFlashMap = new JCFlashMap();
myMap.x = 10;
myMap.y = 10;
myMap.width = 400;
myMap.height = 250;
myMap.mapType = "GoogleHybrid";
myMap.lat = 47.067;
myMap.lng = 21.933;
myMap.zoom = 12;

this.addChild(myMap);
lng Number
yes
Longitude the initial coordinate of the center of the map.

Default
0

Example
var myMap:JCFlashMap = new JCFlashMap();
myMap.x = 10;
myMap.y = 10;
myMap.width = 400;
myMap.height = 250;
myMap.mapType = "GoogleHybrid";
myMap.lat = 47.067;
myMap.lng = 21.933;
myMap.zoom = 12;

this.addChild(myMap);
mapCopyright TextField
no
[read-only] A reference to the text field containing the copyright of the currently displayed map.

Example
myMap.mapType = "OpenStreetMap";
trace(myMap.mapCopyright.text); // Map data by OpenStreetMap.org
mapType String
yes
The initial type of the map. Possible values are OpenStreetMap, OSMARender, OSMCycleMap, OpenAerialMap, MicrosoftTerrain, MicrosoftMap, MicrosoftAerial, MicrosoftHybrid, GoogleMap, GoogleSatellite, GoogleHybrid, GoogleTerrain, YahooMap, YahooSatellite, YahooHybrid, Custom. In case the "Custom" value is used, the type of the map will be userdefined, using the customMapType property.

Default
OpenStreetMap.

Example
var myMap:JCFlashMap = new JCFlashMap();
myMap.x = 10;
myMap.y = 10;
myMap.width = 400;
myMap.height = 250;
myMap.mapType = "GoogleHybrid";
myMap.lat = 47.067;
myMap.lng = 21.933;
myMap.zoom = 12;

this.addChild(myMap);
mapTypeButtonGroup ButtonSet
no
[read-only] A reference to the group of buttons displayed on the map and used to change the type of the map. The reference is of type ButtonSet which is a wrapper for all the buttons displayed for the maps from the same map provider.

The returned object can give you access to the set of buttons displayed through a public property called buttons of type Array and through this ButtonSet object you can make different settings to the displayed buttons, by using these public properties: buttonWidth, buttonHeight, spacingX (horizontal spacing between buttons), paddingX, paddingY (horizontal and vertical padding for the buttons) and anchor (sets the anchor for the entire set of buttons to ButtonSet.ANCHOR_TOP, ButtonSet.ANCHOR_BOTTOM, ButtonSet.ANCHOR_LEFT and ButtonSet.ANCHOR_RIGHT). All the changes made to the above properties are applied only after calling the readButtons() method.

Example
import com.jumpeye.jcflashmap.ui.ButtonSet;

var mapTypes:ButtonSet = myMap. mapTypeButtonGroup;
mapTypes.spacingX = 10;
mapTypes.buttonWidth = 50;
mapTypes.readButtons();
mapTypeButtons Array
no
[read-only] A list of the map type buttons displayed on the map. Each item of the array contains a reference to one of the button controls.

Example
// This code sequence shows and hides the map type buttons.

var noOfButtons:int = myMap.mapTypeButtons. length;
for(var i:uint = 0; i < noOfButtons;i++)
     myMap.mapTypeButtons[i].visible = !myMap.mapTypeButtons[i].visible;
markerInfoWindow MarkerInfoWindow
no
[read-only] A reference to the currently visible window control displaying information about a marker - the hint box displayed when clicking on the marker. Please note that only one hint box is visible at a time. When clicking on a marker that does not have the hint displayed, the corresponding hint will be shown and the previously displayed hint will hide.

The window is an object of type MarkerInfoWindow that has the following properties:
  • windowVisible:Boolean - specifies whether the marker window is visible or not;
  • text:String - the description of the selected marker (the details of the marker);
  • htmlText:String - the description of the selected marker in HTML format;
  • tweenDuration:Number - the amount of time in seconds used to show and hide the hint;
  • marker:Marker - a reference to the currently selected marker (the marker whose hint is currently displayed).

Example
import com.jumpeye.jcflashmap.markers. Marker;

var mk:Marker = new Marker();
mk.id = "1234";
mk.lat = 47.067;
mk.lng = 21.933;
mk.details = "This here is Oradea, Romania";
myMap.addMarker(mk);
var addedMk:Marker = myMap.getMarkerByID("1234"); // You need to click now on the marker to open up the hint.

trace(myMap.markerInfoWindow. windowVisible); // true

trace(myMap.markerInfoWindow.text); // This here is Oradea, Romania

trace(myMap.markerInfoWindow. htmlText); // <TEXTFORMAT LEADING="2">P ALIGN="LEFT"<>FONT FACE="Arial" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">This here is Oradea, Romania</FONT></P></TEXTFORMAT>

trace(myMap.markerInfoWindow. tweenDuration); // 0.2

trace(myMap.markerInfoWindow.marker); // Marker 1234 at (47.067,21.933)
markers MarkerColl
yes
The MarkerColl object containing the list of markers applied to the current map. A marker is the equivalent of a pin used to point to a specific location on the map.

Example
import com.jumpeye.jcflashmap.markers. Marker;
import com.jumpeye.jcflashmap.markers. MarkerColl;

var mkParis:Marker = new Marker();
mkParis.id = "1";
mkParis.lat = 48.866667;
mkParis.lng = 2.333333;
mkParis.details = "Good wine here";

var mkLondon:Marker = new Marker();
mkLondon.id = "2";
mkLondon.lat = 51.500;
mkLondon.lng = -0.117;
mkLondon.details = "They have red double decker buses";

var mkZurich:Marker = new Marker();
mkZurich.id = "3";
mkZurich.lat = 47.367;
mkZurich.lng = 8.550;
mkZurich.details = "They make the best watches and chocolate";

var markersList:MarkerColl = myMap.markers;
markersList.addItem(mkParis);
markersList.addItem(mkLondon);
markersList.addItem(mkZurich);

trace(markersList.getItemAt(1)); // Marker 2 at (51.5,-0.117)
trace(markersList.findItem("1")); // Marker 1 at (48.866667,2.333333)
markersList.removeItem(markersList. getItemAt(1) as Marker);
zoom Number
yes
The initial zoom level of the center of the map. The zoom levels depend on the type of the map and range from 0 to 22 (maximum zoom level depends on the map provider). A zoom level of 0 means zooming out to the map of the world.

OpenStreetMap maximum zoom level: 18.
MicrosoftMap maximum zoom level: 21.
GoogleMap maximum zoom level: 22.
YahooMap maximum zoom level: 17.

Default
1

Example
var myMap:JCFlashMap = new JCFlashMap();
myMap.x = 10;
myMap.y = 10;
myMap.width = 400;
myMap.height = 250;
myMap.mapType = "GoogleHybrid";
myMap.lat = 47.067;
myMap.lng = 21.933;
myMap.zoom = 12;

this.addChild(myMap);
zoomSlider Slider
no
[read-only] A reference to the Slider control displayed on the map.

Example
if (myMap.zoomSlider.value >= 10)
     myMap.zoomSlider.visible = false;
else
     myMap.zoomSlider.visible = true;

Overview | Properties | Methods | Events | Markers

Flash component to display online maps from all of the major map providers. The pack contains the .mxp install file, the documentation file and the sample file.
Map providers: OpenStreetMap, Google Maps, Yahoo! Maps, Microsoft Live Maps
Several types of map, depending on each map provider
Fully customizable
Easy navigation within the map using drag&drop, double click, advanced controls
Different levels of zoom
The free version contains watermark and can be used for trial purposes only.
Watermarked