Using google map in sencha touch - dictionary

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

Related

Markerclustererplus touch 'click' not working after today's maps update

I am using the Google Maps JavaScript API with markerclustererplus. I need markerclustererplus for its mouseover handler.
After today's Maps update, click is not longer functioning properly for touch screen devices. click works fine for laptop/desktops using a mouse/trackpad, but it is not longer working for touch screens.
I tried both the markerclustererplus libraries available, both are broken.
https://github.com/googlemaps/v3-utility-library/tree/master/markerclustererplus
https://github.com/mahnunchik/markerclustererplus
I tried the standard markerclusterer library as well, and it doesn't seem to be working either.
https://github.com/googlemaps/js-marker-clusterer
Everything was working fine before today's Maps update.
Does anyone have a fix for this?
EDIT:
I am using Django 1.11. On the frontend, I don't use any libraries apart from a bit of jQuery 3.2.1
There's not much to show with my code. It's pretty standard.
markerCluster = new MarkerClusterer(map, markers, clusterOptions);
markerCluster.addListener('click', function(cluster) {
markerClusterActivate(cluster);
});
function markerClusterActivate(cluster) {
... stuff that happens when cluster is clicked
}
So here is a workaround, you just roll back to google map 3.30
For vue.js projects.
https://github.com/xkjyeah/vue-google-maps/blob/v0.8.1/API.md
import Vue from 'vue'
import * as VueGoogleMaps from '~/node_modules/vue2-google-maps'
Vue.use(VueGoogleMaps, {
load: {
key: 'YOUR_API_KEY',
v: 'GOOGLE_MAPS_VERSION',
libraries: 'places' // Only if you need Autocomplete
}
})

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

Setting window dimensions in TideSDK

I am looking to add a small splash screen at the launch of an app I am working on to show licence and version info along with details of some client specific info. Having set my default window dimensions etc in tiapp.xml I am now looking at how to override these on a specific user window (namely index.html).
I've had a dig through the API and thought I had found what I was looking for, but on testing it doesn't do anything to the window dimensions. I know it will be my doing (I'm a php man trying desperately to learn javascript!) but can someone have a look at my code and point out the error of my ways...
In the of my index.html I have the following code:
<script>
var Ti = Titanium;
var window = Ti.UI.currentWindow;
window.setHeight(250);
window.setWidth(500);
</script>
I'm guessing I've either messed up my javascript or TideSDK syntax??
you have used the reserved variable "window", which belongs to JavaScript and can't be overwritten.
The following code works for me:
var Ti = Titanium;
var this_window = Ti.UI.getCurrentWindow();
setTimeout(function(){
this_window.setHeight(250);
this_window.setWidth(500);
}, 3000);
If you want to learn to write good JavaScript, I can give you a couple of book recommendations.

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

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

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