Dynamic map/image showing property rental availability

I’m working on a rails app for a campground that rents cabins and
tenting spots. I’d like to show a map or image of their property with
cabin icons or boxes or something that change color based on whether or
not they’re rented.

Does anyone know how to do anything like this? Or even what to search
for to find out more information about this type of thing? I tried
‘dynamic maps’, but I’m just getting Google map mashup stuff.

Please help!

It sounds really awesome. I too am working on a project with features
such as this. I’m not sure what the BEST approach would be but if I
were going to take on something like this I would probably take the
map or image and slice it into smaller images. A database driven
system would be awesome. However I’m not sure what the best approach
would be via ror. I’m interested in this too. Keep in touch.

Ed

On Jun 2, 2:32 pm, Denise R. [email protected]

How about Layers on top of a map indicating the locations of rentals?

On Jun 2, 2:32 pm, Denise R. [email protected]

I’m interested in this too. I’m sure it involves some database
connectivity and a sliced up image. Let me know what you come up
with.

Ed

On Jun 2, 2:32 pm, Denise R. [email protected]

Denise R. wrote:

I’m working on a rails app for a campground that rents cabins and
tenting spots. I’d like to show a map or image of their property with
cabin icons or boxes or something that change color based on whether or
not they’re rented.

Does anyone know how to do anything like this? Or even what to search
for to find out more information about this type of thing? I tried
‘dynamic maps’, but I’m just getting Google map mashup stuff.

Please help!

Use a flat image of their campground as the background image of the main
content div on the page. Then place images of cabins on top of that,
using CSS to position them correctly on the map. The image you display
will be either the “not rented” image or the “rented image” depending on
the data you feed it. You could wrap the images in tags to make them
clickable to some page of information.

Just off the top of my head, I’m no css expert, but I think something
along the lines of …

views
campground.html.erb

<%= render :partial => 'cabin_image', :collection => @cabins %>

_cabin_image.html.erb
<%= cabin_image.rented? ? image_tag(“cabin-rented”, :class =>
“cabin#{cabin_image_counter}”) : image_tag(“cabin-not-rented”, :class =>
“cabin#{cabin_image_counter}”) %>

controller should populate @cabins

cabin model should have
def rented?
blah
end

css stylesheet should have
div#campground {
position: relative;
background-image: url(‘images/campground_map’);
}

img.cabin1 {
position: absolute;
top: blah;
left: blah;
}

img.cabin2 {
position: absolute;
top: blah;
left: blah;
}

That was very helpful! In my situation I’m probably going to be using
a state map with counties and a pop up layer as you hover the county.
This was my thinking with it as well. What do you think for my
application?

On Jun 2, 5:36 pm, Cayce B. [email protected]

Eddie S. wrote:

That was very helpful! In my situation I’m probably going to be using
a state map with counties and a pop up layer as you hover the county.
This was my thinking with it as well. What do you think for my
application?

On Jun 2, 5:36�pm, Cayce B. [email protected]

Everything in CSS is a block so county maps with irregular shapes become
a bit more difficult. You could use image maps
(http://www.wickham43.supanet.com/tutorial/imagemaps.html) to get it
just perfect, but what a load of work that is gonna be (mapping out all
the coords).

Instead, personally, I would go for a small hoverable icon or text link
in the middle of each county and when the user hovers that a nice AJAX-y
popup comes up in the shape of the county or something with add’l info.
Just a personal preference but I avoid imagemaps unless I absolutely
have to use them.

Eddie,
You might want to look at google maps for that. I’ve heard that you can
do a lot of groovy things with the api, but it didn’t really apply to my
issue.

Cayce,
Thanks so much for the specifics. This is a completely new puzzle for
me. The details in your post will help a lot.

Denise

Why are you averse to using google maps (look for the ym4r plugin)?

  1. You get accurate maps, directions, your clients can search for
    restaurants and other stuff near the campsites, etc. Basically you
    get a ton of features for free.
  2. Use different colored pins and icons to indicate taken/available
    campsites.
  3. You get little pop-up dialogs with more information about each site
    that you can control.

You can even mark hiking trails, all kinds of stuff.

Definitely not adverse, but I don’t think it will work for this case.
This is a single camground - not multiple locations. It’s one big
wooded area out in the middle of nowhere. One address separated into
lots of individual slices by the owners.

Am I wrong? Would google maps still be a good solution?

While it may workfor what I am looking to do (a directory of an entire
state and all counties), it probably wouldn’t work for Denises
application. I am envisioning something like the Disney World iPhone
web app for this situation…
http://www.wdwpinpoint.com/iphone/mk/index.jsp

On Jun 3, 10:44 am, Denise R. [email protected]

I created something similar (not online now) to show exhibit booths for
a
conference floor plan.

The original map was created in Illustrator with each booth as an image
map
area. The resulting html was used to create the left, top, height, and
width
(this is not exactly how it came out of illustrator). Most booths were
squares.

There was a special layout template that had a background image of the
map
with all the booths removed.

The code below drew a block over each booth with a colored div. I am
sure it
could be done cleaner but this did work in Firefox (not cross browser
tested).

<% for booth in @booths %>

<%end%>

Sunny

On Tue, Jun 3, 2008 at 11:55 AM, Eddie S. [email protected]

Are any of your examples online to view? Thanks, Eddie

Denise R. wrote:

Definitely not adverse, but I don’t think it will work for this case.
This is a single camground - not multiple locations. It’s one big
wooded area out in the middle of nowhere. One address separated into
lots of individual slices by the owners.

Am I wrong? Would google maps still be a good solution?

No I think you’re right on for your app - Google maps not really
applicable.