0

Yahoo Maps API for AS2/3 not working

It looks like the request hangs when requesting maps.yahooapis.com. I also looked at the crosdomain.xml file and it looks very restrictive:

<cross-domain-policy>
<site-control permitted-cross-domain-policies="master-only"/>
<allow-access-from domain="*.yimg.com"/>
<allow-access-from domain="*.maps.yahoo.com"/>
<allow-access-from domain="*.corp.yahoo.com"/>
<allow-access-from domain="*.ds.corp.yahoo.com"/>
<allow-access-from domain="*.yahoo.com"/>
</cross-domain-policy>

This example off the API page does not work either:
http://developer.yahoo.com/maps/flash/V3.5/asGS.01.html

Any ideas?

by
17 Replies
  • QUOTE (ovidiu @ May 11 2010, 06:16 PM) <{POST_SNAPBACK}>
    This example off the API page does not work either:
    http://developer.yahoo.com/maps/flash/V3.5/asGS.01.html


    Sometimes when I click that it seems to be working, but other times it does not.
    0
  • I found this page:

    http://developer.yahoo.com/maps/flash/

    "The ActionScript® 2 API described here has been deprecated. Yahoo! is proud to now offer an all-new ActionScript 3.0 API to developers. You can find the documentation, component download and examples on the Maps Section of the Flash Developer Center, here on the Yahoo! Developer Network."

    I don't enough about the ActionScript API's to know if this is the issue and did this page go up today or if this an old page and thus a non-issue?
    0
  • Well, this application has been working for a while, the issue just appeared recently. And although Yahoo has deprecated the AS2 API, they claim to keep if up and running. Plus I think that there are some AS3 apps using the API that are having the same issues.
    0
  • Thank goodness someone else is posting about this. I've been beating my head against the wall trying to find a solution. My application simply stopped working yesterday and now I can't seem to get it to work anymore. Even the samples downloaded directly from http://developer.yahoo.com/maps/flash/asGettingStarted.html, such as http://developer.yahoo.com/maps/flash/V3.5/asGS.01.html, don't work when I change the appID to my appID and upload them to my server. However, the AS3 examples will work, but I don't believe that AS3 has the same ability to create customPOImarkers like I want and need.

    I see that there are several people posting about this (or something related to this) now:
    http://stackoverflow.com/questions/2814429...topped-working/
    http://developer.yahoo.net/forum/index.php?showtopic=5529
    http://developer.yahoo.net/forum/index.php?showtopic=5525

    QUOTE (ovidiu @ May 11 2010, 06:16 PM) <{POST_SNAPBACK}>
    This example off the API page does not work either:
    http://developer.yahoo.com/maps/flash/V3.5/asGS.01.html

    I too noticed that this example wasn't working yesterday, but it appears to be working now. However, it still doesn't work when I upload it to my own server, presumably because of the crossdomain.xml strictness?

    Has anyone heard anything from Yahoo about this issue?
    0
  • I have the exact same issue. I have a Yahoo Map API application that I have been using for months and it just died today all of a sudden. Nothing in the application changed at all in the last month. Has anyone heard what happened and how to fix it?

    CODE
    import com.yahoo.maps.LatLon;
    import com.yahoo.maps.api.Languages;
    import com.yahoo.maps.MapViews;
    import com.yahoo.maps.tools.PanTool;
    import com.yahoo.maps.widgets.SatelliteControlWidget;
    import com.yahoo.maps.widgets.ZoomBarWidget;
    import com.yahoo.maps.markers.CustomPOIMarker;

    var satControl:SatelliteControlWidget = new SatelliteControlWidget(SatelliteControlWidget.HORIZONTAL);
    var zoomControl:ZoomBarWidget = new ZoomBarWidget();
    var pantool:PanTool = new PanTool();
    var markerXML:XML = new XML();
    var stageWidth:Number = Stage.width;

    markerXML.ignoreWhite = true;

    // Get Markers
    myDate = new Date().getTime();
    var returnData:XML = new XML();
    var xmlRequest:XML = new XML();
    var requestNode:XMLNode = xmlRequest.createElement("request");
    var commandNode:XMLNode = xmlRequest.createElement("command");
    commandNode.attributes.name = "getMarkers";
    commandNode.attributes.hashid = _root.hashid;
    txtTrace = commandNode.attributes.hashid;
    requestNode.appendChild(commandNode);
    xmlRequest.appendChild(requestNode);
    xmlRequest.sendAndLoad("http://[I have my correct URL here.]/mapinator5000.aspx?n=" + myDate, markerXML);
    // end get markers

    markerXML.onLoad = function(success) {
    if (success) {
    txtTrace += " | -->" + markerXML.firstChild.attributes.zoom; // -------------------
    renderMap(new LatLon(markerXML.firstChild.attributes.centerLat, markerXML.firstChild.attributes.centerLon), markerXML.firstChild.attributes.zoom);
    }
    };

    function renderMap(center:LatLon, zoom:Number):Void {
    var mapdata:Object = { latlon:center,
    zoomLevelStr:zoom,
    mapViewType:MapViews.HYBRID,
    language:Languages.en_US,
    appidStr:"[I have my correct App ID here]" };
    var mapContainer = this.createEmptyMovieClip("mapContainer", 1 );
    var map = mapContainer.attachMovie("com.yahoo.maps.api.flash.YahooMap", "map", 1, mapdata);
    map.addEventListener(com.yahoo.maps.api.flash.YahooMap.EVENT_INITIALIZE, onMapInit);

    function onMapInit(event:Object):Void {
    txtTrace += " | onMapInit fired "; // -------------------
    map.setSize(Stage.width,Stage.height - 30);

    map.addWidget(satControl);
    map.addWidget(zoomControl);
    map.addTool(pantool, true);

    addMarkers(markerXML);

    function addMarkers(xml:XML):Void {
    txtTrace += " | addMarkers fired "; // -------------------
    var locations = xml.firstChild.childNodes;
    for (var i=0; i<locations.length; i++) {
    var currentLoc=locations[i];
    var description:String = currentLoc.attributes.description + " Lat:" + currentLoc.attributes.lat + " Lon:" + currentLoc.attributes.lon;
    var markerData:Object = {index:currentLoc.attributes.index, title:currentLoc.attributes.title, description:description, markerColor:currentLoc.attributes.markerColor, strokeColor:currentLoc.attributes.strokeColor};
    map.addMarkerByLatLon(CustomPOIMarker, new LatLon(currentLoc.attributes.lat, currentLoc.attributes.lon), markerData);
    }
    }
    }
    }
    0
  • My page came back up around 5pm Eastern! Yeah. I get to sleep tonight instead of building another map with another product.

    I imagine that this forum is monitored in some way by Yahoo and they responded. Thank you to whoever you are.

    I now know more than I ever wanted to know about the guts of Yahoo geocode mapping. I only wish I knew what happened and will it happen again?
    0
  • Good for you Patrice!

    Anyone else's map working? I'm still out of commission...
    0
  • Still not working on my application, the same thing, hangs at maps.yahooapis.com.
    0
  • Now that is unusual and unexpected. Before you give up, make sure you have cleared your cache and then reload the page. I had to do both to see that it was working again.

    There is one thing I found that I thought might be causing my problem. I am testing the map page on a private password protected part of the website. I noticed that Yahoo said they would not provide this service to password access webpages. But my page worked for days before it failed. I also tried putting it up for a few minutes in the middle of the night last night without the password protection but it didn't work that way either.

    Yahoo also has specific language about the amount of hits it will accept from your server per 24 hours. It might be worthwhile to read the users guide on Yahoo about the map api service to understand these limitations they provide.
    0
  • Patrice, in the end did you actually have to change anything to get your maps working or was it completely on Yahoo's end? I still don't have maps!
    0
  • I have one map working right now, and another not. They both used to work fine for months. The one that works, just displays a map, centered on a given spot, and zoomed at a particular level. The map that doesn't work pulls XML data from a local URL and plots POI markers for that data. Of course, that's the important one.

    FlytrapCare, does your map pull data from an exteral URL and plot it? Patrice, does yours?
    0
  • Hi Scott,

    I just noticed that my map started working again! Yes!

    My map pull data from a script on my server and displays the data as little POI markers on the map with a bit of information (tracked visitors).

    You can see it in action on the front page of my site here:
    http://www.mixmap.com/
    0
  • QUOTE (FlytrapCare.com @ May 13 2010, 06:14 AM) <{POST_SNAPBACK}>
    I just noticed that my map started working again! Yes!


    FlytrapCare, I like your map! Very cool.

    Now all my maps are working again, too. For anyone else who is wondering, I didn't do anything at all to change my code, the maps just came back online.
    0
  • No I didn't change a thing. It just started to work again. (With the provision that I did have to clear the cache out). The file that provides the data is a simple .xml file. The photos are living inside the same directory just for testing purposes. So all things were just lumped into the same directory on the server. I password protected the directory and thought that was the issue, but it was not.

    I am using Flash Yahoo Maps by this company: http://www.alvena.de/ext/flash_yahoo_maps.html I have been in contact with them since yahoo went down. They were not happy and they are redesigning their product this week to accommodate the changes. It may end up being a Google map api in the end. This current product is not compatible with Dreamweaver CS4 anyway so that was another reason they were going to pull it.

    Also check to see if your server is making more than 50,000 hits per day to yahoo maps. Unlikely, but they claim they will not allow more than that.
    0
  • Yes, sorry about that. This issue was caused by a migration of some services off of our XML servers. We have rolled back and the service should be working now.

    Robyn Tippins
    Community, YDN
    0
  • As I can see many of you managed to fix the problem or it seems it started to work perfectly... Did you do anything special to fix the problem?<br><br><div>import com.yahoo.maps.tools.PanTool;<div>import com.yahoo.maps.markers.CustomPOIMarker;<div>import com.yahoo.maps.widgets.NavigatorWidget;<div>import com.yahoo.maps.widgets.SatelliteControlWidget;<br><div>myMap.addEventListener(com.yahoo.maps.api.flash.YahooMap.EVENT_INITIALIZE, onInitMap);<div>function onInitMap(event:Object):Void {<div>&nbsp;&nbsp;&nbsp;&nbsp;var navWidget:NavigatorWidget = new NavigatorWidget(&quot;open&quot;);<div>&nbsp;&nbsp;&nbsp;&nbsp;myMap.addWidget(navWidget);<div>&nbsp;&nbsp;&nbsp;&nbsp;var satControl:SatelliteControlWidget = new SatelliteControlWidget(SatelliteControlWidget.HORIZONTAL);<div>&nbsp;&nbsp;&nbsp;&nbsp;myMap.addWidget(satControl);<div>&nbsp;&nbsp;&nbsp;&nbsp;var panTool:PanTool = new PanTool();<div>&nbsp;&nbsp;&nbsp;&nbsp;myMap.addTool(panTool, true);<div>&nbsp;&nbsp;&nbsp;&nbsp;var address:String = &quot;Dunajska cesta 190, slovenia&quot;;<div>&nbsp;&nbsp;&nbsp;&nbsp;myMap.setCenterByAddress(address, 0);<div>&nbsp;&nbsp;&nbsp;&nbsp;var myMarker:Object = {index:&#39;Studio Pomladi Se&#39;, title:address, description:&#39;Pomladite se z nami!&#39;, markerColor:0x990099, strokeColor:0xFFFF00};<div>&nbsp;&nbsp;&nbsp;&nbsp;myMap.addMarkerByAddress(CustomPOIMarker, address, myMarker);<div>}<br><div>thats my code and it was working perfectly, now it seems I can˝t load widgets :/ I think I havent changed anything from time the map worked perfectly.&nbsp;<br><br>Output says:&nbsp;<br>Forms Component - Version 0.81<div>Forms Component - Version 0.81<br>but that probably doesnt mean anything. Can someone help me with this code or help me fix the map? When I try examples from Yahoo page with custom poi markers the examples also doesnt work :(</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
    0
  • This appears to be broken again<br><br>This crossdomains file is not allowing me us to use the maps api anymore<br><br>http://maps.yahooapis.com/crossdomain.xml<br><br><br>Thanks!<br><div class="quote"><div class="quotetop">QUOTE<cite>(Anže @ 3 Sep 2011 2:46 PM)</cite></div><blockquote class="quotemain">As I can see many of you managed to fix the problem or it seems it started to work perfectly... Did you do anything special to fix the problem?<br><br><div>import com.yahoo.maps.tools.PanTool;<div>import com.yahoo.maps.markers.CustomPOIMarker;<div>import com.yahoo.maps.widgets.NavigatorWidget;<div>import com.yahoo.maps.widgets.SatelliteControlWidget;<br><div>myMap.addEventListener(com.yahoo.maps.api.flash.YahooMap.EVENT_INITIALIZE, onInitMap);<div>function onInitMap(event:Object):Void {<div>&nbsp;&nbsp;&nbsp;&nbsp;var navWidget:NavigatorWidget = new NavigatorWidget(&quot;open&quot;);<div>&nbsp;&nbsp;&nbsp;&nbsp;myMap.addWidget(navWidget);<div>&nbsp;&nbsp;&nbsp;&nbsp;var satControl:SatelliteControlWidget = new SatelliteControlWidget(SatelliteControlWidget.HORIZONTAL);<div>&nbsp;&nbsp;&nbsp;&nbsp;myMap.addWidget(satControl);<div>&nbsp;&nbsp;&nbsp;&nbsp;var panTool:PanTool = new PanTool();<div>&nbsp;&nbsp;&nbsp;&nbsp;myMap.addTool(panTool, true);<div>&nbsp;&nbsp;&nbsp;&nbsp;var address:String = &quot;Dunajska cesta 190, slovenia&quot;;<div>&nbsp;&nbsp;&nbsp;&nbsp;myMap.setCenterByAddress(address, 0);<div>&nbsp;&nbsp;&nbsp;&nbsp;var myMarker:Object = {index:&#39;Studio Pomladi Se&#39;, title:address, description:&#39;Pomladite se z nami!&#39;, markerColor:0x990099, strokeColor:0xFFFF00};<div>&nbsp;&nbsp;&nbsp;&nbsp;myMap.addMarkerByAddress(CustomPOIMarker, address, myMarker);<div>}<br><div>thats my code and it was working perfectly, now it seems I can˝t load widgets :/ I think I havent changed anything from time the map worked perfectly.&nbsp;<br><br>Output says:&nbsp;<br>Forms Component - Version 0.81<div>Forms Component - Version 0.81<br>but that probably doesnt mean anything. Can someone help me with this code or help me fix the map? When I try examples from Yahoo page with custom poi markers the examples also doesnt work :(</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></blockquote></div>
    0
  • Yep, broken again for me too.  Anyone know if a fix is coming soon?

    QUOTE(Daniel @ 20 Sep 2011 2:53 PM)
    This appears to be broken again

    This crossdomains file is not allowing me us to use the maps api anymore

    http://maps.yahooapis.com/crossdomain.xml


    Thanks!
    0

Recent Posts

in General Discussion at YDN