我不明白为什么,但是当我尝试初始化google.maps.Geocoder时,我收到此错误.
这是错误:
Uncaught TypeError: undefined is not a function
Run Code Online (Sandbox Code Playgroud)
和代码:
function updateMapPosition(map){
var geocoder = new google.maps.Geocoder(); //crashes here !!
var position = geocoder.geocode( {'address':$('#id_address').val()},
function(results,status){
if(status == google.maps.GeocoderStatus.OK){
if (status != google.maps.GeocoderStatus.ZERO_RESULTS) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({map:map, position:results[0].geometry.location});
}
else{
alert("hop")
}
}
}
)
}
Run Code Online (Sandbox Code Playgroud) 大家好我已经构建了一个实现Parcelable的类,但是当我读取类时,我定义的一个arraylist属性变为空.这是代码
package roblestech.laCartelera;
import java.util.ArrayList;
import android.os.Parcel;
import android.os.Parcelable;
public class ProgramacionPelicula implements Parcelable {
public ProgramacionPelicula() {
}
public ProgramacionPelicula(Pelicula pelicula) {
_pelicula = pelicula;
}
public ProgramacionPelicula(Cine cine) {
_cine = cine;
}
public String toString() {
if (getVista() == ProgramacionPelicula.VISTA_PELICULA) {
return getCine().getCine();
} else {
return getPelicula().getTituloOriginal();
}
}
private int _idProgramacion;
public void setIdProgramacion(int value) {
_idProgramacion = value;
}
public int getIdProgramacion() {
return _idProgramacion;
}
private Pelicula _pelicula;
// public ArrayList<Pelicula> _peliculas = …Run Code Online (Sandbox Code Playgroud) 可能重复:
如何启用PHP短标签?
我在用
Apache Friends XAMPP(基础包)版本1.7.3我正在运行php文件,我用<? ?>标签编码而不是<?php ?>.但是apache服务器不会执行我的代码,但如果我尝试使用<?php ?>标签,代码就可以运行.任何人都知道如何使服务器使用<? ?>标签执行PHP代码?