aspose file tools*
The moose likes General Computing and the fly likes put custom map in website Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "put custom map in website" Watch "put custom map in website" New topic
Author

put custom map in website

anirudhh devmurari
Greenhorn

Joined: Jul 28, 2012
Posts: 9
I am making web app. on "transportation portal" ..in which I need to display map based on searching buses in different areas...and route must be highlighted based on searched places...I don't know how to do it...Please give some idea that I can implement this feature in my website.(I think this is possible using swing so, I have posted this here)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39544
    
  27
Swing implies having an applet on your web page - are you sure that's the route that you want to go? Google Maps or Bing Maps can do everything you described without resorting to Java; check out their respective web sites that have plenty of documentation and example code to get you started.


Ping & DNS - updated with new look and Ping home screen widget
anirudhh devmurari
Greenhorn

Joined: Jul 28, 2012
Posts: 9
If vehicles are gps enabled then how to track them on google map ? Can you advice what to search on google for this?(Actually in my website there is realtime tracking and estimated time arriving is available) is google map provide this type of realtime tracking?
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4522
    
    5

Since this is no longer about Swing/AWT/SWT, I'm moving it to 'Other Languages' where it may get better responses.


luck, db
There are no new questions, but there may be new answers.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39544
    
  27
What does "GPS enabled" mean? Just because a vehicle has a GPS on board does not mean that it can be tracked. The GPS data must be uploaded to some central location for that. A smartphone app would be able to do that in conjunction with a server that can receive and process the data.

Google Maps is a mapping tool - it shows the data you feed into it. A I said, it has extensive documentation online.
anirudhh devmurari
Greenhorn

Joined: Jul 28, 2012
Posts: 9
our transport service has all vehicles are gps enabled means all the buses are tracked by a desktop application, now we wants to provide this facility of tracking buses to city users...so that they can estimate time for bus arriving..now question is that can we use the gps services to get coordinates of buses?no idea how to do it , I wants your suggestion ....
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39544
    
  27
You already have some way of getting the GPS coordinates into the desktop app, correct? So now it's a matter of getting them onto some server that can host a web app that shows whatever maps and data you want to show.

What do you have so far, and where are you stuck making progress?
anirudhh devmurari
Greenhorn

Joined: Jul 28, 2012
Posts: 9
Actually our local gov. transport service had allowed us to upgrade their website....and before that they had show us their system , how they are keep watching on buses! for that they are using gps system..now we are thinking to use the same thing in our site...is it possible? or if it is then what to do first?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39544
    
  27
Obviously it's possible - the transport service does it, no? I would imagine that the trickiest part is to acquire location data from a vehicle. Have you thought about that at all? Which cars/drivers will agree to make that available to you, and how?

(I'm moving this to the "General Computing" forum, as it's not about programming languages at all.)
anirudhh devmurari
Greenhorn

Joined: Jul 28, 2012
Posts: 9
Yes they give us promise to give all available resources to us...but we don't know how to do it and from where to start ? please guide us!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39544
    
  27
I suggest to break it down into little tasks that you do know how to do, like a) acquire GPS data in vehicle, b) upload GPS data to server, c) process data into a format suitable for display with Google/Bing maps, d) create a web page containing a map with said data, e) make sure it scales to whatever data volumes and visitor numbers you need to handle. If that still seems unsurmountable, break each step down further still. Start not by writing code, but by designing the overall system and its constituent parts. If you struggle with that, maybe consult someone more experienced - it does not sound like a particularly hard project assuming you can get at the data.
anirudhh devmurari
Greenhorn

Joined: Jul 28, 2012
Posts: 9
Ok...I get it...I will put query after getting some more research on this topic....Thanks for such a nice advises....
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1476
    
  11

If you want to find out more about how other cities do this, Portland (Oregon, USA) was one the first cities to implement their own live transit tracking system, using open source GIS tools.

You need to collect live location data from the buses, but you also need street mapping data for your city and the routes for each bus, all with compatible coordinates etc. How does this data get transferred around, how much of it is fairly static and how much needs to be updated very few minutes, and what format(s) is/are appropriate?

You probably want to avoid querying everything all the time for every user who connects to your site, so you'll need to think about how you deliver the data to your users and how you filter the data e.g. by route or visible map area, which data to cache (e.g. routes, neighbouring map tiles?), how to cluster points in your display e.g. if I zoom right out on the map and query all the buses in your city, how many points do you display? etc etc.

