3

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 image 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.

3
  • 3
    @Aaron : frankly, what use are these kind of comment ? I'm all in favour of being funny sometimes on SO, but just saying "your language is crap" doesn't add much to the topic. Commented Dec 2, 2010 at 15:57
  • @Valentin I didn't say the language was crap (IMHO it's the wrong language for the job at hand). If you would like me to elaborate on the comment I can...but it was a comment, not an answer. I knew the Java elite would come out in full force from the comment...hence the ducking... Commented Dec 2, 2010 at 16:05
  • @willcodejavaforfood: Thanks, that's along the lines of what I'm looking for. Do you know if it would be possible to rotate the background further down the line? Commented Dec 2, 2010 at 16:23

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Just as a comment to your comment above, Piccolo also support rotation.
2

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.