Country State select list using google api - javascript

I have a list of countries generating dynamically from my database. On change event for the select list, when I select a country, I want to generate another select list for selecting states.
I am trying to achieve this using Google Maps API.
Can anyone tell me how to achieve this. Struggling from 5 hours on this.
Thanks
Phaniraj N

I just tried a quick googled around and found that google seems like don't provide such service.
But you may use other services like:
http://www.dyngeometry.com/web/WorldRegion.aspx
Another finding:
Google places API - How to get regions of a country?
hope it helps

Related

How do I filter across Tableau workbooks through the dropdowns?

Please be patient with my English, and it's my first time to be here. I am very new to Tableau and JavaScript as well. I am trying to find a way to filter the dashboards in a different place. For example, when I click a person name from a list on the first dashboard and it shows a result, once I click another dashboard from the drop-down (not on API, just come from an HTML nav bar), this dashboard should show any results with the person name I chose on the first dashboard.
Like this: I'm viewing Dashboard 1. I apply filter Anthony. Then I go to Dashboard 2 after clicking this on drop-down. IF Dashboard 2 also has a filter named exactly "Anthony" show the result automatically.
I tried to research about this, but it does not help very much. I read the API reference and I thought getFilterAsync() from FilterEvent Class would work, but it doesn't. I would appreciate if you can explain or show an example with Javascript codes constructively. This example is similar to my goal, but I don't plan to use two dashboards and textbox/button on the same page. Another example is sort of what I want, but I don't need to put specific values on method to filter. I need to filter across workbooks after clicking anything on the API. It's not just a person name. It can be a date, number, location, etc. I want to know how I make filter values/parameters active on any dashboards.
Any response will be helpful. Thank you!
use action filter, where you specify the source dashboard and then the target dashboard

Custom advance filtering on Sharepoint list view [Sharepoint Online] using JavaScript

I am trying to create a webpart in Sharepoint online, that, works like a advance filtering.
Functionality of the webpart:
This app will show advance filtering options
For example:
they can choose: Category[column name], File type [doc, ppt], file name so on
I know there is default filtering options on sharepoint list. However, my effort is to make this advance filtering webpart appear on top of the list and choose filtering options instead of going to list setting and apply filtering.
This will have many options which are not in the default list filtering options.
User can save the this filter for later use.
My question is:
Is it programmatically possible to apply filters, with, my own filtering options? [Sharepoint online webpart, hence, using JavaScript]
If so, kindly give me some idea. Since, Sharepoint online development is pretty new. I am running short of useful documentation.

How to add my own custom places at autocomplete Places search box?

I have implemented autocomplete search box. From here,
Places search box
I have seen this question, how-to-display-custom-places-in-google-maps-api-search-results
But it was unable to help me. The accepted answer is not showing custom places in auto completed result.
Now I want to show also my own custom places (from a JSON list of places) along with Google's place suggestion at autocomplete result. How can I implement this?

Javascript plugin that mimics Google Sheets sort and filter functionality?

Wondering if anyone knows of a Javascript plugin with the functionality to sort and filter an HTML table similar to Google Sheets and Excel (see pic). Specifically, the filtering functionality is the kind where multiple values can be checked/unchecked (as opposed to a search box which can only search one value).
I know the functionality exists but I've looked high and low and haven't found anything. Here are some that don't have the checkbox filtering option:
http://www.listjs.com/
http://www.javascripttoolbox.com/lib/table/index.php
http://www.datatables.net/
http://tablesorter.com/docs/
http://www.javascriptkit.com/script/script2/tablefilter.shtml
The list could go on, but I haven't found anything out of the box.
(Names in image are fake).
You might be able to write your own, as seen in this answer.
The basic idea is that you present a checkbox for each unique value, and only show if the corresponding checkbox is true. JS's grep feature should help tremendously.
This should help you with your project: https://code.google.com/p/jquery-datatables-column-filter/ it is a plugin for datatables.net which you already have come across.
There is example code to enable a multi-checkbox type filter on your tables here: http://jquery-datatables-column-filter.googlecode.com/svn/trunk/checkbox.html
With some CSS magic you should be able to make it look exactly like Google Sheets if you wish.

Google Maps API - Search XML Markers

EDIT: Just some background information - the system is set up using mySQL to store each marker's info, which is then converted into an XML file by some PHP code, which then displays it via the Maps javascript file. I currently have about 10 markers, which are stored in the mySQL database. Upon loading the map, all the markers are loaded.
I am currently using the Maps API v3 to display markers, and to display their infoWindows in a div. That's all good so far.
What I'd like to do it add a search functionality.
From what I understand, the API does have a search function, but when I tried it on the example in the documentation, it did a search across the whole map. I want it to only search amongst my markers.
EDIT: As I mentioned in the EDIT at the top, all markers are displayed at the initialize() - therefore, when someone searches for a location, the closest match would be selected. In the case of my map, the infowindow is displayed and split across 2 'html' sections, outside the map area (i.e., there is no bubble display on the actual map)
EDIT: Initially, I was worried that someone would come along and copy my idea if I posted the URL, but I'm sure it's been done already! Scr*w it - CityMap Prototype
So, I guess I'd need to find/create some sort of system that searches the XML file. Initially, the user would only be able to search for locations by name. Later, I'm sure I could come up with creative uses for the search.
Can anyone point me in the right direction?
EDIT:
After posting this, I found a tutorial on W3C - PHP Example - AJAX Live Search. It searches for links from an XML file, and then displays them in the temporary search results under the bar, as you type. Does anyone know how I can link this search function to the markers?
From what I can understand, I'd need to somehow link to each marker via XML, but that's the extent to my guess.
Thanks
From my understanding the api's search functionality is not for local files but for the whole map(world), if you are doing php I would recommend for the time being utilizing the tutorial you found and then linking the search functionality to performing some sort of javacript response which would perform the action which you are looking for upon search. I am not sure what this functionality is as you already would have the markers plotted on the map from the sound of your question. Let me know if you need more on this not sure if you are in a php/ruby/asp environment. (or if you are in a truly html environment) hth

Categories