Trouble with Markers -- Need help

45 views
Skip to first unread message

rdu...@trinitytg.com

unread,
Jan 2, 2013, 10:12:47 AM1/2/13
to opensca...@googlegroups.com
I am having an issue getting markers to appear in the right place.   The marker always appear off the coast of Africa.
I expected the marker to appear in the central valley of California. My base map is a Bind arial using the EPSG:900913 projection.
I walked through the code in the debugger a number of times but I have not been able to see what the issue might be.
 
Can someone look at the code below and tell me what I am doing wrong?    For testing I have hard coded the lat and long.
 
//Add Maker Layer
var markers:VectorLayer = new VectorLayer("markers");
markers.projection = "EPSG:900913";
markers.style = Style.getDefaultPointStyle(); 
_map.addLayer(markers);

var vectorlayer: VectorLayer = this._map.getLayerByIdentifier("markers");
vectorlayer.addFeature(PointFeature.createPointFeature(new Location(-121.187198,38.726253,"EPSG:900913")));
this._map.center = new Location(-121.187198,38.726253, "EPSG:900913");
Thanks,
 
Randy

rdu...@trinitytg.com

unread,
Jan 17, 2013, 2:14:22 PM1/17/13
to opensca...@googlegroups.com
 I solved the problem using the SampleLayer.as class from the openscales-fx-examples project.   I am not sure why original way did not work.   I will try to uderstand later 
 
Randy
Reply all
Reply to author
Forward
0 new messages