小编ayu*_*lin的帖子

无法启动google.maps.Geocoder

我不明白为什么,但是当我尝试初始化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)

javascript google-maps undefined

13
推荐指数
3
解决办法
2万
查看次数

数组的Android Parcelable问题

大家好我已经构建了一个实现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)

android parcelable

3
推荐指数
1
解决办法
1万
查看次数

我的Apache不用<?执行PHP代码 ?>标签

可能重复:
如何启用PHP短标签?

我在用

Apache Friends XAMPP(基础包)版本1.7.3
  • Apache 2.2.14(启用IPV6)
  • 带有PBXT引擎的MySQL 5.1.41(社区服务器)1.0.09-rc
  • PHP 5.3.1(PEAR,Mail_Mime,MDB2,Zend)

我正在运行php文件,我用<? ?>标签编码而不是<?php ?>.但是apache服务器不会执行我的代码,但如果我尝试使用<?php ?>标签,代码就可以运行.任何人都知道如何使服务器使用<? ?>标签执行PHP代码?

php

1
推荐指数
1
解决办法
2410
查看次数

标签 统计

android ×1

google-maps ×1

javascript ×1

parcelable ×1

php ×1

undefined ×1