Blank frame for jQuery Mobile Google Maps - google-maps

I am integrating Google Maps with jQuery Mobile and .NET. I am following the Google Code (example 4) documentation here: http://jquery-ui-map.googlecode.com/svn/trunk/demos/jquery-mobile-example.html#jquery-mobile-example-4.html
I've been careful in transferring the code, but I keep receiving a blank frame. The map doesn't show up in the frame.
Anyone else run into this problem? Any recommendations on additional documentation, tutorials, videos, and reading?
I greatly appreciate anyone's time and help, thank you.

I think your problem is outlined here : http://www.smashinglabs.pl/gmap/examples
If, for any reason, any dimension of div will be equal 0 during
loading process, maps will stop working correctly. It is quite common
issue while loading tabs, accordions, etc.
He goes on to outline specific problem resolutions. Some of them:
Try calling the 'refresh' function manually google.maps.event.trigger($('#map').data('gmap').gmap, 'resize');
If your #map container doesn't have a set size, it will default to 0x0 by normal HTML/CSS standards. Try setting a size manually, say 300x300
etc...

It might be the google loader api key? (If you copy paste). Get any JS errors?
As Phill said, post some code and we'll be able to help you better.

If you are using jquery.ui.maps thats the wrong syntax. From what i can tell you are using another plugin.

Thank you for your time and help. After more research and additional help from others, I was able to find a Google Maps solution to get me moving more quickly. A great conversation that outlines resources I studied, used, and highlighted can be found in this google groups discussion.

Related

Always avoid using <iframe>?

Some days ago, some friends of mine told me to avoid using <iframe> for virtually anything, which of course includes Google Maps. That made me do some research and, among other things, find this thread in Quora (http://www.quora.com/Google-Maps/What-are-best-practices-and-recommendations-to-implement-Google-maps-within-an-iframe-on-a-webpage), which I think isn't conclusive, at least in my case. I've made a simple site which includes displaying a Google Map. I used an <iframe> because it is very simple and, as pointed out before, it is the option that Google offers within every map, so I guessed it was the optimal one.
My question is: using an <iframe> is always a bad solution, or in a simple case like mine (only displaying a location map), is it recommended?
Thank you all, please let me hear your thoughts on this,
João
Using an iframe is like having another page loaded in your browser. Which takes resources. I think this is what the suggestion to avoid it based on. But naturally, the solution is to avoid those who suggest that you should avoid something always. Just use it when it makes sense and know where to stop.

Embed a Google Maps API Javascript in Flex

How could I embed a Google Maps API Javascrip on my Flex Application?
I found some examples, but none of them worked for me.
http://javey.net/bike/map/player5/map.html?gpx=http://javey.net/bike/gpx/24-nov-2007.gpx&title=Sheldon.Road.Trail
Can anyone help me with that question? I would really appreciate it.
What have you tried so far? Do you have any code to show us?
Your second link explains using an HTML wrapper in Flex, which seems like a straightforward solution to me. You can make sure the HTML portion is working by opening it in a browser to make sure it shows up and displays properly (often this is the real problem).
The poster of the links you gave also linked to the source code in the comments: Flex + Google Maps. Try modifying a copy of their code to do what you want it to. Or cut out as much of their code as you can while preserving the functionality you want to see how they do it, and go from there.
I wonder if StageWebView is what you're after?
http://blogs.adobe.com/ria/2011/01/10/accessing-the-stagewebview-object/

Google Maps API v3 - Add a placemark control

I've been researching on this for some days but can't find a proper answer neither here nor in the API's doc.
http://dl.dropbox.com/u/3428472/download.png
I'm looking for a way to add that control to a gmaps implementation. I guess I could go for designing a custom control but since this one already exists, there must be a way of adding it as is.
That is the blue drop a pin control available in the edit mode of the places API.
Any help would be much appreciated.
Thanks!
The image looks like an implementation of the drawing-library.
There is no need to steal something, it's a part of the public API.
You'll find the docs here: https://developers.google.com/maps/documentation/javascript/overlays?hl=en#drawing_tools

Anyone familiar with Vimeo? Trouble with js_onLoad, broken?

Hi all I was trying to get the vimeo "swfobject.html" example from git hub to work, but it simply doesn't work # github.com/vimeo/vimeo-api-examples/blob/master/moogaloop-api/javascript/swfobject.html
I debugged a bit, and realized it doesn't even enter the "js_onLoad" function. Does anyone know if this github code dated or is js_onLoad deprecated? I'm just trying to do a simple example of displaying the alert "hi" after the player is loaded, but I can't even get that far.
My very simple sample code is here: http://pastie.org/1110855. Does anyone see a problem?
Any fellow stackoverflowers versed in vimeo JS API? Cheers
I feel your pain. There's a bunch of inconsistent information about the vimeo API out there. But there are still parts that work. Check out the API Playground which works and demonstrates clearly how to do all sorts of useful things. The source code is on github. You can take apart the playground.html file and just leave in the parts that you need.
Important caveat about the playground.html file -- it doesn't work (for me) when running off a file:/// URL. It has to be coming off an http server to function at all. HTH.
I consider myself a bit of an expert on the Vimeo JS API. Their documentation and demo's are very poor, so I put together this little demo that I think it much easier to follow. It users jQuery and the iFrame embed method, but hopefully it helps:
http://labs.funkhausdesign.com/examples/vimeo/froogaloop2-api-basics.html
It shows how to listen for an event and fire a method.
After several experiments, it seems that events are only fired with the HTML5 version of the embed, not with the Flash version.
As the Universal Embed code (iframe) automatically selects the technology, I believe that the best way to go is to avoid using it and make your own embed.

Scraping hidden HTML (when visible = false) using Hpricot (Ruby on Rails)

I've come across an issue which unfortunately I can't seem to surpass, I'm also just a newborn to Ruby on rails unfortunately hence the number of questions
I am attempting to scrape a webpage such as the following:
http://www.yellowpages.com.mt/Malta/Grocers-Mini-Markets-Retail-In-Malta-Gozo.aspx
I would like to scrape The Addresses, Phones and URL of the next Page which in this case is
http://www.yellowpages.com.mt/Malta/Grocers-Mini-Markets-Retail-In-Malta-Gozo+Ismol.aspx
I've been trying just about anything i could think of but nothing seems to work due to them being set to invisible or so.
The Address is within an h3 tag but it does not appear to be scrap-able. I've been also looking into ScRUBYt from the following url http://www.rubyrailways.com/ajax-scraping-with-scrubyt-linkedin-google-analytics-yahoo-suggestions/, but i really cant seem to find heads or tails of how to apply them in this case.
I would really appreciate any pointers as this is an obstacle which i really need to surpass in order to move forward on my assignment. Thanks in advance for any help.
In the particular example you have given, the elements are not hidden, but loaded via ajax after the page load. So basically what you need is a http client which can run javascript (web browser?) to see those address and other contents.
If you want to really automate the process and scrape the data which is got through ajax or javascript, you can try selenium. Even though it is not developed for that purpose, it serves your needs.
I don't have an answer to your specific question, but I thought I'd point to Ryan Bates' Railscast episode on screen scraping with ruby: http://railscasts.com/episodes/173-screen-scraping-with-scrapi
He uses a library called scrAPI instead of ScRUBYt, since he couldn't get ScRUBYt working. scrAPI seems to be a bit easier maybe?
I hope this helps somewhat, good luck with your assignment! :)
-John
There is a good script posted at the google group. It seems to extract address, etc. You may want to look at the code for the script page.txt.