Latest News: (loading..)
Jack_mcs

EasyMap

151 posts in this topic

This contribution adds a map to your shop via google's map API. The default settings show how lines can be drawn on the map to provide driving instrucitons. This would be limited to a local ara but may be useful to some people. It also has a Satellite display that is quite impressive.

 

I will upload it shortly so the support thread is included.

 

Jack

Share this post


Link to post
Share on other sites

Here is the contribution, I forgot to mention that to use this, you will need to get an API key from google. It is a simple process and just takes a few minutes.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack, do you have this running on your site? If so could I get your URL, or do you know that URL of a site that is running this? I'd like to see what it looks like and does before taking the time to intall.

 

Thanks!

Share this post


Link to post
Share on other sites

You can see samples here . I do my testing in FireFox so I didn't notice that this doesn't work in IE. It is because of a javascript problem in IE and there is a fix for it. I should have that uploaded today. So, to anyone who has downloaded it, please keep that in mind.

 

Jack

Edited by Jack_mcs

Share this post


Link to post
Share on other sites

Looks very nice, Jack!

 

-jared

Share this post


Link to post
Share on other sites

Thanks for Easymap. It is working well except for a conflict with On the Fly Thumbnailer:

Division by Zero error in On the Fly Thumbnailer module at line 83 of html_outputp.php (see at the bottom of pasted code)

Any ideas on how to exclude Google maps from the thumbnailer process, or other possible fixes?

 

 

// "On the Fly Thumbnailer" using PHP GD Graphics Library by Nathan Welch (v1.5)

// Scales product images dynamically, resulting in smaller file sizes, and keeps

// proper image ratio. Used in conjunction with product_thumb.php t/n generator.

function tep_image($src, $alt = '', $width = '', $height = '', $params = '') {

 

// Set default image variable and code

$image = '<img src="' . $src . '"';

 

// Don't calculate if the image is set to a "%" width

if (strstr($width,'%') == false || strstr($height,'%') == false) {

$dont_calculate = 0;

} else {

$dont_calculate = 1;

}

 

// Do we calculate the image size?

if (CONFIG_CALCULATE_IMAGE_SIZE && !$dont_calculate) {

 

// Get the image's information

if ($image_size = @getimagesize($src)) {

 

$ratio = $image_size[1] / $image_size[0];

 

// Set the width and height to the proper ratio

if (!$width && $height) {

$ratio = $height / $image_size[1];

$width = intval($image_size[0] * $ratio);

} elseif ($width && !$height) {

$ratio = $width / $image_size[0];

$height = intval($image_size[1] * $ratio);

} elseif (!$width && !$height) {

$width = $image_size[0];

$height = $image_size[1];

}

 

// Scale the image if larger than the set width or height

if ($image_size[0] > $width || $image_size[1] > $height) {

[Line 83] $rx = $image_size[0] / $width;

Share this post


Link to post
Share on other sites

I don't use that contribution so I can't say for sure. You could try tessting to see if the page being displayed is the map page and if it is, just retrun from the function. I would have to look at the code to see what effect that would have. You would probably get a betteer answer by asking in the support thread for that contribution.

 

Jack

Share this post


Link to post
Share on other sites

is there a way of adding store lpgo to the text in the info window that opens on top of the maker

Share this post


Link to post
Share on other sites

Google has a way of doing it but that method isn't included in the contribution. I will look into adding it at some point.

 

Jack

Share this post


Link to post
Share on other sites
Google has a way of doing it but that method isn't included in the contribution. I will look into adding it at some point.

 

Jack

 

 

Jack,

 

For some reason, STS kills the map. I have tried posting the java in an external file and requiring its inclusion in the easymap.php file, but STS is still keeping it from loading. I disable STS and it works.

 

Any ideas?

 

Thanks,

 

Nick

Share this post


Link to post
Share on other sites

I have entered the new long & lat coordinates via admin yet it still outputs the default Palo Alto map instead of my location, is there another place I am supposed to place the coordinates?

Share this post


Link to post
Share on other sites

Changing those works for me. What happens if you try to move the map? Does it switch to the proper location?

 

Jack

Share this post


Link to post
Share on other sites
What happens if you try to move the map? Does it switch to the proper location?

 

Jack,

 

 

When I move the map it doesn't switch to the proper location but remains with the default Palo Alto as if the new corrdinates did not take, howver when I take a look in admin the new lat & long are there and they also show up on the easpmap.php page. I am using the latest EasyMaps update release, perhpas I did something wrong or it is in conflict with another contribution I have installed.

 

On another note, is there an easy way to show maps & directions to two different locations?

 

Joe

Share this post


Link to post
Share on other sites
Jack,

When I move the map it doesn't switch to the proper location but remains with the default Palo Alto as if the new corrdinates did not take, howver when I take a look in admin the new lat & long are there and they also show up on the easpmap.php page. I am using the latest EasyMaps update release, perhpas I did something wrong or it is in conflict with another contribution I have installed.

 

On another note, is there an easy way to show maps & directions to two different locations?

 

Joe

The version I uploaded works. I haven't looked at the latest upload. Hopefully the person that did that will support it.

 

Jack

Share this post


Link to post
Share on other sites

Here's something for you hackers to figure out. For every customer in the database, I would like to add the latitude and longitude of their city and use Google Maps to show where all my customers are. I have sold all over the world on eBay (about 1500 customers) and want to map them on my soon-to-be osCommerce site. It would add legitimacy to the site.

Share this post


Link to post
Share on other sites

You would first have to edit your customers table to store their longitude and lattitude, or use some sort of look up code to find it. Then call in that information for the customer on the EasyMap page and use those coordinates instead of the ones from the database. So, yes, it is doable but the majority of code would have to do with coming up with the coordinates in the first place.

 

Jack

Share this post


Link to post
Share on other sites

Does anyone have an example of a working osc website that has this contribution installed?

Share this post


Link to post
Share on other sites
You would first have to edit your customers table to store their longitude and lattitude, or use some sort of look up code to find it. Then call in that information for the customer on the EasyMap page and use those coordinates instead of the ones from the database. So, yes, it is doable but the majority of code would have to do with coming up with the coordinates in the first place.

 

Jack

 

Looks like I may be able to get the info online from the census bureau for each zip code.

Share this post


Link to post
Share on other sites
Does anyone have an example of a working osc website that has this contribution installed?
Please take a look at a few posts back.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack--so is the one pnkranger uploaded ok or is the last one you uploaded the one to use? I would rather use one I know works from the get go.

Edited by rabbitseffort

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now