Picturemarkersymbol is the rendering of dots into photos, the effect
The core code is as follows:
1Featurelayer.on ("Mouse-over",function(evt) {2 varPoint =Evt.graphic.geometry;3 varPicturesymbol;4 Switch(Evt.graphic.attributes.TENDERTYPEID) {5 Case"1":6 {7Picturesymbol =NewPicturemarkersymbol ("/images/blue.png", 40, 40);8 Break;9 }Ten Case"2": One { APicturesymbol =NewPicturemarkersymbol ("/images/green.png", 40, 40); - Break; - } the Case"3": - { -Picturesymbol =NewPicturemarkersymbol ("/images/purple.png", 40, 40); - Break; + } - Case"4": + { APicturesymbol =NewPicturemarkersymbol ("/images/red.png", 40, 40); at Break; - } - default : - { -Picturesymbol =NewPicturemarkersymbol ("/images/yellow.png", 40, 40); - Break; in } - } to varGraphic =NewGraphic (point,picturesymbol); + picturegraphiclayer.add (graphic); -});
View Code
Code display effect: After the mouse moved over the picture, display a larger image
Symbol Chapter-picturemarkersymbol in ArcGIS API for JavaScript