dcsimg
A Flash Developer Resource Site

Results 1 to 18 of 18

Thread: [RESOLVED] getting Yahoo Maps to work correctly...

  1. #1
    Senior Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    100

    [RESOLVED] getting Yahoo Maps to work correctly...

    Here is my .fla file:

    http://www.thegoheens.com/help/main.fla

    In the "cities" page - I can get the Yahoo logo to show up on the bottom but no map appears. It seems like I am very close to getting this to work, but am obviously missing something.

    Can someone please help me??

  2. #2
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    WOW man... not only is that .fla a MESS (still), you need to help us out.

    None of your layers are labeled, you have no folders or organization (other that what I think I labeled MONTHS ago when you needed help with the external.txt loading)

    Where is this Yahoo code even loacated? What is it you have tried or are trying that is NOT working??

    post the code or help us find the problematic code. Help us help you.


    ok..

    is this it:
    code:

    import com.yahoo.maps.MapViews;
    myMap.addEventListener(
    com.yahoo.maps.api.flash.YahooMap.EVENT_INITIALIZE ,
    onInitMap);
    function onInitMap(eventData) {
    myMap.setMapViewType(MapViews.HYBRID);
    }



    is there a link to Yahoo that helps you?..gave you a step-by-step? like the import of some class?

    thanks


    example of Yahoo Maps API:
    http://www.flashmechanic.net/

    FLash 8 >> Example >> Yahoo Map API

  3. #3
    Senior Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    100
    To defend myself a little - since last time I posted we have a new baby and have moved....not that anyone here cares.

    I have tried to follow the step by step instructions from the Yahoo developer page located here:

    http://developer.yahoo.com/maps/flas...ngStarted.html

    The code is located on the "CITIES PAGE", which it appears you have already found. I have the Yahoo logo showing up but no map yet. Any ideas? Thanks!

    -Ben

  4. #4
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    ok..baby & moving gets you a "pass" (this time)

    but seriously... you need to name all those layers for what they are... you should even make folders and nest layers that belong together so they can be collapsed and easily navigated through.. it helps everyone when trying to help..and easier to explain on your side.

    I will give the link a once over.. and see what I can see.

  5. #5
    Senior Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    100
    I know I do, and I will get to that some day here. I appreciate the help!


    Quote Originally Posted by whispers
    ok..baby & moving gets you a "pass" (this time)

    but seriously... you need to name all those layers for what they are... you should even make folders and nest layers that belong together so they can be collapsed and easily navigated through.. it helps everyone when trying to help..and easier to explain on your side.

    I will give the link a once over.. and see what I can see.

  6. #6
    Senior Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    100
    Any luck yet whispers, or anyone else for that matter?

  7. #7
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    oops....sorry, I tried to get my own working a little (no problems)..and kinda got lost on cool it can get... LOL and I never went back to trying and figure out why YOURS isnt working... (what version of FLASH are you using?) and does Yahoo need to be AS 2.0??

    is yours exporting to 2.0? if that be the case? (just a thought)

  8. #8
    Senior Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    100
    I'm using Flash MX 2004 Pro and I believe Yahoo need to be in AS 2.0, but am not 100% positive about that. It doesn't seem to even show the logo in AS 1.


    Quote Originally Posted by whispers
    oops....sorry, I tried to get my own working a little (no problems)..and kinda got lost on cool it can get... LOL and I never went back to trying and figure out why YOURS isnt working... (what version of FLASH are you using?) and does Yahoo need to be AS 2.0??

    is yours exporting to 2.0? if that be the case? (just a thought)

  9. #9
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    Ben...I could kill you!!! HAHAHA... after all this..me recreating a NEW map with extra stuff..etc..etc.. and this WHOLE time...(like I said) needs to be published for Flash Player 7 or 8..and AS 2.0

    it will work fine then...I just re-downloaded yoru .fla and just changed that and tested...works fine..

  10. #10
    Senior Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    100
    I honestly didn't know that publishing it to Flash 7 would make it work, which is why I'm still in the newbie section. One thing though - when I do publish it that way, on the top navigation where there is "home, search, cities, buyers..." the line between "cities" and "buyers" disappears. WHY?? Other then that I think I'm good.......for now.

    -Ben


    Quote Originally Posted by whispers
    Ben...I could kill you!!! HAHAHA... after all this..me recreating a NEW map with extra stuff..etc..etc.. and this WHOLE time...(like I said) needs to be published for Flash Player 7 or 8..and AS 2.0

    it will work fine then...I just re-downloaded yoru .fla and just changed that and tested...works fine..

  11. #11
    Senior Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    100
    wait a minute - I just also noticed that I am unable to get the pan tool to show up. I think also that Yahoo recently added the satellite imagery, but I can't figure how to make that work either. Any thoughts?

  12. #12
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    hmm..I dont see that on my end at all... also..I hope going to add some more controls to the "map"...so you can drag it around and what not.

    also something I noted....my map(in the parameters panel) I have the map type view option to choose the default..yours doesnt...

  13. #13
    Senior Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    100
    ok, I'm an idiot. It turns out that all you need to do it move that little spacer thing between "cities" and "buyers" over a tiny bit and it shows back up. Sometimes I wonder why Flash is so fickle. Anyways - still no luck with the pan tool or any kind of satellite imagery.

  14. #14
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    I used this as my default for testing... maybe you ned to update your Yahoo Map plug-in or something... or save to MX 2004, Flash Player 7 & AS 2.0

    PHP Code:
    //make map draggable
    //import PanTool from Yahoo!Maps class
    import com.yahoo.maps.tools.PanTool;
    //import different views from Yahoo!Maps class
    import com.yahoo.maps.MapViews;
    //import SAT controls from Yahoo!Maps class
    import com.yahoo.maps.widgets.SatelliteControlWidget;
    //import MARKER controls from Yahoo!Maps class
    import com.yahoo.maps.markers.CustomPOIMarker
    import com.yahoo.maps.widgets.NavigatorWidget;

    //add listener to the map (myMap)
    myMap.addEventListener(com.yahoo.maps.api.flash.YahooMap.EVENT_INITIALIZEonInitMap);
    //declare function
    function onInitMap(eventData) {     
      var 
    panTool = new PanTool(); 
          
    myMap.addTool(panTooltrue); 
          
    //myMap.setMapViewType(MapViews.SATELLITE);
          //myMap.setMapViewType(MapViews.HYBRID);
          
    myMap.setMapViewType(MapViews.MAP);
          
    myMap.addWidget(new SatelliteControlWidget());
      var 
    address "1000 45th Street, Kenosha, WI";
          
    myMap.setCenterByAddress(address0);    
      var 
    myMarker = {index:'Y!'title:'BuckRider'description:'Bucks House<br>1000 45th Street!'markerColor:0xFF0000strokeColor:0xFFFFCC};
          
    myMap.addMarkerByAddress(CustomPOIMarkeraddressmyMarker);
      var 
    navWidget = new NavigatorWidget("closed"); 
          
    myMap.addWidget(navWidget);

    I have this working in YOUR movie... I delted yoru map..dragged another to the stage..
    pasted this code in the same frame you had yours..
    and works fine..

  15. #15
    Senior Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    100
    I don't see that option at all. I have these lines:

    Address
    AppID
    Latitude
    Longitude
    Zoom Level

  16. #16
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    I see that...why I mentioned it..maybe install again?..(download a new one)...maybe this is updated version? or read maybe not in MX 2004 I have F8 here..

  17. #17
    Senior Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    100
    YEAH!!! It finally works. I downloaded that Yahoo file again (which I did before but it must not have worked) and deleted the old one and now everything seems to work! Yahoo maps is awesome - now Google needs to jump on board. Thanks Whispers for your help!!!

  18. #18
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    Yeah...its pretty neat...I wish the classes were etter documented and had examples of practical use (not .fla's only) like the liveDocs or Language Ref. does..lol

    you could make a "message" board type deal where people place their own markes through a form or something... or for you...you could charge a fee for taking "LISTINGS" on your site for property..and they can fill out a form with their detail (and pay) and this will auto make a marker for them on the "listings map" as well as list their house..etc...

    or for a contact section....your "FLAG" could be a rollover with video or image of yoru store front so people recognize it when coming...etc..etc..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center