Creating analytics map similar to Google Analytics - javascript

I'm building an admin panel here at work and recording some ip data from users who are downloading our itunes mp3's. We have the ip and location of the user, but I'd like some way of displaying that visually. Is there any jquery plugin or addon that would allow me to display the stats I collected visually on a map similar to the way Google Analytics does it?

Have you tried the Google Chart Tools api (https://developers.google.com/chart/) ?
There is a geo chart which I think is exactly what you are talking about.
https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart
https://code.google.com/apis/ajax/playground/?type=visualization#geo_chart

jVectorMap could also be suitable here.

Related

Converting iFrame Business Maps to Javascript API maps for dark mode

I have always worked very effortlessly with Google Maps and their iFrame which displays the business on the webpage with their information, like this.
How is this possible with the javascript API? I have succesfully made a dark map with that, but I want to display the business also. Do I have to use another API for that?
I dont believe this is possible using only the google maps api. You could use the Google Places api https://developers.google.com/maps/documentation/javascript/places#place_details.
Then you would need to create your own display for the information. I dont think there is any way to get this kind of functionality right out of the gate.

Autosetting search terms when implementing google maps in website (javascript)

I'm using google maps to geolocate users on my website. After that I would need to find different services near them (I would like to have ability for webpage to input search term in google maps with geolocaion) Is this possible? and if it is how could I do it?
You can use following example for searching places.
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&type=restaurant&name=cruise&key=YOUR-API-KEY-GOES-HERE
You have to create project in google console using below link
https://console.developers.google.com
Then create browser key and that key is which you have to use in above url which mention.
Last thing you need to enable Google Places API Web Service from https://console.developers.google.com
See below link for more detailed document.
https://developers.google.com/places/web-service/search#PlaceSearchRequests
Let me know if any issue you faced.

Use the standard google maps interface on embedded maps / google maps API

This surely sounds like a silly question in my head, but I want to put it out there nonetheless just to make sure I haven't missed anything.
I've got a page on my website that has a google map (currently 'embedded' through the google maps api v3).
While I'm perfectly capable of interacting with that map through a custom form (and the google map api):
an input box to set starting point
an input box to set endpoint
a dropdown list for transportation modes
I was wondering if it was possible (in comes the silliness) to use google's own interface for this (cause users are used to this).
Abstracting my question: Is there a way to "bring in" Google Maps' own UI on an embedded map and do some calculations on my own page, based on the routes (/modes of transportations, etc) that are being selected in that UI.
My guess: no. The google maps UI is something that can only show up on maps embedded with an iFrame (so only on maps.google.com) and no interaction with it is possible, at least not in a kosher way.
There is the direction API which you can use to obtain responses (JSON or XML) regarding useful information such as distance, start coordinate, travel mode, etc. You can interact with the response to obtain what is needed for your web page.
I have posted a link for the direction API. Hope this can help.
Direction API

Is there any way for javascript to plot kml or gpx data?

Let's say I have a site where local users can upload their favorite hikes to share. But some users don't have the ability to get gpx or kml data.
Are there any open source options for the users to plot their own hikes, like in a google maps window?
If not, what would be the best way to go about doing this, if any?
Thanks for your time.
You can use the Drawing Tools in the Google Maps Javascript API v3 to plot the hike, then convert that data to KML or gpx.
proof of concept built from a previous version of blitz-gmap-editor, there were some changes made to it since I took that snapshot.

Get iPhone location data into a Google Maps

I am looking to develop a feature for a browser app I am developing. I was hoping to get any advice on this topic:
A user walks around with their iphone.
During this time location data is recorded of their walk
This data can then be exported to Google Maps and I can see the route overlaid on a Google Map in my browser.
Is this possible? Where would I start and how would the data be recorded?
Yes, this is possible (assuming you want to use Javascript as it is tagged to your question).
Getting the location data on an iPhone is possible, see this question. You can use the Google Maps API to display a map and draw the recorded path on it. I would rather display the walked route direct in your app rather than exporting/importing coordinates of the recorded route.
Before implementing the App, I would take a look on both Google Maps API and OpenStreemMap API to find out which you like more and fits your needs best. Playing with some examples before implementing your app might be a good point to start with.

Categories

Resources