GoogleMarker to CustomMarker(path as string), Bitmap

Topics: Windows Forms
Apr 28, 2012 at 11:21 PM

Any thoughts of implementing a custom marker that uses a path? Now we have the red and green markers, but wouldn't it be much easier for everyone to have a custommarker, (byval path as string function) or something alike, build in?

Coordinator
Apr 29, 2012 at 10:06 AM

var m = new GMarkerGoogle(new PointLatLng(10, 20), new Bitmap("C:\\marker.png"));

Apr 29, 2012 at 10:16 AM

Hi Radioman, thanks for the reply. The "GMakerGoogle" doesn't exist. Could it be because it isn't implemented yet in the latest (non-beta) release?

Coordinator
Apr 29, 2012 at 10:27 AM

yes

Apr 29, 2012 at 10:29 AM

Can't reach the source code page at the moment m8. Do you have a compiled version for me?

Coordinator
Apr 29, 2012 at 10:32 AM

http://greatmaps.codeplex.com/releases/view/73162

download latest from the bottom

Apr 29, 2012 at 10:34 AM

Thanks m8. Will check it immediately.

Apr 29, 2012 at 11:27 AM

Seems you simplified much more. Had a lot of changes to make :P. Works like a charm m8.

- how do you hide the cross in the middle of the map?

Personally I think you shouldn't embed the images into the .dll to keep it the dll itself small, but let the user add them to the project. I finally could download the sourcecode an saw that the imahes take up 50k. After optimizing the png's I took off 20kb's. Besides that I will never use all the 43 images. Perhaps something to think about. But that's my thought only. ;)

Coordinator
Apr 29, 2012 at 11:37 AM

well you can remove them, it's just for demo

Apr 29, 2012 at 11:45 AM

;)

2 questions left:

- how do I remove the cross in the middle of the map?

- I am adding markers to the map at runtime, each after 500ms to see the "animation". This version doesn't seem to "refresh" the map. I only see the first marker. Adding mymap.refresh doesn't work either. When I zoom the map The markers are visible instantly. What do I need to do to see it "live"? In version 1.6 this worked perfect (without mymap.refresh).

Coordinator
Apr 29, 2012 at 11:55 AM
  • map.ShowCenter = false;
  • map.Refresh();
Apr 29, 2012 at 1:43 PM
Edited Apr 29, 2012 at 1:52 PM

Refresh doesn't work m8. :cry:

blblbl.....

Marker isn't placed at that point. Only when I zoom the map the marker is set to the proper point.

here's an image as example: http://i50.tinypic.com/e8r1id.jpg

Coordinator
Apr 29, 2012 at 1:44 PM

add overlay first

Apr 29, 2012 at 1:51 PM

Thanks m8, that also solved the "refresh-issue". So first add the Overlay, then the Marker.