How to add a point with an url-image?

67 views
Skip to first unread message

wei xingfeng

unread,
Feb 9, 2010, 12:32:27 AM2/9/10
to openscales-dev
I want to add an point to the map , with a gif image , and the gif
image's source if from an url.
How to achive this?

ABA

unread,
Feb 9, 2010, 12:52:51 AM2/9/10
to openscales-dev
You have 2 things to do.

First you have to create an image at run-time.
There is different ways to achive this and for one of them the
IconUtilityPlus class detailed in
http://groups.google.com/group/openscales-dev/browse_thread/thread/ed12745bff235e84
could help you.

Then you have to customize a maker of a FeatureLayer but this
functionnality is not fully efficient currently :-(
A patch should be commited today I hope:
http://groups.google.com/group/openscales-dev/browse_thread/thread/9d541c1334217542

wei xingfeng

unread,
Feb 9, 2010, 3:20:51 AM2/9/10
to openscales-dev
Yes , I'v read those already , but stiill , I don't konow how to do
that ……

Code like this , it can draw an cusotmer icon:
******************************************************************************************

[Embed(source="assets/DP.png")]
public var imgClass:Class;
......................................
......................................
style=new Style();
style.rules[0]=new Rule();

style.rules[0].symbolizers.push(new PointSymbolizer(new
DisplayObjectMarker(imgClass)));
point=new org.openscales.core.geometry.Point(arr[0],
arr[1]);
******************************************************************************************

It works , I get a point with cusomer icon .
But I don't want to intergrate the icon into the .swf file , I want to
intergrate the icon by httpservice.

Then how to make this work?
******************************************************************************************
var img:Image=new Image();
img.source="http://maps.google.com/mapfiles/kml/pushpin/
ylw-pushpin.png";
img.width=17;
img.height=17;
style.rules[0].symbolizers.push(new PointSymbolizer(img));
point=new org.openscales.core.geometry.Point(108.22,23);
******************************************************************************************

On 9 Feb., 13:52, ABA <aurel...@barbier-accary.info> wrote:
> You have 2 things to do.
>
> First you have to create an image at run-time.
> There is different ways to achive this and for one of them the

> IconUtilityPlus class detailed inhttp://groups.google.com/group/openscales-dev/browse_thread/thread/ed...


> could help you.
>
> Then you have to customize a maker of a FeatureLayer but this
> functionnality is not fully efficient currently :-(

> A patch should be commited today I hope:http://groups.google.com/group/openscales-dev/browse_thread/thread/9d...

wei xingfeng

unread,
Feb 9, 2010, 3:21:05 AM2/9/10
to openscales-dev

Denis Platonov

unread,
Jun 8, 2013, 8:17:58 AM6/8/13
to opensca...@googlegroups.com
Actually

Reply all
Reply to author
Forward
0 new messages