Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Custom GMap Marker in the GMap Custom widget
Custom GMap Marker in the GMap Custom widget [message #510247] Tue, 26 January 2010 22:01 Go to next message
hanxi.zhang@gmail.com is currently offline hanxi.zhang@gmail.comFriend
Messages: 3
Registered: January 2010
Location: Ottawa
Junior Member

Hi Community,

I was playing with the Gmap custom widget example, and trying to
use custom gmap markers (instead of the default red balloon)

in the GMap.js in the org.eclipse.rap.demo.GMap project, instead of
simply creating the marker by:

var marker = new GMarker( point );

I tried to do the following:

var myIcon = new GIcon();
myIcon.image = 'markers/image.png';
myIcon.printImage = 'markers/printImage.gif';
myIcon.mozPrintImage = 'markers/mozPrintImage.gif';
myIcon.iconSize = new GSize(100,20);
myIcon.shadow = 'markers/shadow.png';
myIcon.transparent = 'markers/transparent.png';
myIcon.shadowSize = new GSize(110,20);
myIcon.printShadow = 'markers/printShadow.gif';
myIcon.iconAnchor = new GPoint(50,20);
myIcon.infoWindowAnchor = new GPoint(50,0);
myIcon.imageMap = [99,0,99,1,99,2,99,3,99,4,99,5,99,6,99,7,99,8,99,9,99,10,99, 11,99,12,98,13,97,14,96,15,95,16,93,17,92,18,91,19,0,19,0,18 ,0,17,0,16,0,15,0,14,0,13,0,12,0,11,0,10,0,9,0,8,0,7,2,6,3,5 ,5,4,7,3,8,2,10,1,12,0];

//and finally
var marker = new GMarker( point, {icon:myIcon, draggable : true} );


The images files for the custom widget are created off the http://www.powerhut.co.uk/googlemaps/custom_markers.php web site.

I tried the custom widget in a native html/javascript file, works fine. But in the custom RAP widget example, the custom marker won't showup.

I suspect that qooxdoo cannot located the needed image files. I treid to put those image files under org.eclipse.rap.demo.GMap/markers folder, but no luck. Maybe I have to add those new image files into the org.eclipse.rap.rwt.q07 jar file? If so under what directory?

Many thanks for your comments.

Hanxi
Re: Custom GMap Marker in the GMap Custom widget [message #510311 is a reply to message #510247] Wed, 27 January 2010 08:23 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Hi,

I suppose you have to register these Images at the http service to make
them accessible for the browser. You can do so using the extension point
org.eclipse.equinox.http.registry.resources

Regards,
Stefan.

hanxi.zhang@gmail.com schrieb:
>
> Hi Community,
>
> I was playing with the Gmap custom widget example, and trying to
> use custom gmap markers (instead of the default red balloon)
> in the GMap.js in the org.eclipse.rap.demo.GMap project, instead of
> simply creating the marker by:
> var marker = new GMarker( point );
>
> I tried to do the following:
>
> var myIcon = new GIcon();
> myIcon.image = 'markers/image.png';
> myIcon.printImage = 'markers/printImage.gif';
> myIcon.mozPrintImage = 'markers/mozPrintImage.gif';
> myIcon.iconSize = new GSize(100,20);
> myIcon.shadow = 'markers/shadow.png';
> myIcon.transparent = 'markers/transparent.png';
> myIcon.shadowSize = new GSize(110,20);
> myIcon.printShadow = 'markers/printShadow.gif';
> myIcon.iconAnchor = new GPoint(50,20);
> myIcon.infoWindowAnchor = new GPoint(50,0);
> myIcon.imageMap =
> [99,0,99,1,99,2,99,3,99,4,99,5,99,6,99,7,99,8,99,9,99,10,99,
> 11,99,12,98,13,97,14,96,15,95,16,93,17,92,18,91,19,0,19,0,18
> ,0,17,0,16,0,15,0,14,0,13,0,12,0,11,0,10,0,9,0,8,0,7,2,6,3,5
> ,5,4,7,3,8,2,10,1,12,0];
>
> //and finally
> var marker = new GMarker( point, {icon:myIcon,
> draggable : true} );
>
> The images files for the custom widget are created off the
> http://www.powerhut.co.uk/googlemaps/custom_markers.php web site.
>
> I tried the custom widget in a native html/javascript file, works fine.
> But in the custom RAP widget example, the custom marker won't showup.
>
> I suspect that qooxdoo cannot located the needed image files. I treid to
> put those image files under org.eclipse.rap.demo.GMap/markers folder,
> but no luck. Maybe I have to add those new image files into the
> org.eclipse.rap.rwt.q07 jar file? If so under what directory?
>
> Many thanks for your comments.
>
> Hanxi
Re: Custom GMap Marker in the GMap Custom widget [message #510491 is a reply to message #510311] Wed, 27 January 2010 16:13 Go to previous message
hanxi.zhang@gmail.com is currently offline hanxi.zhang@gmail.comFriend
Messages: 3
Registered: January 2010
Location: Ottawa
Junior Member

That's the trick! I should have figured this out Laughing

Hanxi
Previous Topic:TableViewer Column resized event
Next Topic:Internationalization for internal plugins
Goto Forum:
  


Current Time: Thu Oct 03 16:28:40 GMT 2024

Powered by FUDForum. Page generated in 0.03622 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top