Select to view content in your preferred language

how to add event on point?

932
3
06-15-2011 08:55 PM
mikezheng
Emerging Contributor
1. I created a map and publish to the server;
2. In this map, there are total 4 layers. The first layer named "locations", its type is "Point Features";
3. In web application, i loaded this map thru:
    var myLayer = new esri.layers.ArcGISDynamicMapServiceLayer(myMapUrl, { opacity: 0.5 });
    map.addLayer(myLayer );

i want to add a "onMouseOver" event on each point within the first layer, how to do that?

Thanks,
0 Kudos
3 Replies
derekswingley1
Deactivated User
To get dynamic interaction with your features, you need to use either a graphics layer or a feature layer. I would go with a feature layer as it's less code for you to write. Check out the Feature Layer - Snapshot mode sample. It uses polygons but the idea would be the same for points.
0 Kudos
mikezheng
Emerging Contributor
Got it. Thank you very much.
0 Kudos
derekswingley1
Deactivated User
You're welcome!
0 Kudos