Google Maps & Flex: How to Use Standard Map Marker Instead of Custom Marker? -


i'm using google maps flex 3. i'm using custom markers (custom icons) mark places on map. works fine. problem in cases, don't need custom icon, need standard marker.

for example, how set condition c's icon standard marker:

public function iconsetter():void {     if (condition blah blah){myicon=star; mypointsbuilder(); return;}     if (condition b blah blah){myicon=circle; mypointsbuilder(); return;}     if (condition c blah blah){myicon=standard marker; mypointsbuilder(); return;}     } 

in mypointsbuilder function create markers so:

for  (i=0; < arraylength; i++) {         mymarker = new marker(new latlng(mydata[i].latitude, mydata[i].longitude), new markeroptions({         icon: new myicon, iconoffset: new point(2,2), iconalignment:1,  hasshadow:true         }));         markerboss.addmarker(mymarker, 15, 15);          }         markerboss.refresh(); 

i don't know how revert default marker wrote "standard marker". suggestions?

thank you.

-laxmidi

try this:

for  (i=0; < arraylength; i++) {    mymarker = new marker(new latlng(mydata[i].latitude, mydata[i].longitude));    switch(condition)    {       case a:       case b:          mymarket.setoptions(new markeroptions({icon: new myicon, iconoffset: new point(2,2), iconalignment:1,  hasshadow:true}));          break;       case c: // default, nothing          break;    }    markerboss.addmarker(mymarker, 15, 15);  } markerboss.refresh(); 

this untested, idea


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -