Is it working with WSS ?

Sep 11, 2008 at 10:00 AM
Is there a way to let this webpart works under wss ?
Nov 17, 2008 at 9:32 AM
Hello
I didn't see any answer to that question, in which i'm interested too...
We just have WSS 3 and not MOSS 2007. How to make this working ?
Thanks for the answer
Best regards
Marc
Coordinator
Nov 25, 2008 at 8:30 AM
Hiya,

I may have been a bit hasty saying that it won't work with WSS.  Can you try and deploy it and see what happens?  I've just deployed it on a WSS site and it seems to be ok.  Although the WSS site is located in a MOSS site collection so it may be screwing with my results.

Mike
Nov 30, 2008 at 9:25 AM
Thanks mike

i tried it and deployed it and nothing happened.

i think the reason in this requirement 

"This uses the Microsoft.Sharepoint.Publishing Namespace so the publishing feature will need to be enabled."

because WSS does not have this feature


Coordinator
Dec 10, 2008 at 3:26 PM
Is it working in wss?  Yes!

Well sort of.....
Dec 10, 2008 at 4:10 PM
Hi mike
Very happy to see you worked on a wss version but...
I've got the same problem than before : without being able to change the parameters of the webpart, in the right panel is written "an error has occured" in red...
And when I refresh the page, there is a windows error message (in french for me, sorry for the poor translation) : "the google map api key used on this website has been already registered for another site. You can generate another key for this site going on http://code.google.com/apis/maps"
I did this, I ricover another key, but there is no way to change it nowhere, i've got the "an error has occured" message befoire being able to arrive on the parameters of the webpart...
Do you have an idea ?
Thanks a lot !!!
Dec 18, 2008 at 4:16 PM
I am having the same issues.  I installed the full webpart in WSS per your direction, stopping at Optional MOSS only.  I added the web part successfully, however I can't edit the webpart, as it gives the "an error has occured" in red as well. I have removed the full google webpart and tried to deploy the WSS web part, but the web part never shows up in the list.  And I can't do the activatefeature on the WSS version as there is no feature associated with it.

Any help is greatly appreciated.
Coordinator
Dec 19, 2008 at 9:31 AM
I've just built a WSS virtual server to test this and I noticed that for some reason the webpart throws up and error if there isn't any data already in the list.  Can you both make sure that you have at least one point in your list before you start to edit the settings in the webpart.
Dec 19, 2008 at 10:03 AM
Hi Mike
Thank you to try to solve my problem
I tried what you said, but it's exactly the same :
- without being able to change the parameters of the webpart, in the right panel is written "an error has occured" in red...
- And when I refresh the page, there is a windows error message (in french for me, sorry for the poor translation) : "the google map api key used on this website has been already registered for another site. You can generate another key for this site going on http://code.google.com/apis/maps"
Sorry...   :o)
Dec 22, 2008 at 1:55 PM
I replied to the list, but for some reason it was never posted:

Problem with adding an item to the list is that you can’t tell the web part what list to pick from because you get the error when you try to edit the web part.

 

I got it working by doing a combination of things:

 

From your instructions document, I followed steps 1 – 7 but skipped step 6 with the MJB.Sharepoint.GoogleMaps.wsp file.  This included making the list, which actually worked, even though if I remember correctly the last step threw an error.

 

I then did steps 4 and 5 with MJB.WSS.GoogleMaps.wsp file.

 

Went into Site Actions > Site Settings > Site Collection Features and Activated the WSSMapsWebPart since it didn’t want to activate at the console.

 

Then I added the web part to the page, however there was no CSS template.

 

The instructions in the forum to copy the CSS code into the controls.css file didn’t apply here, since there is no controls.css, so I created a Content Editor web part, opened up the Source Editor and pasted in the CSS code wrapped in <style></style> tags and made the web part hidden under Layout.

 

I went into the Google Maps List and added my sites there.  Then I was able to modify the Google Maps web part and specify the site root and list and map the appropriate fields.

 

I think if you wrapped the WSS webpart into the original WSP, it would work.  You’d just have to change the name in the instructions for the activate web part section.

