wheeloftime Posted June 17, 2006 Share Posted June 17, 2006 I haven't tried the one he uploaded so I can't say either way. Jack I just did and the version which works is 1.1 from Jack. The the 2.2 version is, sorry to say, pretty messed up (the right column dissapears, there are non-default css classes used wich are not with the installation instructions and ..I didn't look/try any further). Maybe 2.1 works but I haven't bothered to try that one. The only thing I changed in Jacks version is (change v=1 to v=2 and replacing the key) <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAQ0TDPKrx6z1NemzAhlXYOBRUe8DPUYDAMEqax7Lj8284ASqs7xRNt2NEAP0NMc1l teeav05-Dt7Uew" type="text/javascript"></script> I did load the 2.2 SQL though but the newer stuff is not used with the 1.1 version. Looks very nice though ! Quote Link to comment Share on other sites More sharing options...
kbking Posted October 10, 2006 Share Posted October 10, 2006 I tried to add EasyMap version 1.1. I can see that it works fine, but the map isn't in the 500px x 400px area as it should be. Instead it shows up in the column left. I cant figure why it appears that much off. Quote Link to comment Share on other sites More sharing options...
kbking Posted October 10, 2006 Share Posted October 10, 2006 Sorted it. I had another contrib that had the same div id. Quote Link to comment Share on other sites More sharing options...
Antonimo Posted October 11, 2006 Share Posted October 11, 2006 STSv4_2 and EasyMap It could just be me being a ittle confused, but in order to get EasyMap to work with STSv4_2 I used trial and error. Here are my notes for anyone else who needs - if there are any major flaws in this technique, please let me know. Having installed EasyMap as per the installation instructions, I created the file "easymap.php.html". I saved "easymap.php.html" into the directory catalog/includes/sts_templates/test/ beacuase this is where I have the Default Template that I configured in the Admin section. I then created a copy of the Default Template I'm using and added the lines mentioned in the install instructions FIND: <html> AND REPLACE WITH: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> FIND <body AND ADD AFTER "body" but before any other variables (i.e, bgcolor, topmargin, etc.): onLoad="load()" onUnload="GUnload()" This has worked for me Quote Link to comment Share on other sites More sharing options...
sitandspin Posted November 26, 2006 Share Posted November 26, 2006 Has anyone figured out how to use this with Google's geocoder in their API documentation? I'm looking for a nicer way of putting the address into the map. Quote Link to comment Share on other sites More sharing options...
sonixtwo Posted January 10, 2007 Share Posted January 10, 2007 When I am creating the database tables, I get the following error: INSERT INTO configuration_group VALUES ( '30', 'EasyMap', 'EasyMap - configuration options', '30', '1' ); MySQL said: Documentation #1062 - Duplicate entry '30' for key 1 I'm guessing the format must be wrong. How can I fix this? Thanks -Mike Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 10, 2007 Author Share Posted January 10, 2007 The 30 in that error is referring to the configuration_group ID. It failed because there was already an entry in the database using that. You need to edit the sql file and change the '30' entries to something else. If you are comfotable going into phpmyadmin, you can see what the next number can be. But it doesn't matter since it is only used internally. If you change it to something higher, like 40 or 99, it should work. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
adamfalletta Posted January 10, 2007 Share Posted January 10, 2007 Hello Jack - Can you please answer a few questions I have. How can I enable your map system for a real estate web site. An example can be found here at http://www.vivending.es/. When you click a listing it shows the link MAP. When clicked it shows the homes location within a pop up. Is this your contribution or a different one. Your feedback in deeply valued. Thank you - Adam - Brooklyn NY Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 11, 2007 Author Share Posted January 11, 2007 No, that's not the google sitemap. I will PM you a link to the one my version of the contribution provides. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
sonixtwo Posted January 12, 2007 Share Posted January 12, 2007 The 30 in that error is referring to the configuration_group ID. It failed because there was already an entry in the database using that. You need to edit the sql file and change the '30' entries to something else. If you are comfotable going into phpmyadmin, you can see what the next number can be. But it doesn't matter since it is only used internally. If you change it to something higher, like 40 or 99, it should work. Jack That did it. Thanks very much! -Mike Quote Link to comment Share on other sites More sharing options...
Mythical Posted May 29, 2007 Share Posted May 29, 2007 Hi Jack, I'm currently building a prototype using osCommerce but instead of users paying, retailers will pay to post specials. Fiddling with the ecommerce aspect of this endeavour will be left for later. However, I'm using Multi-Store and have it enabled with the French language as well and I'm trying to set it up so that each store can add their address. I will potentially include a geocoder iframe in the admin portion for each store (also more coding than I will be capable of but I should have help soon) Once the retailer types in their address, they can get the longitude and latitude of their store and save this value in their profile. The geocoder exists at: http://geocoder.ca/?addresst=&stno=&am...t=GeoCode+it%21 The site I'm designing can currently be seen at http://www.shopters.com/0/ though I have yet to figure out how to enable all the functions, any help or suggestions are much appreciated and any involvement on your part will be noted when this platform is launched, I'm taking a look at your contrib as we speak, thanks! Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 29, 2007 Author Share Posted May 29, 2007 Enable all of the functions of what? The geocoder? If so, I have never looked at that so I can't offer any suggestions for it. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Goanna Posted May 30, 2007 Share Posted May 30, 2007 I just wanted to see if I misunderstood a function of this contribution. The line drawing for directions, is that just a task I can do from the admin end? When I read that, I thought I would be able to put a form on the map page, and have turn by turn directions listed, without having to difer my users to another site (google maps). I actually have done this before and I have working code examples that will do this if your interested in building that functionality into this. I was warned though that it may be against googles TOS to do so. Nobody seemed to be sure at the time. It's been over a year since I played with it/looked into it though. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 30, 2007 Author Share Posted May 30, 2007 It draws a map on the screen and you can overlay directions to your store (from some known point). Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Goanna Posted May 31, 2007 Share Posted May 31, 2007 It draws a map on the screen and you can overlay directions to your store (from some known point). Jack Egghh, not very usefull for me. I'll see if I can tie in actual driving directions into this, with geocoding and a form for people to submit their street address. If it works out ill release it as an update. Billy Quote Link to comment Share on other sites More sharing options...
Goanna Posted June 5, 2007 Share Posted June 5, 2007 (edited) Okay I have added some basic driving direction capability. I havent yet added any new database fields to support this but I plan on adding a few more to make the whole thing configurable from the admin area. For the time being here's what I have. I am still working some bugs out, and I may wind up changing things around but I'll post the code here now if anyone wants to play with it. Basically, when you first visit the page you get the original easymap component but I added a form on the bottom asking for a start address. When the address is submitted you then get taken to a page showing turn by turn directions and a map with a polyline drawn along the route, as well as zoom/view controls. <?php /* $Id: easymap.php,v 1.1 2005/12/31 by Jack_mcs Turn by Turn Driving directions functionality added by Goanna osCommerce, Open Source E-Commerce Solutions [url=http://www.oscommerce.com]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_EASYMAP); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_EASYMAP)); $action = (isset($_POST['action']) ? $_POST['action'] : ''); $line = array(); $line = explode(",", EM_LINES_COORD); $longitude = EM_LONGITUDE; $lattitude = EM_LATTITUDE; $to = "123 main street washington dc"; //Destination address goes here formatted Street, City, State, Zip (with or without commas). $from = $_POST['fromAddress']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script src="http://maps.google.com/maps?file=api&v=2&key=abcd123456" type="text/javascript"></script> <?php if ($getdirections == 'true'): ?> <style type="text/css"> v\:* { behavior:url(#default#VML); } body { font-family: Verdana, Arial, sans serif; font-size: 11px; margin: 2px; } table.directions th { background-color:#EEEEEE; } img { color: #000000; } </style> <script type="text/javascript"> //<![CDATA[ var map; var gdir; var geocoder = null; var addressMarker; var trafficInfo = new GTrafficOverlay(); function load() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); gdir = new GDirections(map, document.getElementById("directions")); GEvent.addListener(gdir, "load", onGDirectionsLoad); GEvent.addListener(gdir, "error", handleErrors); setDirections("<?php echo $from; ?>", "<?php echo $to; ?>", "en_US"); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.addControl(new GScaleControl()); //map.addOverlay(trafficInfo); //Need to add a button to toggle this on/off before using. } } function setDirections(fromAddress, toAddress, locale) { gdir.load("from: " + fromAddress + " to: " + toAddress, { "locale": locale }); } function handleErrors(){ if (gdir.getStatus().code == G_GEO_UNKNOWN_ADDRESS) alert("No corresponding geographic location could be found for one of the specified addresses. This may be due to the fact that the address is relatively new, or it may be incorrect.\nError code: " + gdir.getStatus().code); else if (gdir.getStatus().code == G_GEO_SERVER_ERROR) alert("A geocoding or directions request could not be successfully processed, yet the exact reason for the failure is not known.\n Error code: " + gdir.getStatus().code); else if (gdir.getStatus().code == G_GEO_MISSING_QUERY) alert("The HTTP q parameter was either missing or had no value. For geocoder requests, this means that an empty address was specified as input. For directions requests, this means that no query was specified in the input.\n Error code: " + gdir.getStatus().code); // else if (gdir.getStatus().code == G_UNAVAILABLE_ADDRESS) <--- Doc bug... this is either not defined, or Doc is wrong // alert("The geocode for the given address or the route for the given directions query cannot be returned due to legal or contractual reasons.\n Error code: " + gdir.getStatus().code); else if (gdir.getStatus().code == G_GEO_BAD_KEY) alert("The given key is either invalid or does not match the domain for which it was given. \n Error code: " + gdir.getStatus().code); else if (gdir.getStatus().code == G_GEO_BAD_REQUEST) alert("A directions request could not be successfully parsed.\n Error code: " + gdir.getStatus().code); else alert("An unknown error occurred."); } function onGDirectionsLoad(){ // Use this function to access information about the latest load() // results. // e.g. // document.getElementById("getStatus").innerHTML = gdir.getStatus().code; // and yada yada yada... } //]]> </script> <?php else: ?> <!-- BOC googlemap //--> <style type="text/css"> v\:* { behavior:url(#default#VML); } </style> <script type="text/javascript"> //<![CDATA[ function load() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng(<?php echo $longitude; ?>, <?php echo $lattitude; ?>), 14); <?php if (EM_SHOW_MAP_SIZE == 'true') { if (EM_SHOW_MAP_CONTROLS == 'complete') { ?> map.addControl(new GLargeMapControl()); <?php } ?> <?php if (EM_SHOW_MAP_CONTROLS == 'compact') { ?> map.addControl(new GSmallMapControl()); <?php } } ?> <?php if (EM_SHOW_MAP_VIEW == 'true') { ?> map.addControl(new GMapTypeControl()); <?php } ?> // map.addControl(new GOverviewMapControl()); <?php if (EM_SHOW_MAP_VIEW == 'true') { ?> map.addControl(new GScaleControl()); <?php } ?> <?php if (EM_SHOW_MAP_COORDINATES == 'true') { ?> GEvent.addListener(map, "moveend", function() { var center = map.getCenter(); document.getElementById("message").innerHTML = center.toString(); }); <?php } ?> // Our info window content var infoTabs = [ new GInfoWindowTab("<?php echo EM_LOCATION_BUBBLE_TITLE; ?>", "<?php echo EM_LOCATION_BUBBLE_CONTENT; ?>") <?php if (EM_SHOW_MAP_TAB == 'true') { ?>, new GInfoWindowTab("<?php echo EM_LOCATION_TAB_TITLE; ?>", "<?php echo EM_LOCATION_TAB_CONTENT; ?>") <?php } ?> ]; <?php if (EM_SHOW_MAP_MARKER == 'true') { ?> // Place a marker in the center of the map and open the info window // automatically var marker = new GMarker(map.getCenter()); map.addOverlay(marker); <?php if (EM_LOCATION_MAP_BUBBLE == 'true') { ?> marker.openInfoWindowTabsHtml(infoTabs); GEvent.addListener(marker, "click", function() { marker.openInfoWindowTabsHtml(infoTabs); }); <?php } } ?> <?php if (EM_SHOW_MAP_LINES == 'true') { ?> var bounds = map.getBounds(); var southWest = bounds.getSouthWest(); var northEast = bounds.getNorthEast(); var lngSpan = northEast.lng() - southWest.lng(); var latSpan = northEast.lat() - southWest.lat(); // Add a polyline with five random points. Sort the points by // longitude so that the line does not intersect itself. var points = []; points.push(new GLatLng(southWest.lat() + latSpan * <?php echo $line[0]; ?>, southWest.lng() + lngSpan * <?php echo $line[1]; ?>)); points.push(new GLatLng(southWest.lat() + latSpan * <?php echo $line[2]; ?>, southWest.lng() + lngSpan * <?php echo $line[3]; ?>)); points.push(new GLatLng(southWest.lat() + latSpan * <?php echo $line[4]; ?>, southWest.lng() + lngSpan * <?php echo $line[5]; ?>)); points.push(new GLatLng(southWest.lat() + latSpan * <?php echo $line[6]; ?>, southWest.lng() + lngSpan * <?php echo $line[7]; ?>)); points.push(new GLatLng(southWest.lat() + latSpan * <?php echo $line[8]; ?>, southWest.lng() + lngSpan * <?php echo $line[9]; ?>)); points.sort(function(p1, p2) { return p1.lng() - p2.lng(); }); map.addOverlay(new GPolyline(points)); <?php } ?> } } //]]> </script> <?php endif; ?> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" onload="load()" onunload="GUnload()"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="columnLeft" width="<?php echo COLUMN_LEFT_WIDTH; ?>" valign="top"><table border="0" width="<?php echo COLUMN_LEFT_WIDTH; ?>" cellspacing="0" cellpadding="0"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td><td background="images/links/shadow_column_left.gif"> </td> <td><?php echo tep_draw_separator('pixel_trans.gif', COLUMN_SPACER_WIDTH, '1'); ?></td> <!-- body_text //--> <?php if ($getdirections == 'true'): ?> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <div id="map" style="width: 650px; height: 400px"></div> <br /> <span>Formatted Directions</span> <div id="directions" style="width: 650px"></div></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> </table></td> <?php else: ?> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo TEXT_INFORMATION; ?></td> </tr> <?php if (EM_SHOW_MAP_LINES == 'true') { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_DRIVING_DIRECTIONS; ?></td> </tr> <?php } ?> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <!-- Start map code //--> <tr> <td> <!-- EOC googlemap //--> <div id="map" style="width: 500px; height: 400px; border: .2em; border-style: ridge; "></div> <div id="message"></div> </td> </tr> <!-- BEGIN FORM --> <tr> <td align="right"><?php echo tep_draw_form('seotips', tep_href_link(FILENAME_EASYMAP, '', 'NONSSL'), 'post', 'onSubmit="return true;" onReset="return true"') . tep_draw_hidden_field('getdirections', 'true'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '20'); ?></td> </tr> <tr> <td width="40%"><table border="1"> <tr> <td>Starting Address</td> <td><?php echo tep_draw_input_field('fromAddress', $fromAddress, false); ?> </td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '20'); ?></td> </tr> <tr> <td width="40%"><table border="0"> <tr> <td width="45%"> </td> <td><?php echo (tep_image_submit('button_update.gif', IMAGE_UPDATE) ) . ' <a href="' . tep_href_link(FILENAME_EASYMAP, '') .'">' . '</a>'; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '20'); ?></td> </tr> </form> <!-- END FORM --> <!-- End Map code //--> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> </table></td> <td class="columnRight"><?php echo tep_draw_separator('pixel_trans.gif', COLUMN_SPACER_WIDTH, '1'); ?></td> <td > </td> <?php endif; ?> <!-- body_text_eof //--> <td width="<?php echo COLUMN_RIGHT_WIDTH; ?>" valign="top"><table border="0" width="<?php echo COLUMN_RIGHT_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> If you want to play around with it just overwrite your existing easymap.php file with it and give it a go. It's pretty basic right now but you should be able to modify it. Remember to put your own API key in place. Edited June 5, 2007 by Goanna Quote Link to comment Share on other sites More sharing options...
Goanna Posted June 5, 2007 Share Posted June 5, 2007 Oh, sorry one quick thing, the API key you must change it to 2.x if you leave it at v=2 it wont work. Since I cant edit the above code, it should look like this. <script src="http://maps.google.com/maps?file=api&v=2.x&key=abcd123456" type="text/javascript"></script> Quote Link to comment Share on other sites More sharing options...
azer Posted June 7, 2007 Share Posted June 7, 2007 could someone help me to find the right longitude and lattitude, when i go to google maps the pointer is in the perfect location, i copy the url to this map and here it is : http://maps.google.com/maps?q=Bredestraat+6,+6211+Maastricht,+Maastricht+(Limbourg),+Netherlands&sll=50.846177,5.690296&sspn=0.006598,0.022252&ie=UTF8&ll=50.848765,5.690446&spn=0.006598,0.022252&z=16&om=1 then i enter in my admin : Longitude : 5.690446 Lattitude : 50.848765 and the pointer is 2 street above the right location :angry: Quote MS2 Link to comment Share on other sites More sharing options...
finjay Posted June 21, 2007 Share Posted June 21, 2007 Any suggestions on how to add this to a different page other than easymap.php? I'm using the BTS. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 21, 2007 Author Share Posted June 21, 2007 You just need to copy the code that has to do with the map (at least in my version. I haven't tried any others) into the file you want. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mrhandley Posted July 17, 2007 Share Posted July 17, 2007 Great contrib. Is it possible to add multiple store locations? Have you looked in to that at all? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 17, 2007 Author Share Posted July 17, 2007 No, I haven't. It would be possible but not as the code is currently written. But multiple locations are possible on one map so I'm not sure there would be a need for it. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mrhandley Posted July 17, 2007 Share Posted July 17, 2007 So how do I add multiple locations on one map? Or are you planning to add it in a near future? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 17, 2007 Author Share Posted July 17, 2007 The code is only setup to show one location now (at least in my version). It would not take much to change it so the various points are stored in the admin settings but a quick way to get it to work is to find this code in easymap.php var point = new GPoint(bounds.minX + width * <?php echo EM_LOCATION_X; ?>, bounds.minY + height * <?php echo EM_LOCATION_Y; ?>); var marker = new GMarker(point); map.addOverlay(marker); Then duplicate it right under it and change the location. Try this as an example to see what I mean var point = new GPoint(bounds.minX + width * <?php echo EM_LOCATION_X + .04; ?>, bounds.minY + height * <?php echo EM_LOCATION_Y + .04; ?>); var marker = new GMarker(point); map.addOverlay(marker); You'll need to enable the Enable Marker option to see the above. You can add as many extra points as you want. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
mrhandley Posted July 18, 2007 Share Posted July 18, 2007 (edited) Hmmm, I can´t seem to find the var point = new GPoint(bounds.minX + width * <?php echo EM_LOCATION_X; ?>, bounds.minY + height * <?php echo EM_LOCATION_Y; ?>); var marker = new GMarker(point); map.addOverlay(marker); code in my easymap.php. I even extraxted the zip once again to be sure to have the original file. Is it me that is completely lost? (I´ll blame it on lack of coffey if so) Enable marker is enabled btw. Edited July 18, 2007 by mrhandley Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.