close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Markers not displaying

Thread began 3/06/2009 11:40 am by nathan346535 | Last modified 3/10/2009 1:06 pm by epiisila369765 | 2036 views | 4 replies |

nathan346535

Markers not displaying

Hi,
I am having the problem with no marker showing on my map.
I am in a local environment at the moment and my map looks fine apart from the fact there is no marker showing.

I have copied the images locally and refer to them in my code to see if that made any difference but so far no joy.

My created js file reads as below:
function wagt_map_2() {
if(GBrowserIsCompatible()) {
if(!document.getElementById('wagt_map_2')) return false;
var map = new GMap2(document.getElementById('wagt_map_2'));
map.enableContinuousZoom();
map.enableDoubleClickZoom();
map.addControl(new GSmallZoomControl());
var geocoder = new GClientGeocoder();

var icon = new GIcon();
var markerStyle = 'Flag';
var markerColor = 'Pacifica';
icon.image = '_img/pacifica.png';
icon.shadow = '../_img/shadow.png';
icon.iconSize = new GSize(31,35);
icon.shadowSize = new GSize(31,35);
icon.iconAnchor = new GPoint(4,27);
icon.infoWindowAnchor = new GPoint(8,3);
icon.printImage = '_img/pacifica.gif';
icon.mozPrintImage = '_img/pacifica_mozprint.png';
icon.printShadow = '../_img/shadow.gif';
icon.transparent = '../_img/pacifica_transparent.png';

var address_0 = {
street: 'XXXX',
city: 'XXXXX',
state: 'XXXX',
zip: 'CH5 2UA',
country: 'United Kingdom',
infowindow: 'default',
infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: #000;"><strong>Address:</strong><br />CH52UA United Kingdom</span>',
full: 'CH52UA, United Kingdom',
isdefault: true
};

geocoder.getLatLng (
address_0.full,
function(point) {
if(point) {
map.setCenter(point, 13);
var marker = new GMarker(point, icon);
GEvent.addListener(marker, 'click', function() {
marker.openInfoWindowHtml(address_0.infowindowtext );
});
map.addOverlay(marker);
marker.openInfoWindowHtml(address_0.infowindowtext );
}
else {
map.setCenter(new GLatLng(53.23486238365943, -3.022785186767578), 13);
}
}
);

}
}

Sign in to reply to this post

Ray BorduinWebAssist

The paths must be wrong... remember they must be relative to the page where the map is displayed and not to the location of the .js file. Most likely that is the issue.

Sign in to reply to this post

nathan346535

Still no joy

My markers are still not showing.

which bit of code set the marker position?

should it automatically appear where the map.setCenter is set?

my map.setCenter latlng line reads:

map.setCenter(new GLatLng(53.23511924679029, -3.0228710174560547), 13);

anyone know if my marker needs a setting the same as that?

Sign in to reply to this post

Ray BorduinWebAssist

Please post a url to the page you are having difficulty with. I will be able to test it and try to determine the correct path to use.

Sign in to reply to this post

epiisila369765

In your DW page, the extension may have done two things. If in ASP, it may have put <!--#include file="google_javascript/wagmp_map_1.asp" --> You may need to change "file" to "virtual" Also, for me document relative links did not work, I need to change it to <!--#include virtual="/InsertYourFolderNameHere/google_javascript/wagmp_map_1.asp" -->

You need to do the same thing for the .js file

<script type="text/javascript" src="/InsertYourFolderNameHere/google_javascript/wagmp_maps.js">/*wagmp*/</script>

I'm still having other hiccups, but at least the markers are displaying now.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...