Also, if this is going to be a public website, you need to make sure your map interface is easy for them to use (mobile is pretty much mandatory for this kind of thing), either by designing the interface carefully or by using a common mapping interface like Google Maps, and you want to make sure it's pretty accurate or people will give up using it pretty quickly.

Of course, one option might be not to re-implement this particular wheel yourself, but to become a Google Transit Partner:

How does it work?
At this time, Live Transit Updates provide 2 types of real-time updates to users: live departure times and service alerts. These updates should be provided in feeds by transit partners. We created the GTFS-realtime feed format that complements the widely used GTFS format for static transit schedules. Your feed needs to be available on a location where we can fetch it periodically. The updates in the feed will be immediately processed as Live Transit Updates information.

Once the data is available to Google Maps, it should be easy enough to integrate a Google Map in your application to display the live transit data.


No more Blub for me, thank you, Vicar.
anirudhh devmurari
Greenhorn

Joined: Jul 28, 2012
Posts: 9
Thanks for the wonderful answer...Link you provide will speed up our work....If the problem arise I will post here....Thanks again
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1476
    
  11

Just one more thought: You should think carefully about how much effort is really needed to implement all the required functionality for your map interface, if you want it to be easy to use. The costs for developing and maintaining your own user-friendly map interface might be a lot more than you think, especially if you don't have any in-house experience of web mapping e.g. with open source GIS tools. You will have to put a lot of work in to create something as flexible and easy to use as Google Maps, for example.

On the other hand, you would also need to get some real figures on how much it would cost to use Google Transit and Google Maps for your application.

If you are going to use Google Maps as your web map (with/without the feeds via Google Transit), then you or your clients may need to register as a Google Maps business user (currently costs $10,000 per year, I think), because there are restrictions on how you use Google Maps for the free licence. For example, Google's licence terms for using the free Google Maps API say that "Your Maps API Implementation must be generally accessible to users without charge and must not require a fee-based subscription or other fee-based restricted access".

Check the Google Maps API Licensing and the Google Maps for business FAQs.

According to the Google Transit FAQs, "Joining Google Transit is free as in free beer" i.e. you would not have to pay extra to use Google Transit for your application, but you should definitely confirm this with Google.
anirudhh devmurari
Greenhorn

Joined: Jul 28, 2012
Posts: 9
You mean to say we have to pay $10,000 per year for using Google transit in our website !! Is there any other way to do it ?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18115
    
    8

anirudhh devmurari wrote:You mean to say we have to pay $10,000 per year for using Google transit in our website !! Is there any other way to do it ?


No, that obviously wasn't what he meant. It wasn't even what he said. Re-read the whole post. And this time don't pick out some things and ignore other things. Read the whole thing.
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1476
    
  11

anirudhh devmurari wrote:You mean to say we have to pay $10,000 per year for using Google transit in our website !!

No. Google's rules say you can use their Maps API for free under certain conditions e.g. your application must be freely available to users. Check the rules to see if you would qualify. Also, Google say that you can register for Google Transit for free in any case. So if your web map is going to be free to use, then it looks like you would not have to pay Google anything (but check the rules for yourself).

But if you charge users to use your application or if it's behind a paywall, then you do not qualify for the free Maps API licence, so you (or your clients) will have to sign up for a business licence. That seems fair: you are using software that Google has invested a lot of time and money in developing and using their mapping infrastructure (map data, servers, APIs etc) to make money for yourself, and you are not going to give your own software away for free, are you?

anirudhh devmurari wrote:Is there any other way to do it?

Yes, you can invest your own time and money in developing (and maintaining) a public transport web mapping application e.g. using open source tools and your own mapping data (street grids, base maps etc), but you should calculate the costs of doing this, so you can decide which is the better option for you and your clients.
kaushik vasani
Greenhorn

Joined: Jul 24, 2012
Posts: 7

Found this one very interesting
anirudhh devmurari
Greenhorn

Joined: Jul 28, 2012
Posts: 9
ok..I will put query after reading full documentation of how to use google transit api....Thanks for help....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: put custom map in website
 
Similar Threads
resources for parrallel java
Googlism!
Dave Vick...The search for funding is under way
Netaps (I) Pvt. Ltd., Pune, India
Part II- package structure