markers not displaying in SampleClient1
I'm a mm newbie and have compiled the SampleClient1.swf. The tiles are loading, zoom and panning are fuctional. However, I'm not seeing any of the markers on the map. Any ideas why?
(Or) are there any good docs/tutorials/examples for adding markers?
Thanks,
-minch
(Or) are there any good docs/tutorials/examples for adding markers?
Thanks,
-minch
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Checked out the latest release from trunk and the markers work in SampleClient1...
-
Inappropriate?I'm have same problem with AS3 trunk-r349. I will try Flex Builder 2, 3 and AS and Flex projects. Markers not visible :( Debug output shows that markers methods are working.
-
Inappropriate?Sorry, i'm read http://getsatisfaction.com/modestmaps...
There is no default marker (image) in library. We need to create own:
package {
import flash.display.Sprite;
public class MyMarker extends Sprite {
public function MyMarker() {
graphics.beginFill(0xFFCC00);
graphics.drawRect(0, 0, 10, 10);
graphics.endFill();
}
}
}
It can be added with putMarker in flex
[mx:Button x="68" y="190" label="Button" click="myMap.map.putMarker('unique_marker_id', new Location(40.73, -73.98), new MyMarker());"/] -
Inappropriate?All the above stuff are rigth, but if you are a beginner simply create a new simbol into the library (i supose you are using flash cs3), put a linkage ID, and the place like this, imagine that the symbol linkage it`s "mark":
map.putMarker('Rochdale', new Location(37.865571, -122.259679),new mark()); -
Inappropriate?Thanks everyone. I am now successfully adding markers to the map. Having problems w/correctly repositioning them at different zoom levels but that'll be another post :)...
-
Inappropriate?what problem exactly do you have?
-
Inappropriate?Sorry, didn't see this until later last night. Here is the symptom I'm talking about:
http://lowpressure.org/tmp/minch_test...
As you can see, at that zoom level, the point is not (relatively) in the correct place. When you zoom in to the street level, you find that the point is in fact at
26.454346, -80.060799
In contrast, take the following google maps version of the same point:
http://maps.google.com/maps?f=q&hl=en...,+-80.060799&ie=UTF8&om=1&ll=26.454821,-80.059776&spn=0.016637,0.037208&z=15&iwloc=addr
You will notice that when you zoom out as far as possible, the Marker holds its position relative to the zoom level.
If you'd like I can paste in my code but essentially, I created a Symbol, MinchMarker, which loads the image from a url, and then used putMarker to place the marker on the map:
container.map.putMarker('Minch Marker', new Location(centerLat, centerLng), MinchMarker.symbolName);
(thanks again...) -
Inappropriate?Hi,
The top left corner of your marker is pointing the right place, no?
You just have to move the marker... There is a topic about that.
Maybe, I don't see the right problem...
Farf
Loading Profile...