Jan 26, 2009 at 4:34 PM
Hi all
Thanks a lot, romulus15... (and mike also, of course)
I did what you said, returning back from the beginning, and then I finally succeed in making this working...
Not without any trouble...  :o)
Best regards
Marc
Feb 13, 2009 at 8:57 PM
Edited Feb 17, 2009 at 6:20 PM
Okay.. I admit it.. I'm a complete noob using WSS. None the less, I'm having a heck of a time getting the WSS only webpart to install correctly. I get the following error:

I did try following the instructions with revisions outlined above by Romulus. When I run the stsadm addsolution though, I get "object reference not set to an instance of an object". I know I'm typing it in exactly the way described...

Can someone please help?
Feb 25, 2009 at 9:00 PM

Hi there,

I am just attempting to install this web part for the first time on a WSS 3.0 server and it seems as if everything was going well up until modifying the web part.  I guess my first question is, should a see a google map before associating it to a list for coordinates or do I need the list before I see any map.  At this point I see the title bar on the webpart with no errors, but I don't see a map. I have created a custom list with Title, Longitude and latitude for a trial run but I cannot get the webpart to see my list that I created.  After giving the path and list name I receive "An unexpected error has occurred."  Does this have to do with the controls.css that is talked about above?  Do I need to do:

"Then I added the web part to the page, however there was no CSS template.

 

The instructions in the forum to copy the CSS code into the controls.css file didn’t apply here, since there is no controls.css, so I created a Content Editor web part, opened up the Source Editor and pasted in the CSS code wrapped in <style></style> tags and made the web part hidden under Layout."

If so, is the control.css the same as mapswebpart.css or where do I find it?

Also, does my list need to be named "Global Maps List"?

Thanks in advance for your help, I am really excited about this webpart

Feb 25, 2009 at 10:09 PM
Mike-
Before I go installing this, I'd like to get a clean answer.

Does your latest release support a WSS-compatible web part? If so, what features are lost in this version by not being able to use the MOSS library Microsoft.SharePoint.Publishing?

Thanks.
Coordinator
Feb 26, 2009 at 9:36 AM
Hi,

To answer your question about WSS.  Yes the web part will work in WSS.
What you lose is
a) the ability to pick the list you want to use through a pop up window - you just have to type it in.
b) the default list template and list instance - taken out just to make development quicker for me.  You can create your own list

Those should be the only differences.  If you spot anymore let me know.

Mike
Feb 27, 2009 at 1:26 AM
Hey Mike. Thanks for writing back.

I worked on this today. I downloaded your instructions as well as the MJB.WSS.GoogleMaps.wsp file. Easy add, deploy, and activate feature. No errors.

I added the web part to my page and got the expected error about the API key. When I added the key value to the web part and saved, without adding other things, it caused no problems, and as expected, didn't display anything.

However, when I used the single point option, entering roughly 38.0 for latitude, -122.0 for longitude, a title, and a path to an image (/images/test.jpg)... it resolves, saves without error, but the map does not properly display.

It shows the scale bar, and the text for Google's copyright (not bound to the web part box but overflowing on top), and no map... just white space.

When I tried using a list, a custom one I had already built, I added Latitude and Longitude fields... selected the proper fields for the variables from the drop downs, and save... it takes me to an error page suggesting the Web Part Maintenance page to delete the web part causing problems.

These known issues? Did I miss something?

Also, relative, the List and CSS style features are not available in WSS or just need to be done manually?

Thanks,
-Trey
Coordinator
Feb 27, 2009 at 7:49 AM

Trey,

Yes, the CSS is missing too - I knew I'd forgotten something that wasn't in WSS.  If you add a content editor webpart above the map you can drop some CSS in there.  Something like:

#map

{

float:left;

width:70%;

height:500px;

}

<o:p> </o:p>

#side_bar

{

float:right;

width:28%;

height:500px;

overflow:scroll;

}

<o:p> </o:p>

#directions

{

height:300px;

overflow:scroll;

}

Mike

Feb 27, 2009 at 7:36 PM
Edited Mar 3, 2009 at 12:15 AM
**** irrelevant ****


Feb 27, 2009 at 7:44 PM
Edited Feb 27, 2009 at 7:49 PM
Thank you Mike for the clarification on the CSS.  Now my map will display properly if I use the Single point options in the webpart, but I am having a problem when attempting to use a self-created list.  I have created a custom list with the following fields.

Title - Text
Longitude - Text
Latitude - Text
Description - Multple line Text w/ Rich text selected
ImageURL - Text

I have two items in this list with all fields populated except ImageURL is left blank.

I have verified that the list that I created matches the settings descriped in your documentation.

When modifying the webpart, I see all the columns that I created in the list and it lists my two locations for a center point so I know that it is reading my list, yet the webpart doesn't display the map when using the list.  Any suggestions on what may be wrong with my list that it is not displaying the locations in it?  This may sound crazy because I don't know a whole lot about CSS but does the Content Editor Web part have to be associated with my list somehow?
Feb 27, 2009 at 7:58 PM
Edited Mar 2, 2009 at 11:58 PM
**** edited: irrelevant ****


Mar 2, 2009 at 10:02 PM
Mike:

Don't know what to say really. First installation was without errors, but still did not work. Frustrated, I deactivated the feature, retracted and deleted the solution, then manually removed the web part from the gallery.

Second installation, it works fine. The content editor with the web part stayed on the page and the CSS is unchanged. The API is the same. And the list values did not change. The only thing different was activating the feature via the GUI (Site Collection Features) rather than at the command line.

I'll let you know if any other irregularities show up.
-Trey

A side note for those seeking coordinates for their addresses... use maps.google.com to hit your address and either in the address bar or in the "Link" option on your mapped point, you can grab the URL to the map... in there you'll find a variable "&ll=123.123,-123.123" - the numerical values immediately after the = symbol are the latitude and longitude for your site in said order.
Mar 3, 2009 at 12:14 AM
Edited Mar 3, 2009 at 12:19 AM
Mike.
Check this out. As mentioned above, it worked with a minimal list. The next step was to try tying your web part to an existing list on a subsite.

The list already includes Address, City, County, Zip, Primary Phone, and Category. All fields are populated. To this list I added Longitude, Latitude, and ImageURL, populating all the values to make rule out null values.

On the same site as the list, I created a fresh Web Part Page, and plopped a content editor on it with the same CSS used in the working situation. Then I plopped on your google maps web part. Using the same API, I mapped it to my list, and selected Address (multiple lines of text type) for the description column.

The list appears properly retrieved as the columns are correctly listed and all the list items were available in the Map Centre drop down combo box. However, when I press OK and return to the page, no sites are listed on the side panel, and no map is displayed. No errors either.

Edit: It works properly with a single point. So it's something with the way the web part is retrieving and/or processing the list items.

Any thoughts? So close to the finish line I'd really like to resolve the issue so we can go live with your web part. It's a big help and has lots of fans already amongst the executives.
-Trey
Coordinator
Mar 3, 2009 at 2:57 PM

Well you've got me stumped Trey,

The only thing I can think of is:

  • Go to the page with the web part on it
  • Try putting the CSS above and below the webpart, just in case!
  • View Source on the web page
  • Find the bit of Javascript that the webpart produces - do a search for GBrowserIsCompatable
  • There should be a about a screen full of javascript and towards the bottom there should be several bits like
    • var point = new GLatLng(10,10);
      var marker = createMarker(point, "Something","<table width='200px'></table>");
      map.addOverlay(marker);
  • In fact there should be one per map point, if they are there then the information is being retrieved by the web part and the problem lies with the CSS. the display, or access to google maps
  • If they aren't there then the problem is with connecting to the list.

Mike

Mar 3, 2009 at 6:41 PM
Edited Mar 3, 2009 at 6:43 PM
Mike-
Thanks for the continuing help. I am stumped too. Here's the next set of research I've found at your suggestion.

