Can we add multiple marker using geo uri scheme - angularjs

I want to add multiple marker on a button click event !!i am using phonegap with angularjs. What exactly should happen is when i click the button google maps application should open up and multiple markes should be displayed deppending on number of location... I have been succeeded in adding single marker using geo uri..
<a class="button-green button-green--large" ng-href="geo:{{selectedClass.latitude}},{{selectedClass.longitude}}?q={{selectedClass.latitude}},{{selectedClass.longitude}}">Locate</a>
p.s. I have searched stackoverflow previous questions and found that i will be able to complete the above task by adding static map , but i wish to open the google map on button click event, which i wont be able to using aforesaid method.

I do not think you can set multiple markers on google maps anymore. Instead, you can make an activity, or a web service to handle it, just like this one:
IMG: https://maps.googleapis.com/maps/api/staticmap?size=235x227&maptype=roadmap&markers=37.970982,23.724559|37.971487,23.724953|37.973291,23.726862
URL: http://kylelam.github.io/SO/customMarkers.html?size=235x227&maptype=roadmap&markers=37.970982,23.724559|37.971487,23.724953|37.973291,23.726862

Related

Google Maps Free API for NGO project

I'm building a React app and I would like to use Maps. Google Maps and other Maps APIs have a charge and this project will be free for the community (just like an NGO) so no budget at all.
In this app there is a page to create an Event, so you can type many things and where the Event will happen, and that is where I would like to use Maps, to search and show the location.
I thought that if is there any possibility to use a search box connected to an API just to get the Longitude and Latitude based on the search would be great, but I have no idea how to make it and I was expecting that you could help me find a way. (the thing is: get the information for free)
Just as I create this event, I would like to show this information on the Event page, so where the event will happen. And that would be the second part that I would like to use Maps. Do you know if I just show the location in Maps if I would be charged? If so, then I can use redirection to Google Maps using the Latitude and Longitude that I got from the event creation.
Thanks in advance!
See https://www.google.com/nonprofits/offerings/google-earth-and-maps/ for non-profit organizations.

How can i automate Google map image on web page?

I am not able to automate google map screen which is present on my application web page.
I have web page where google map is present in square in half of screen. I want to click on the road present in map or a restaurant logo which is present on the google map.
When i tried to find the locators for the map then in the DOM it is present as an image and no other html properties or locators are associated with it.
Also i tried an option using moveToElement() function of action class but this solution is not reliable as most of the time it is not working.
Please suggest me any solution for this automation issue if someone faced this issue of Google maps automation before ?
Sounds like HTML5 issue over a google maps issue. This is tricky for Selenium, see these articles:
https://www.linkedin.com/pulse/html-canvas-testing-selenium-opencv-maciej-kusz/
https://chariotsolutions.com/blog/post/automated-testing-of-html5-canvas/
which recommend using action chains to move to and click certain x,y coordinates.
Also, check out the canvas javascript api; you may be able to use javascript_executor to manipulate the canvas.

How do I get my button to redirect to a web page within the app?

So far, I have it so that when a user presses a button, a browser opens and redirects the user to my desired url. However, I want this to happen within the app instead of a web tab. How can I do this?
Use the BrowserComponent, just add it to the center of a border layout form and set the URL for that component. Check out the list of main components in Codename One within the developer guide.
Define a xml layout containing a widget called webview. Then in your activity you implement a listener to your button which invokes that xml with the desired page to load inside your webview. Google to find some code and return here with your code problems, if you find some. If this will be the case, open new questions provinding detailed info about your matters then we can help more. Best.
EDIT: Excuse me, just now, re-reading your question I think I really understand it, and the solution is very simple, just a line of code (to instruct your app to open a webpage inside your webview, and not the regular browser, outside your app). Try this:
wv = (WebView) findViewById(R.id.myWebView);
wv.setWebViewClient(new WebViewClient()); // needed to open url inside our webview, otherwise it will open at the default browser
wv.loadUrl(url);

How to get button Response/Request URLs in QTP?

How do I get Response/Request URLs (which are shown in F12 Developer tools - Network Tab) using QTP 11? Based on these URLs, I need to perform certain action in my application. Is there any alternate solution to get those URLs?
Scenario: Open IE browser and navigate to a URL, Press F12, Go to 'Network' tab. Click on 'Start Capturing' button. Now click on any button or link on the page, you will get a set of URLs in the Developer Tool (F12).
Firstly, do you need all of the URL requests generated from a button and/or link click? Remember that what you get from the "Network" tab in the developer tools also include URL's for fetching e.g. Javascript and CSS in addition to, for instance a GET request to an external API.
I'll try an provide you with an alternative approach. If what you are really requiring is the URL associated with each interactive element, then you should be able to get that by using the GetROProperty method like so:
strURL = Browser("YourBrowser").Page("MainPage").WebButton("aButton").GetROProperty("href")
A more generic script for fetching e.g. all the "href" properties for all the links on a page may be found in the following post: (HP QuickTest) How do I get HTTP status using QuickTest?.
Hope this helps.
UPDATE: With regards to your question regarding fetching of the URL's from the IE developer tools; As far as I know there is no way to fetch them from this view by using QTP.

SoundCloud widget custom edit

I'm using the following code to create a custom SoundCloud player:
https://github.com/soundcloud/soundcloud-custom-player
What I have done is:
http://epopengate.org/wp-content/themes/epopengate/test/examples/sc-player-standard.html
What I would like to do is have the track listing appear when the user clicks on the info button...I would like to save space and I don't really need to display what's being shown in that window anyway. What would I need to change in order to do that? I assume something in the JS file, but I'm not sure what to move around to make it work.
I know there is a widget that works similar here: https://soundcloud.com/pages/widgets - but it's flash based so Apple devices would not be able to use it and by creating a track listing that appears when the Info button is clicked, increases mobile compatibility by allowing the user to click because you can't hover with mobile devices.
Thanks,
Josh
You can use HTML5 widget, which is the default option for embeds from SoundCloud now – https://blog.soundcloud.com/2011/11/03/html5/
These will work fine on iOS and Android.

Resources