Where is gmap.handle?

Dec 4, 2009 at 2:38 PM

Radioman,

In windows forms i used the gmap.handle to draw an image from file on the map.

In WPF can't find handle. What is replacement? I want to use markers from a file (icon e.d.)

 

Heru

 

Coordinator
Dec 4, 2009 at 3:44 PM

lets start learing wpf/xaml is quite different from windows forms ;}

Dec 5, 2009 at 11:49 AM

Yes, thats for sure. And i now how to use handle in wpf/xaml for windows, but not for gmap.

Or do i have to use an other approach?

 

Heru

Coordinator
Dec 5, 2009 at 1:27 PM

you do not need any handles, you just create marker and add it to the map, the marker can be any control, even your wanted image. Try figure out how is made red marker in wpf gmap demo

Dec 5, 2009 at 1:49 PM

Radioman,

I (already) know how to make custom marker. Only an image as marker is still a challenge.

I will try to figure out how you did the trick in demo. :-()

 

Heru

 

Dec 6, 2009 at 12:01 PM

Radioman,

I have tried to figure out how you did the trick. But can not get it working in VB 2008 WPF.

Is there any VB programmer around here who already figured this out?

Any help is welcome.

 

Heru

 

 

Coordinator
Dec 6, 2009 at 2:34 PM

but language doesn't matter in .NET ;/

Dec 7, 2009 at 1:22 PM

Radioman,

I know language doesn't make much diffrence but i still can not figure out how to do the trick.

What i want to do is load an .png or .bmp  and use it as a marker.

Heru

Coordinator
Dec 7, 2009 at 2:19 PM

just do it ;} i'm not big fan of vb, so can't help much here ;}

Dec 7, 2009 at 2:32 PM

Radioman,

i don't need much help here... just some clues...

Is it for instance possibile/hard to use something like:

myMarker.Shape = Image.FromFile("Marker.png") ? ? ? ?

If not, can you explain in some simple steps how to do the trick???

 

<font size="2">

Heru

</font>

 

Coordinator
Dec 7, 2009 at 3:16 PM
Dec 8, 2009 at 8:45 AM
Edited Dec 8, 2009 at 8:53 AM

Radioman,

Although i know how to read bitmap, these links are very usefull. But still no clue how to connect an image to a marker....

So probably i am a moran .....

 

Heru

 

Coordinator
Dec 8, 2009 at 12:33 PM

 

Image myImage2 = new Image();
myImage2.Source = bitmapSource2;

  1. Image myImage = new Image();
  2. myImage.Source = bitmapSource;
  3. marker.shape = myImage2;

 

Dec 8, 2009 at 12:49 PM

Radioman,

 

At this moment i am busy with digging a very deep hole. And when this hole is finished i will go hide my self for some hours to shame myself.

All the time i did 

GMapControl1.Markers.Add(myImage) in stead of 

GMapControl1.Markers.Add(myMarker).

I overlooked is several times.

Thank for your patience.

 

BTW. WPF in combination with gMapControl is so much better than with Windows forms.

 

Heru

Coordinator
Dec 8, 2009 at 1:24 PM

;} i'm glad to hear, yeah wpf rocks!