How Best to handle oData, JSON data with Google Maps API - json

I'm sorry for such a basic question but this is all very new to me. What would be the best way to handle this scenario:
Access address data via oData
Can only obtain 50 records at a time via oData
Allow user to select what gets retrieved using some kind of toggle switch based on a status field (some selections will result in more than 50 records)
Toggle visibility of markers based on checkboxes
How do I combine the various oData calls during the selection process? How do i toggle markers based on status data stored in JSON? Or do i have it all wrong? Thank you for any help you guys can provide to get me going in the right direction.

Related

Free geocode API allowing store names and coordinates

My application should allow users to store events and their locations and then perform search on them - so I need those locations in my database with their names and latitudes/longitudes. Google API doesnt allow storing anything else but place IDs so I have to find something else that can autocomplete/suggest places on UI and allow storing it my database.
Does anyone know such a good service?
You can simply add your points in your DB based on each point Lat & Long values. So when user is searching somewhere you have his current location(Lat-Long), Therefore you can search in your DB and get the distance of each saved point with current location and retrieve the results you want to show (i.e in JSON format).
In client-side use some auto-complete jquery library to show the nearby places and somethings like that (with additional information).
Google Map API has a service that you can show some custom marker on the map with your custom configuration like marker icon, description and etc. You can show your additional information in description as HTML format.
You can see some example here:
Customizing a Google Map: Custom Markers
Hope these tips would be helpfull. Regards.
Suddenly I've found an answer that helps me:
https://productforums.google.com/forum/#!topic/maps/hNc1OOU6Zm8
So I can use some Google's data under some conditions.

Facebook graph API explorer query not extracting all columns

I am a newbie to this Graph API Explorer, which, I found today, is something that lets me extract data from FB. This is really cool!
I was trying to extract user demographic information using the Graph API explorer from a group with about 2300 members that I own, however for some reason the query is not extracting anything other than name and id as you can see from the screen.
Experts, why is this happening? I believe I have ticked all relevant permission tick boxes to be able to perform this query.
Thanks in advance.

Google or Bing maps API - creating and using your own map

What I need is the following.
Whenever I add any instance of object in my website, I need the server to add the location of the object to my own map either in Google maps or Bing maps (Bing maps docs are more clear therefore I'm going to use Bing).
Later, whenever I view the object in my site, the map should point to the location of the object and other my map objects in the same map.
How can this be achieved? Do I need to hold all the coordinates and object descriptions in my server, or somehow it is saved in the google or bing.
I went through the docs, but couldn't find any information I need.
You need to store them on your server and load them into the map on your webpage. There are ways with both google (fusion tables) and bing (spatial data services) of storing them with the provider but if you are already storing a copy for your website you are better off keeping them there for the map rather than maintaining two copies.
I'm not sure how technical you are but this best architecture approach is this:
1) Write a database query that finds objects to show on your map, ideally filtered by whatever the user can use to filter objects elsewhere on your site. Add to this query a filter by geographical bounding box (the range of latitude and longitude that can be seen on your map at any one point). The bounding box filter is just a simple sql BETWEEN clause but will mean you dont have to load every single object on to the map.
2) write a "webservice" that uses the database query in 1) and turns the results into JSON. This approach will lead to a much cleaner seperation between your mapping code in javascript and your server side code in the webservice.
3) Write your mapping frontend in Bing using javascript and use something like Jquery to read data from the webservice as the map is moved around re-load data that know should be shown on the new map view. As the data will be in JSON its much easier as JSON will just give you javascript versions of your objects

Hiding google map data

I've been working on a google map (v3 of the api) that is plotting 120 markers or so (or will do shortly). If you view the source the map data is for all the see, is it possible to hide this?
I'm not worried about the code that is generating the map, just the data. The data is grabbed from a Wordpress cms.
I think your options mostly boil down to:
Obfuscate the data. Restructure it in such a way that it is difficult to recognize as location data, and inconvenient for other people to work with.
Don't include the data directly in the page body. Fetch it using an AJAX request instead. Determined users will still be able to get the data, but it won't be quite as easy/obvious, and it will not appear when doing a 'view source'.
You could of course combine the two approaches, and have an AJAX request that returns obfuscated data.
Although, your data appears to be names and locations of businesses, so I'm not sure why protecting it is a concern. Presumably any interested party could find the same information in a phone-book (or with a Google search) if they were so inclined.

Google maps. Coordinate parser by titles

I think it's common task.
I have about 2400 raws in database with titles of skiing resorts. I have to parse coordimate of point in search results of each raw. Sometimes, result has more than one point, how can i occurate results?
Suggest best algorytm for this task. May be Google Maps API has some helpfull methods for this task.
I think you can consider about JQuery to send a async request to the the server, the server responses for retrieving the data. After retrieving your rows of data, you can build these position with JSON which likes this [{x:1,y:1},{x:2,y:2}]; it means two rows of data. When the server method runs completely, the client side raises a callback which can access result JSON; the JSON can be manually parsed by you to the LatLng object in Google API right. I think you know the rest stuffs.
Hope it helps.