Creating a simple map program in java
What is the best way to go about making a simple map program? I'm trying to get a background image that will have an overlay so that when the user clicks on the desired area on the map, they're actually clicking the overlay (buttons on select areas). The background image is rather large, and I can't seem to get my head around how I should go about panning the imag开发者_开发知识库e and have the overlay update as well. In short, I'm trying to make a very simple program similar to google maps, but no zoom as of right now.
I've used Piccolo in the past for similar projects. You say you don't need zooming, but when it pops up as a requirement you'll be glad you have the capability! Piccolo has panning and zooming built in.
I would avoid trying to create your own component, and it can easily become a tangled mess as code creep occurs.
If you don't want to reinvent the wheel (which I would suggest you don't), try integrating Google Maps in your application. The Google Maps API is available.
Alternatively, a quick Google Search showed GeoTools. My recommendation is to find a library that apply the OpenGIS format.
精彩评论