Version 2 - now with a brand new feature where the map actually shows up

Coordinator
Oct 30, 2008 at 11:32 AM
Hi All,

I've released version 2 of this project.

Couple of major differences:
1.  This one actually works and has been tested on someone else's Sharepoint install - thanks DanBDubai
2.  I've added a feature which you can enable to create a basic list that works with the webpart

Future development features include a preview Javascript so you can see what you're sending to Google Maps and maybe installing a custom CSS into your Style Library making it easier to layout the page if you don't already have a custom css file.

As usual, let me know if there's any issues.

Mike
Oct 30, 2008 at 11:47 AM
ooh! thanks mike!
i'll check it out now! :)
Oct 30, 2008 at 12:20 PM
Hi Mike,
It works like a charm on our system and already i have our staff and some clients using it to get directions. Thanks again for this webpart.
Oct 30, 2008 at 12:52 PM
ok so this may be a stupid question but how do i remove the old version?

stsadm -o deletesolution -name MJB.Sharepoint.Googlemaps

doesnt appear to work.

[note that i'm a n00b in this area so any help appreciated] :)
Oct 30, 2008 at 12:59 PM

Hi Ceetee,

Go to Central Administration and then select Solution Management, from here click MJB.Sharepoint.Googlemaps and then click Retract solution. Once its finished retracting it will display solution not deployed. Then click on it again and select remove and it’s all gone. Unfortunately I have not had much success with the command line option to remove solutions.


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
Oct 30, 2008 at 1:15 PM
excellent. that's removed it... now to install the new version :)

Oct 30, 2008 at 1:25 PM
hmmm... failed

here's what i did [following the instructions]


stsadm -o addsolution -filename "c:\googlemaps\MJB.Sharepoint.Googlemaps.wsp"

Operation completed successfully.

stsadm -o deploysolution -name MJB.Sharepoint.googleMaps.wsp -immediate -allowgacdeployment -url http://ukmosstest

The timer job for this operation has been created, but it will fail because the
administrative service for this server is not enabled. If the timer job is sched
uled to run at a later time, you can run the jobs all at once using stsadm.exe -
o execadmsvcjobs. To avoid this problem in the future, enable the Windows ShareP
oint Services administrative service, or run your operation through the STSADM.e
xe command line utility.

stsadm.exe -o execadmsvcjobs

Executing .
Executing solution-deployment-mjb.sharepoint.googlemaps.wsp-0.
Operation completed successfully.

stsadm -o activatefeature -name mapwebpart -url http://ukmosstest

Failed to find the XML file at location '12\Template\Features\mapwebpart\feature
.xml'


any ideas?
Oct 30, 2008 at 1:30 PM

Have you tried going to central management and then going to solution management, then click the mjb.sharepoint.googlemaps.wsp and select deploy. If this fails with the same error than make sure the windows SharePoint services Administration is started and maybe an iis reset might resolve the issue.


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
Nov 3, 2008 at 2:56 PM
Sorry for being a lurker here but thanks for the guide. I was also getting the same error message as ceetee was getting but seem to have found the issue - hope this helps someone.

the command line needs to be replaced to stsadm -o activatefeature -name mapswebpart -url http://ukmosstest.

Or at least it was on mine because when i searched the features directory I didn't have a mapwebpart directory but a mapswebpart one. I don't know if this is a left over of the previous install or not?
Coordinator
Nov 3, 2008 at 3:02 PM
Yes - there is a "S" missing from the user guide.  I've added it.  Thanks sjaddy.
Nov 3, 2008 at 6:51 PM
I have run into a problem though I am hoping someone can help. I am sure it is me being dumb but here goes.

Have added in the webpart as described and can select it and use my list to populate the info.

I am setting the pixels to 500 for both width and height but when i look at the webpart it is showing the scale on the left hand side (the ability to zoom in/out), it is showing the options for Map/Satellite/Hybrid in the top right and in the bottom of the webpart i have the Powered by Google section.

BUT there is no map in the screen.

Has anyone seen this before or fixed the issue. I am sure it is pulling information through because of the scale and map options showing up.

It is on a Win2k3 server with IE7 installed. I have opened up the ability to accept cookies because I was seeing privacy reports on the page where google pages cookies had been blocked.
Nov 3, 2008 at 7:31 PM

I am having the same problem as sjaddy.  I have to actually set the height & width to view anything.
I am currently just using a single point instead of a list just to test.
Currently on Win 2k3 Server, MOSS 2007.
Using IE8, tested also on Firefox & Chrome - no go
Zoom and map selection work fine just no actual map.

Nov 4, 2008 at 5:03 AM

Hi Sjaddy and Mordant,

I had the same issue until it was mentioned that I had missed out the adding of

#map

{

float:left;

width:70%;

height:500px;

}

#side_bar

{

float:right;

width:28%;

height:500px;

overflow:scroll;

}

#directions

{

height:300px;

overflow:scroll;

}

To the CONTROLS.CSS file which is found under

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1033\STYLES

Hope this helps


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
Nov 4, 2008 at 5:02 PM
Hey DanBDubai!

Thanks for the info!

Altered the .CSS as instructed; however, still the same... No Map.
Nov 5, 2008 at 2:37 AM
DanBDubai,

many thanks - that will teach me to actually read the instructions to the end. That has worked like a charm.
Nov 7, 2008 at 6:33 PM
Finally got mine to work with almost no issues.  Thanks, Mike for suggesting the CSS in a Webpart.  I haven't seen if the master is not referring to the Control.CSS yet.
Nov 7, 2008 at 11:35 PM
Hey Guys,
Quick question -
Is there a limit as to how many items in the list? I ask because I have a list that has over 400 items across the country.  Typed in the first 130ish - worked fine.  Typed in the next 150ish (total in list is now 286) back to blank map & no controls.

Thanks
Coordinator
Nov 10, 2008 at 9:01 AM
Hi Mordant,

There isn't a limit in the webpart and there shouldn't be a limit on Google maps although according to what I've read there are speed issues when you have more than 100 points on the map.  This could be a time-out issue causing the map to just stop loading.  Not sure what to suggest.

And also for the next version, I'll fix the CSS issue and add a custom css to the style library so that we can avoid this in the future.

Mike
Nov 18, 2008 at 12:35 PM
Edited Nov 18, 2008 at 1:43 PM
ok. it would appear that i'm either a) stupid or b) completely useless. I am still getting epic FAIL with this, despite attempting 4 times to follow the instructions.
I have deployed the webpart and list to the following site:
http://sptest/sites/sandbox/HR
both the list and the map are on the same page.I can see them and modify their properties.


1. I can't get the web part to connect to my map list, which is deployed to the same site and is visible on the same page as the map web part. When i click browse, i get the sites picker, i go into the sites node, where i see

documents
images
sites
tabs
workflow tasks

If i click the "sites" subnode, the dialog flickers, but the node doesn't expand. Nowhere can i see the site i want to select, nor the list. Am i missing something here? I've tried entering the location of the list manually, but all i get is file not found. Can someone provide me with an example of what should be contained in these boxes for this list?
[http://sptest/sites/sandbox/HR/Lists/GoogleMapList/AllItems.aspx]




2. Using the single point option, i enter Location's 'Longitude' as -1.8089676 and Location's 'Latitude' 53.8206311 and give it the name test. Now when i view the page I see the google logo, the nav controls but the web part is about 50 pixels high. So i manually set the dimensions to 500x500 and i see all the controls, a link to my "test" location and a large white square. No map.
I opened the file Controls.css directly in notepad from C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1033\STYLES on the server, added the following to it at the end:

#map
{
float:left;
width:70%;
height:500px;
}
#side_bar
{
float:right;
width:28%;
height:500px;
overflow:scroll;
}
#directions
{
height:300px;
overflow:scroll;
}

after iisreset etc the map is still blank. take my manual sizing out and the web part returns to its 50 pixel height.

I notice mordant above had the same issue, but then refers to "Finally got mine to work with almost no issues.  Thanks, Mike for suggesting the CSS in a Webpart". What does this mean exactly? i see no posts suggesting anything along these lines... i'm totally lost, why am i getting the map controls but no map?

Any help appreciated. I've promised this to people and now look like a total cock. :)

Nov 18, 2008 at 9:21 PM

Hi Ceetee,

Let's see if I can help a bit:

1. I can't get the web part to connect to my map list, which is deployed to the same site and is visible on the same page as the map web part. When i click browse, i get the sites picker, i go into the sites node, where i see

documents
images
sites
tabs
workflow tasks

If i click the "sites" subnode, the dialog flickers, but the node doesn't expand. Nowhere can i see the site i want to select, nor the list. Am i missing something here? I've tried entering the location of the list manually, but all i get is file not found. Can someone provide me with an example of what should be contained in these boxes for this list?
[http://sptest/sites/sandbox/HR/Lists/GoogleMapList/AllItems.aspx]

On this portion, if you click on the plus sign instead of the actual site it should actually expand. Alternatively, you can just type in the name of the subsite (ie: /hr) on the site line and then in the next block type the name of the list (ie: GoogleMapList).

On point #2:

On your page, add a "Content Editor Web Part" then in the source editor paste in the code. Ensure that the Webpart is "Hidden". That way it will load and not be seen. This should help.

Mordant


From: notifications@codeplex.com
To: diamondgator@hotmail.com
Date: Tue, 18 Nov 2008 04:35:42 -0800
Subject: Re: Version 2 - now with a brand new feature where the map actually shows up [googlemapswebpart:38843]

.ExternalClass {font-family:Verdana;font-size:0.75em;} .ExternalClass #EC_ThreadNotificationFooter {border-top:1px solid #ccc;color:gray;} .ExternalClass #EC_ThreadNotificationPostBody {margin-bottom:2em;} .ExternalClass {font-family:Verdana;font-size:0.75em;} .ExternalClass #EC_ThreadNotificationFooter {color:gray;border-top:1px solid #ccc;} .ExternalClass #EC_ThreadNotificationPostBody {margin-bottom:2em;} From: ceetee
ok. it would appear that i'm either a) stupid or b) completely useless. I am still getting epic FAIL with this, despite attempting 4 times to follow the instructions.
I have deployed the webpart and list to the following site:
http://sptest/sites/sandbox/HR
both the list and the map are on the same page.I can see them and modify their properties.


1. I can't get the web part to connect to my map list, which is deployed to the same site and is visible on the same page as the map web part. When i click browse, i get the sites picker, i go into the sites node, where i see

documents
images
sites
tabs
workflow tasks

If i click the "sites" subnode, the dialog flickers, but the node doesn't expand. Nowhere can i see the site i want to select, nor the list. Am i missing something here? I've tried entering the location of the list manually, but all i get is file not found. Can someone provide me with an example of what should be contained in these boxes for this list?
[http://sptest/sites/sandbox/HR/Lists/GoogleMapList/AllItems.aspx]




2. Using the single point option, i enter Location's 'Longitude' as -1.8089676 and Location's 'Latitude' 53.8206311 and give it the name test. Now when i view the page I see the google logo, the nav controls but the web part is about 50 pixels high. So i manually set the dimensions to 50x50 and i see all the controls, a link to my "test" location and a large white square. No map.
I opened the file Controls.css directly in notepad from C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1033\STYLES on the server, added the following to it at the end:

#map
{
float:left;
width:70%;
height:500px;
}
#side_bar
{
float:right;
width:28%;
height:500px;
overflow:scroll;
}
#directions
{
height:300px;
overflow:scroll;
}

after iisreset etc the map is still blank. take my manual sizing out and the web part returns to its 200 pixel height.

I notice mordaunt etc above had the same issue, but then refers to "Finally got mine to work with almost no issues. Thanks, Mike for suggesting the CSS in a Webpart". What does this mean exactly? i see no posts suggesting anything of the sort!... i'm totally lost, why am i getting the map controls but no map?

Any help appreciated. I've promised this to people and now look like a total cock. :)

Read the full discussion online.
To add a post to this discussion, reply to this email (googlemapswebpart@discussions.codeplex.com)
To start a new discussion for this project, email googlemapswebpart@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com
Nov 19, 2008 at 10:54 AM
Edited Nov 19, 2008 at 10:56 AM
thanks everyone for your help. i've tried everything. still no change. I suspect the problem is my server, which is windows server 2003 r2 with that advanced security config on it. I have no rights to switch it off. The map appears to be in the correct place as if i click the shortcut that's added to the map for my single location then it opens correctly in google maps on my local machine. I can also see the map provider detail changing as i zoom into the whiteness. I am waiting for tech services to come and switch off this advanced config on the server to see if this makes any difference as the security settings for "internet" are on HIGH and for "trusted sites" they are on medium. I think these settings are preventing the map from being passed through the server? will report back shortly [but you're probably all in bed anyway! :)]
Nov 19, 2008 at 7:28 PM
Edited Nov 19, 2008 at 7:31 PM
im·be·cile  (mb-sl, -sl)
n.
1. A stupid or silly person; a dolt.
2. A person whose mental acumen is well below par.
3. A person of moderate to severe mental retardation having a mental age of from three to seven years and generally being capable of some degree of communication and performance of simple tasks under supervision. The term belongs to a classification system no longer in use and is now considered offensive.
adj. also im·be·cil·ic (mb-slk)
1. Stupid; silly.
2. Well below par in mental acumen.

so.. i now have it working. It turns out that i was adding the css to the wrong controls.css file. I added them into ALL copies i could find and it started working immediately, upon which it made complete sense as i could see the map, detail and directions panels outlined in the web part, which i didnt see before. I'm not sure why putting it into the extra hidden webpart didnt work though, i used the html editor, should that have been the rich text instead?

so thanks for your help guys. but i do have another issue, i don't appear to be able to select the list when i deploy to a site collection above the root one. I add the web part to the page but it's not appearing in the sites dialog popup, i only see the one from the collection below it. If i select this an unexpected error occurs. It could be something to do with my setup, as i don't see my 2nd site collection in the tree either. I'll check it out tomorrow and see if i can work out what's wrong.
Nov 25, 2008 at 2:43 PM
Dear ceetee,

We are having the same sort of problems. It is even stranger on our environment. We have the google maps shown perfectly on a normal publishing page. After we have added the code to the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1033\STYLES\Controls.css. But I also wanted to add the google maps to a Search Results page in the same environment. And on this page it is only showing the navigation bar and the google logo, no map!! The API key gives no errors. 

You write that you have added the piece of code on different controls.css, could you tell me which ones? I have also tried putting the code in a CEWP on the page, but did not work for me either.

Regards

Charlotte
from Holland.
Nov 25, 2008 at 4:59 PM

Hi Hirtumc,

Did you remember on the CEWP to enclose the code within SCRIPT tags? This is the only way I got it to work correctly. And how many items are on your list? I have had issues with lists longer than 225 items.

Mordant
Nov 25, 2008 at 5:58 PM
i never knew about the script tags.... i will try that again tomorrow on one of the pages where it doesnt work [i.e. not web root]
I will report back with my findings, which should help charlotte.

Coordinator
Nov 26, 2008 at 10:50 AM
All,

You really shouldn't be editing anything in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1033\STYLES\.  There's an outside chance that at some point Microsoft could update those files in a service pack and you'll lose your changes.  This may also cause issues if you have to restore from a back up or have multiple front end web servers.  The best way to add the CSS is to add it to the bottom of your custom css that you use in a custom master page.

However, if you don't have one of those or don't have permission to edit it then these are the steps you should follow:
  • Create a file called googlemaps.css and enter the relevant style sheet markup in there
  • Upload this file to the Style Library in the root of the site.
  • On the site that the google maps is being used go to Site Actions > Site Settings > Modify all site settings
  • Click on Master Page under look and feel
  • Scroll down to the bottom of the page and find Alternate CSS URL, click the radio button that starts "Specify a CSS" and then use the Browse Button to find the css file - /Style Library/Googlemaps.css

This should add the css file to the page and give the google map some dimensions.

One final option for people if you've not got permission to change these settings is to add a content editor webpart and enter the CSS in the "Source Editor" view remembering to enclose it in <style></style> tags.

In the next release - I'll automate the top 5 steps in a feature so it can be turned on or off for each web.

Mike

Nov 26, 2008 at 12:51 PM
Thank you Mordant, ceetee and mikebirty for responding. I added the CEWP with the style tags and now it works perfectly. I will also remove the code from the Controls.css to prevent any problems.

You are the best!

Thank you.

Charlotte
Dec 3, 2008 at 9:13 AM

Hi Mike,

Thanks for the cool app.

I manage to display the map using the single point. But unfortunately I can't get the "Using a List" working.

It gives me the "404 File Not Found" message when I click on the "Browse" button. Any idea?

Since the Browse button don't give me the list, I key in the List Name manually and able to select the respective fields for Latitude, Longitude etc. But still the map is empty.

JB

Dec 4, 2008 at 6:28 AM
Hi Mike,

It is me again. Finally sovle the problem. I think the problem was due to I created the site not in the root path. (example: http://servername:12345/sites/team/)

After recreating a new web application using the root path (example: http://servername:12345/) the app works greatly. :)

Thanks again,
JB