Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm trying to use Google Maps datatype but without luck. I have found bits here and there but not sure that I have set up everything correct - I see Lee Keller's guide mentined but I can't find it -
This is what I do
What does the content of your googleMap macro look like?
I don't have a macro - just the a property in my Document of type Google Maps. Am I missing something here?
The field is inserted here
Without checking your script will just ask if you have set a height for the map div in css.
Have been caught out with this a couple of times. It will show nothing without the height specified.
If this doesn't work, I use Sebaastians script.js (modified a bit) from his razor examples site. That does work in 6.0.2.
@Paul Aaah, sorry missed that part in the code above. As Gary says you probably just need to set some dimensions for your map container.
I'm working on it and have set the dimensions, but I'm not there yet. I'm not sure I have checked everything yet.
I think my problems is that the field Location does not contain a value although the Datatype is created with a default value and the map is shown correctly in Content
There is another "gotcha" on the maps which catches people.
When you place the marker, you must right click and then click use this location, this wil then be used as the map centre.
Just check this before doing too much with the code.
I have tried that also without luck. One difference I notice between my site and the Razor sample site is that the grey box next to the Clear button contains the coordinates in the Razor sample but the same box is empty at my site
I have exactly the same as in the MapEmptyTest in the Razor Example. No marker and I can't saved one either. So perhaps if I knew what the purpose was of MapEmptyTest.
The version of the GoogleMaps I installed was 0.0.0.0 and in Raxor sample it is 18.104.22.168 - I tried to copy that into my site but it didn't change anything.
Apologies for late reply have been out all day and tried to login via my phone but it wouldn't let me in.
Checked the mapEmptyTest and have no idea of it's purpose.
My Google Map package is the latest version, 2.0.4, from here:
and as I do that there is a 2.0.6 so would suggest you remove your current package and install the latest.
If your code then still does not work, will post my current code as I know that this will.
One other thing is this save and publish issue, save and publish twice just to make sure, this has been fixed in the nightly's but may still be causing issues elsewhere.
Again apologies, but we will have something working for you shortly.
Sorry forgot the link
I'm using 2.0.6, but I have tried to uninstall it and install it again. Makes no difference - I still don't see the coordinates in the backend
Just realised I posted the wrong link too!
Ok, so you have the marker which is centered at the default value given in the datatype?
You can move it, then when you release it you can right click and hit "use this location" from the pop-up? But this is not updating the field with the selected location?
Can you also use the search to find a location by name? (just checking to see if it is connected).
I don't have a marker although I have set the default location for the datatype. If I do a search the marker is displayed, but when I publish it disappears
It seems odd that with a default you have no marker, but if you search and get your marker, then use "use this location" from teh pop-up, does the fiels become populated wiith the co-ordinates?
Just like the picture below?
When I search and get the marker I cannot right click to get a content menu so I can't get what your picture looks like
OK, I may have got this wrong, but I am sure that it was a right click - however -
Just normal left-click the black dot at the centre - this should bring up the "use this location".
This will then enter the latitude and longitude in the field, save and publish then see if appears in page.
Left.click - sorry I didn't try that also, but now i works - thanks a lot
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted