Skip navigation
Currently Being Moderated

1120 Error

Jun 17, 2013 11:57 AM

Tags: #help #error #new #interactive #question #map #bindable #1120 #openscales

Very new to Flash builder. im trying to do a project for school making an interactive map.
I found the Openscales project which im trying to use to give my map interactivity.
Ive been following the tutorial given on the project website

( http://openscales.org/documentation/tutorials/current/tutorial-api-2.h tml )

 

Before I try to import my own map image im trying to make this map from the tutorial work then im assuming it will be fairly easy to plug in my graphics. but...

 

Ive run into an Error which I cant seem to fix. Ive googled and read of similar problems with this error but their problems werent exactly the same so i still couldnt really figure out whats causing it for me.

 

I get the Error "1120:Access of undefined property fxmap."

 

This is the code which i followed from the tutorial:

 

 

 

<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

                                 xmlns:s="library://ns.adobe.com/flex/spark"

                                 xmlns:mx="library://ns.adobe.com/flex/mx"

                                 minWidth="955"

                                 minHeight="600"

                                 xmlns:os="http://openscales.org"

                                 creationComplete="initMap();">

 

  <fx:Declarations>

  </fx:Declarations>

 

          <os:Map id="fxMap"

                              width="500"

                              height="600"

                              zoom="11"

                              center="4.78783,45.68800"

                              x="60"

                              y="50">

  <os:Mapnik name="Mapnik"/>

  <os:MousePosition

                              x="10"

                              y="{fxmap.height-20}"

                              displayProjection="EPSG:4326"/>

  <os:DragHandler/>

  <os:ClickHandler/>

  <os:WheelHandler/>

  </os:Map>

  <os:PanZoom

                              map="{map}"

                              x="{fxmap.x+10}"

                              y="{fxmap.y+10}"/>

  <fx:Script>

                    <![CDATA[

                              import org.openscales.core.Map;

                              import org.openscales.core.feature.CustomMarker;

                              import org.openscales.core.feature.PointFeature;

                              import org.openscales.core.layer.FeatureLayer;

                              import org.openscales.core.style.Style;

                              import org.openscales.geometry.Point;

                              import org.openscales.proj4as.ProjProjection;

 

                              [Bindable] private var map:Map = null;

                              private function initMap():void{

                                        map = fxmap.map;

                              }

                    ]]>

  </fx:Script>

 

  </os:Map>

</s:Application>

 

 

 

The Error is on the Line 45: 

 

  map = fxmap.map;

 

 

Any help is greatly appreciated. Im on a pretty short deadline to figure all of this out.

 
Replies
  • Currently Being Moderated
    Jun 17, 2013 9:13 PM   in reply to Jynglez888

    Property names are case-sensitive.  You named your Map fxMap but reference it as fxmap in initMap()

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points