CSS: This can be ruled out. I have added a border style (solid 1px #f00) to each of the containers and they show colored properly no matter where the CSS web part is.

Javascript: GBrowserIsCompatible was there, as well as all the map points like you suggested via the map.addOverlay. Below I'll put a sample of the code I found, as trimmed as I can to shorten the redundancy of the many map points.

if (GBrowserIsCompatible()) {
var side_bar_html = "";
var gmarkers = [];
var htmls = [];
var to_htmls = [];
var from_htmls = [];
var i=0;
function createMarker(point,name,html) {
var marker = new GMarker(point);
to_htmls[i] = html + '<br/> Directions: <strong>To Here</strong> - <A href="javascript:fromhere(' + i + ')">From Here</a><br/> Address: <br/>One of our sites<br/><select id="ddlSites" name="ddlSites"><option value="">Pick one</option><option value="AEU: Amador-El Dorado@38.566908,-121.49417">AEU: Amador-El Dorado</option>
// Options exist for all the map points. Select closes properly and the same script exists for the from_htmls variable.

GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
gmarkers[i] = marker;
htmls[i] = html;
side_bar_html += '<a href="javascript:myclick(' + i + ')">' + name + '</a><br>';i++;
return marker;}

function myclick(i){GEvent.trigger(gmarkers[i],"click");}
function tohere(i){gmarkers[i].openInfoWindowHtml(to_htmls[i]);}
function fromhere(i){gmarkers[i].openInfoWindowHtml(from_htmls[i]);}

function getDirections() {
var saddr = document.getElementById("saddr").value;
var daddr = document.getElementById("daddr").value;
var ddlSites = document.getElementById("ddlSites").value;
if (ddlSites=="") {
gdir.load('from: ' + saddr + ' to: ' + daddr);
}else if (daddr==""){
gdir.load('from: ' + saddr + ' to: ' + ddlSites);
}else {
gdir.load('from: ' + ddlSites + ' to: ' + daddr);
}
}
var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setMapType(G_NORMAL_MAP);
map.setCenter(new GLatLng(38.566908,-121.49417),17);
var gdir=new GDirections(map, document.getElementById("directions"));

var point = new GLatLng(38.566908,-121.49417);
var marker = createMarker(point, "AEU: Amador-El Dorado","<table width='200px'><tr><td><img src='/images1/calfire_logo_sm.jpg' alt='Image representing AEU: Amador-El Dorado' /></td><td><strong>AEU: Amador-El Dorado</td></tr><tr><td colspan='2'>2840 Mt. Dahner Rd. Camino, CA 95709  </td></tr></table>");
map.addOverlay(marker);
// Entries exist for all map points.


GoogleMaps Access: If I add another maps web part to the page, and use a single point entry, it displays fine with the same API key. So I don't think this is the issue.

"The display"
- what did you mean when you said the display?

Would any of these issues cause problems:
1. Too many entries in the list? (41 locations in the list)
2. Other columns in the list? (City, County, Zip, Phone, etc.)
3. Issues with column types? (number, multiple lines of text, etc.)


Let me know what you think. I'll try another list and leave out exccess columns to test more as well.
-Trey
Mar 3, 2009 at 7:26 PM
Hi Mike,

Well it looks like this is where the similarity between Trey's problem and mine stops.  I have taken a look at the source code and it seems that the data is not properly being passed from my list that I created.  The webpart sees the columns and the web part sees the data for me to choose a center location but it's not pulling the data to the map.  Below is a part of the source code from the page.  

if (GBrowserIsCompatible()) {
var side_bar_html = "";
var gmarkers = [];
var htmls = [];
var to_htmls = [];
var from_htmls = [];
var i=0;
function createMarker(point,name,html) {
var marker = new GMarker(point);
to_htmls[i] = html + '<br/> Directions: <strong>To Here</strong> - <A href="javascript:fromhere(' + i + ')">From Here</a><br/> Address: <br/>Enter an address: <br/><input type="text" size="20" maxlength="40" id="saddr" name="saddr" value="" /><input value="Get Directions" type="Button" onclick="javascript:getDirections();" /><input type="hidden" name="daddr" value="' + name+ "@" + point.lat() + ',' + point.lng() + '" />';
from_htmls[i] = html + '<br/> Directions: <A href="javascript:tohere(' + i + ')">To Here</a> - <strong>From Here</strong><br/> Address: <br/>Enter an address: <br/><input type="text" size="20" maxlength="40" id="daddr" name="daddr" value="" /><input value="Get Directions" type="Button" onclick="javascript:getDirections();"/><input type="hidden" name="saddr" value="' + name + "@" + point.lat() + ',' + point.lng() + '" />';
html = html + '<br />Directions: <a href="javascript:tohere(' + i + ')">To Here</a> - <a href="javascript:fromhere(' + i + ')">From Here</a>';

GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
gmarkers[i] = marker;
htmls[i] = html;
side_bar_html += '<a href="javascript:myclick(' + i + ')">' + name + '</a><br>';i++;
return marker;}

function myclick(i){GEvent.trigger(gmarkers[i],"click");}
function tohere(i){gmarkers[i].openInfoWindowHtml(to_htmls[i]);}
function fromhere(i){gmarkers[i].openInfoWindowHtml(from_htmls[i]);}

function getDirections() {
var saddr = document.getElementById("saddr").value;
var daddr = document.getElementById("daddr").value;
gdir.load('from: ' + saddr + ' to: ' + daddr);
}
var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setMapType(G_NORMAL_MAP);
map.setCenter(new GLatLng(,),13);
var gdir=new GDirections(map, document.getElementById("directions"));

var point = new GLatLng(,);
var marker = createMarker(point, "","<table width='200px'><tr><td></td><td><strong></td></tr></table>");
map.addOverlay(marker);

document.getElementById("side_bar").innerHTML = side_bar_html;
setTimeout('map.setCenter(new GLatLng(,),13)','750');
setTimeout('map.checkResize()','500');
setTimeout('myclick(0)','1000');

Adding another map to the page and using a single point entry, works for me as well.  Any ideas as to why my list wouldn't be properly passing the data to the webpart.  Thank you for your help.

Jaime

Mar 3, 2009 at 7:33 PM
Edited Mar 3, 2009 at 7:52 PM
We might be getting somewhere:

1. On the top level site I started with a fresh list (beginning with only Title, Description, ImageURL, Latitude, and Longitude). I added 50 entries to it, with all meta data entered. On a fresh web part page it worked.
We can rule out the number of locations.

2. I then added Primary Phone and Zip Code columns, and populated them with data. It still worked.
We can rule out other columns on the list.

3. After that, I decided to change the values of the Description column (multiple lines of text, standard options) from "description" to the locations' addresses (see below for format). Failed!
2221 Garden Road
Monterey, CA 93940


4. Further, when I changed the Description column values back to "description" for all entries, it did not repair itself, even on a full refresh with clean cache. Still broken.
5. I deleted the excess columns, to make sure the list and its values were just like Step1. It was still broken.

6. On the same web part page, I added a fresh google maps web part, associated it with the same list (identical to Step1), and the new web part fails.

7. A fresh web part page on the same site, is still broken.

So what broke it was putting in two-line text formatted addresses (Step3) in the Description column, and simply reverting the changes did not fix the problem. Unless I am using the Description column improperly, it sounds like a bug.

Thoughts?
-Trey
Mar 3, 2009 at 7:44 PM
Edited Mar 3, 2009 at 7:46 PM
Jamie - try this:

On your top level site, start with a fresh list. Add the columns Description, ImageURL, Latitude, and Longitude using the explicit names. No other columns. Make them all "single line of text" except the Description "multiple lines of text". Add 3 fresh list items. Make sure Title and the coordinates are unique. Description and ImageURL values can be common. These things should not be necessary, but it rules out a lot of stuff.

Also use a fresh web part page on the same site to rule out cross-site issues. Your "relative path" would simply be forward slash "/" and then the list name. Use this CSS code:

<style type="text/css">
<!--
#map { display:block; border: 1px solid #00d; float:left; width:70%; height:400px; }
#side_bar { border: 1px solid #d00; float:right; width:28%; height:400px; }
#directions { border: 1px solid #0d0; height:400px; overflow:scroll; }
-->
</style>

This situation works for me. Its when I tweak with the description column, or build it on a subsite/cross-site situation. Let me know if you still get the same problem.
-T

Mar 3, 2009 at 8:15 PM
Edited Mar 3, 2009 at 8:24 PM
Mike.
I think we have it pin pointed. With a fresh list, no added columns, one single list item:

Title: LocationName
Latitude: 38.566908
Longitude: -121.49417
Description: TestDescription
ImageURL: /images1/logo.jpg

Modifying latitude or title did not cause problems. Changing the Description column value from "TestDescription" to "A" caused the seemingly irreversible problem. Interestingly enough, the javascript making the marker is showing "A" properly, but somehow it messes up the display.

Edit: I tried making Description a "single line of text column" and changing its values then does not cause problems. So it sounds like something is getting jacked when you modify values of column types that arent "single line of text".

Would you like me to create an Issue?
-Trey

Mar 3, 2009 at 9:37 PM
I have tried this every which way I can think of on this server, including following Trey's instructions and I recieve the same results (besides the changes that Trey made to the CSS when I used his).  I have created a new site and tried it as well as a new webpart pages and lists.  I will next try it on  a different server, but I guess what I am wondering is what type of site you are using Trey.  When I have been creating my site, I have been creating a blank site.  I don't know what difference that would make, but I am grasping here.  Thanks for all your help, both Trey and Mike.
Mar 4, 2009 at 9:31 PM
Well, I have tried this on a different server and I am getting the same results.  The one thing that is different from what Trey explains above is that in the relative path to Site option, I have to leave that box blank in order for it to work.  If I us a "/"  for the relative path and then type in just my list name I get an unexpected error has occurred.  If I leave the relative path blank and then enter my list name, it then populates the rest of the options with my list columns.  Does this make sense?

Webpart located: servername/sites/sitename  (I have tried a seperate web part page as well with the same result)
List located at:  servername/sites/sitename/lists/listname

Is the leaving the relative path blank my issue?  Thanks.
Mar 4, 2009 at 9:46 PM
Mastj25-
Yes. If your site is top level but in another site collection (/sites/) your relative path should look like: /sites/sitename
Regardless of where the webpart is located, beginning with a forward slash from the top level site of the primary site collection (http://servername) is the best option... hope that helps.

Mike-
Any thoughts on the issue above?
Mar 5, 2009 at 2:17 AM
Trey, thank you so much for your help.  That was exactly it, and I feel like such a chump :)  I know that was how I had started this whole process out, but it wasn't working for one reason or another and then I stumbled upon nothing in the box and it was seeing my list and populating the column's...  Anyhow, thanks a lot.  In return, I will test your theory on the change in the description when I get a chance and will post my results.
Mar 13, 2009 at 6:39 PM

Mike,

Can you update the installation document to reflect some of the things that were added in this discussion.

I am still unclear on how to get past the error of not being able to edit the web part because the tool pane has a red error displayed. I am using WSS not MOSS. Am I supposed to add some css somewhere in there? Do I need to have a list already created with data in it? How can I remove the feature and try installing again? If I am using WSS do I install the MJB.Sharepoint.GoogleMaps.wsp file or the MJB.WSS.GoogleMaps.wsp file?

Mar 13, 2009 at 7:17 PM
I made some progress and now have the tool pane showing up. I did add the css as described earlier in this post. In order to get it to work I went into "Site Collection Features" and disabled "WSSMapsWebPart" and then re-enabled it. When I did that I got the option for the WSS version of the webpart along with the Sharepoint version. When I used the WSS version I got the tool pane to display correctly.

My API from google however is not working. I think I have it licensed to the wrong site. If I have my WSS on an Intranet that doesn't have a DNS entry (i.e. no .com name) should I register the API to my public IP? I'll ask the good people at google about this one as well.
Mar 13, 2009 at 7:24 PM
jterrell-

sounds like you are getting closer. to review... if you are running a WSS website all you need is the MJB.WSS.GoogleMaps.wsp library... this has the WSS web part but won't add confusion and guessing between MOSS/WSS versions.

Also, the initial enabling of the feature was one problem I ran into as well... sounds like reenabling it worked for you too.

CSS example goes in a Content Editor Web Part on the same page... above or below the google maps part doesnt matter... make it hidden for your convenience.

And I was using this for an Intranet as well, so the way you want to register with google is your exact URL to the root of the site... for instance, I have a server called "webwss1" but instead of simply tying the website to the server, we added an SPN/DNS entry for "http://intranet" -- when you register your key with Google, you would use "http://intranet" and it will work fine.

Lastly, stay away from extraneous columns in your list, though I am expecting my problems were more along the lines of column types than extra columns in the list... multiple lines, and number columns seemed to hose the web part any time a single record in the list was changed, and were unrepairable...

good luck.
Mar 16, 2009 at 7:35 PM
Awesome that was it. I had the wrong http: address in there.