Google Maps Api v3 custom InfoWindow - "google is not defined" error - google-maps-api-3

trying to create custom infowindows in my application that is based on google maps.
next example is one of my base points for development:
http://gmaps-samples-v3.googlecode.com/svn/trunk/infowindow_custom/infowindow-custom.html
problem is that whatever i use this or some other example, in forefox's firebug i'm getting error
google is not defined
InfoBox.prototype = new google.maps.OverlayView();
can you help me how to solve this, i can not continue my work without custom infowindows.....

my mistake - i did not include properly google map api library - i included infobox.js before http://maps.google.com/maps/api/js?sensor=false

Related

issues with KML link to Google Maps API

I'm trying to resolve an issue with uploading a live kml file to the google maps api. I have a live website that I uploaded the kml file to, but when I use the url within the call function it doesn't show up in the google maps api. It's a public kml file....the website that I'm trying to use the google maps api is not live, just run off my desktop at the moment.
any thoughts on what I'm doing wrong? The website kml link is: http://www.gsphotoalchemy.com/170113.kml
var ctaLayer = new google.maps.KmlLayer({
url: 'http://www.gsphotoalchemy.com/170113.kml'
});
ctaLayer.setMap(map);
}
I can post the full html code if needed, thanks in advance!
your KML file is too big, see the KML reference for size and complexity limitations:
feedvalidator
If you do something like this in your code to check the status of the KmlLayer:
google.maps.event.addListener(kmlLayer, "status_changed", function() {
document.getElementById('kmlstatus').innerHTML = "Kml Status:"+kmlLayer.getStatus();
});
you will get:
Kml Status:DOCUMENT_TOO_LARGE
example

Using google map in sencha touch

Hi I am facing problem with Google map in sencha touch 2. Following is the code ..
new Ext.application({
name:'Touch Start',
launch:function(){
var map = new Ext.Panel({
fulscreen:true,
items:[
{
xtype:'map',
useCurrentLocation:true,
}
]
});
this.viewport = map;
}
});
Please Help is anyone know about this
First of all, and before your question gets closed, you're not exactly telling us what the problem is with your code. So, I guess you can be facing two different problems
Google Maps API is required
Be sure to add the script tag that load the Google Maps API. You can find infos here
No Layout
Your main panel doesn't contain any layout, so it doesn't know how to display its items
Try to add this to the config :
layout: 'fit'
Here's a working example where the Google Maps API is loaded asynchronously :
http://www.senchafiddle.com/#MhAME
Hope this helped

Google Map API 3: Display marker tooltip (title) by default

Is it possible to display the marker tooltip (the title) by default in Google Map API 3? (Not the info windows)
Tooltip displaying is browser's behavior - it is impossible to call it with JS.
I using this library : http://code.google.com/p/google-maps-utility-library-v3/wiki/Libraries and happy with the result. For those looking similar should try this.

Google Maps API v3 - custom multi-colored icons

It seems like I have to assign an hosted image URL to a MarkerImage object to create custom icons. Is there a way to allow the user to pick a color to fill in this image?
Try using the Google Charts API to generate markers. You can choose the colour.
Look for styled markers in a list of Google Maps libraries. This looks like it could help.
I would also look into generating the images on the fly with canvas and then producing a data URL:
var dataURL = canvas.toDataURL("image/png");

KML Layers Cursor CSS - Google Maps API v3

I've run into a small problem with the semi-new KML Overlay functionality with Google Maps API v3, wherein while I am able to use "suppressInfoWindows: true;", the cursor still appears as though the overlay(s) are clickable.
Is there a way at this time to change the css on the overlay(s) so that the cursor is the default cursor, so that they are purely visual, and don't confuse the user?
You can do this through javascript (not sure about a purely CSS solution) using something along the lines of...
var ctaLayer = new google.maps.KmlLayer({
url: 'myKmlFile.kml',
suppressInfoWindows: true
});
if (ctaLayer.suppressInfoWindows) ctaLayer.setOptions({clickable:false});
ctaLayer.setMap(map);
This sounds like a bug. You should file it at the Google Maps API's issue tracker.

Resources