Display address on map on my page - javascript

If I have an address string (New Jersey, Hoboken), what is the simplest way to display the address(simple address) on map in my page?(no preference for the source of the map).

If you are less familiar with how to setup a Google Maps embed on your website this site will help you generate the appropriate code:
http://www.trivoo.net/google-maps/
If you are more familiar with HTML/JS you could go the more involved route of using Google Maps JavaScript API found here.
https://developers.google.com/maps/documentation/javascript/
They have great documentation there on how to set it up.

The simplest way would be to use Google My Maps, you can enter an address and Google will generate some code you can embed on your page.

Related

Using Gmaps.js with a search field

Is there a way to use a search field to seek addresses on the Gmaps.js library?
Also, can I get the coordinates from this address to save on my database?
I followed the Google Maps V3 API and managed to get this result, but I'm wondering if through this javascrips library is also possible. Cheers
Yes you can. For a live example, please see link.

Charting lib open or commerical

Anyone have advice on how to get a control to do something like this
http://screencast.com/t/VyHdxOdRJQwY
I will be plotting based on city or zip so i need to maintain some geo aspects but in the end the chart control needs to look like this guy.
Ideally no flash... but interested to see if anyone has hit something like this.
open or commercial source, im game
d3 seems to be a pretty good library for data visualization.
Check out the examples here: https://github.com/mbostock/d3/wiki/Gallery
Here's an implementation similar to what you are looking for. http://trends.truliablog.com/vis/metro-movers/
I suggest you check out the Google Maps API. There are two versions of the API:
Static Maps API V2 - from the docs:
The Google Static Maps API lets you embed a Google Maps image on your
web page without requiring JavaScript or any dynamic page loading. The
Google Static Map service creates your map based on URL parameters
sent through a standard HTTP request and returns the map as an image
you can display on your web page.
There are Usage Limits: The free version has a query limit of 1000 unique (different) image requests per viewer per day, if that will work for your situation. There is a licensed option above that with associated licensing fees.
Google Maps JavaScript API v3 - from the docs:
The Google Maps Javascript API lets you embed Google Maps in your own
web pages. Version 3 of this API is especially designed to be faster
and more applicable to mobile devices, as well as traditional desktop
browser applications. The API provides a number of utilities for
manipulating maps (just like on the http://maps.google.com web page)
and adding content to the map through a variety of services, allowing
you to create robust maps applications on your website.
There are similar usage limits for this version, also with a licensed option above the free version.
The API could easily create a map to match the one at your link. These aren't an exact match, but here are some examples from the Google Maps Demo Gallery:
We ended up using http://www.mapdotnet.com/ with background from open maps. Custom middle cache tiles from shape files stored in SQL, on top we have open street layer (or can use bing)

Finding driving directions using Google Maps JavaScript API V3

Here is the scenario that i want take two addresses dynamically from user, consider one of them as source and other as destination and find driving directions between source and destination.
i googled and got some stuffs not familiar to me..such as writing script using Google Maps JavaScript API V3, and the direction out put will be in json or xml format...i have tried google.map.directionrenrender and directionservice api's in my code but it is saying no such classes in google.map..as i am new to scripting language i am not understanding how to start ....i am using eclipse ide, where i want to build an android app that takes addresses and gives driving directions between those two points..
i want the program almost similar to this Google map driving direction source code for their example? but here they have used some html code and why that is actually required..?
please help me in writing the code
Thanks in advance
To open up Google Maps with directions, start a new Intent using a URL like this:
http://maps.google.com/maps?saddr=%s&daddr=%s
Replace each %s with a string like "x,y" where x and y specify the latitude and longitude. If you want directions from the current location, leave the saddre parameter blank.
This won't work on phones that don't have Google Maps installed, and in those cases will open the browser.

How to embed or recreate a Google Analytics Graph in a custom CMS

I would like to know how to create a graph with Google Analytics (maybe using the api), but I'm unsure if there is already a plugin or tutorial on how to do this. The Javascript API reference at Google.com sucks.
Also any reference to how to create a line graph (canvas element?) would be great too.
Thanks!
I learned to use the Google Visualization API (the one used by analytics, and the one I believe you refer to) from the examples at https://developers.google.com/chart/interactive/docs and found it quite clear.
You can use examples of different graphs from the Gallery as well: http://code.google.com/apis/visualization/documentation/gallery.html
I created a service specifically for this purpose:
EmbeddedAnalytics
You define your chart type (line, bar, horizontal bar), metrics (pageviews, visits, etc), dimension (date, country,etc), and a time frame. Then you simply embed a snippet of code into your site where you want the chart to appear.
Google now has an article specifically on this topic.
https://developers.google.com/analytics/resources/articles/gdataAnalyticsCharts
Try this:
Google Analytics Easy Dashboard Javascript Library
An easy way to build a custom Google Analytics Dashboard on your own page.
http://analytics-api-samples.googlecode.com/svn/trunk/src/reporting/javascript/ez-ga-dash/docs/user-documentation.html#register
Demo: http://analytics-api-samples.googlecode.com/svn/trunk/src/reporting/javascript/ez-ga-dash/demos/set-demo.html
Here is step-by-step guide how to embed Google Analytics chart into a webpage as interactive widget: http://explainum.blogspot.com/2011/04/how-to-add-google-analytics-chart-to.html
EDIT (5/15/2012): The link above goes to a blog post on Explainum -- 3rd party web-service which allows creating embeddable charts from various data sources including (and most popular) Google Analytics.
Connection to GA is made using OAuth. You will need to know your GA profile ID in order to connect. Data is updated every 2-24 hours. The service is free.
DISCLAIMER: I'm one of Explainum's creators.

How to show Google Local business marker and InfoWindow in custom Google Map?

I want to show the location of my business on my website using google maps. Instead of creating the marker, infowindow, etc... by hand, I would like to reuse the one found in Google Local business listings.
For instance, this business could use this map. The advantages are numerous : it is already done, it will be updated when you update the listing, it has directions, etc...
Does anybody know how to do that using the JavaScript API (v3) ? I could obviously use the iframe code they provide, but I would love having a bit more control on the result, especially the controls.
You can't. You can either use the embed as is, or build a custom map using the JavaScript API.

Categories