Velio pls help : problem adding Simple Text Autocomplete

Feb 28, 2013 at 8:32 PM

I have a major problem.

I have a simple aspx web page with this simple code :
<script src=""></script>

          function initialize2() {
              var input2 = document.getElementById('searchTextField');
              var autocomplete = new google.maps.places.Autocomplete(input2);

              var infowindow2 = new google.maps.InfoWindow();

              google.maps.event.addListener(autocomplete, 'place_changed', function () {
                  input2.className = '';
                  var place2 = autocomplete.getPlace();
                  if (!place2.geometry) {
                      // Inform the user that the place was not found and return.
                      input2.className = 'notfound';
                  infowindow2.setContent('<div><strong>' + + '</strong><br>' + address2);
        , marker2);

          google.maps.event.addDomListener(window, 'load', initialize2);
Its working perfectly
But when I add an "artem:GoogleMap" Control on my page,
Nothing works anymore.....

Can you give me a clue of what is going on ?
Mar 5, 2013 at 2:59 PM
Plz, my project is frozen on this.
I really need that little help, that little moment of your time.
Mar 5, 2013 at 5:06 PM
Hi, Tgaud!

I'm not 100% sure, but I do believe that as you want to use Artem:GoogleMap control you must delete the script you already have in your page.

You should have something like this:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm2.aspx.vb" Inherits="GoogleMaps_SubGurim.WebForm2" %>
<%@ Register assembly="Artem.Google" namespace="Artem.Google.UI" tagprefix="artem" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
    <title>GoogleMaps - Using Artem Control</title>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="true" EnableScriptLocalization="true" />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <div id="divMap" runat="server" visible="false">
                    <artem:GoogleMap ID="GoogleMap" runat="server" Width="952px" Height="230px"/>
And, in code-behind (VB), you should have something like this:
Imports Artem.Google.UI

Public Class WebForm2
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim lat As Double = -22.5322
        Dim lng As Double = -44.635899999999999
        Dim marcaTorre As New Marker
        Dim posicao As New LatLng(lat, lng)
        marcaTorre.Icon = "../Imagens/Torre_PR.png"
        marcaTorre.Position = posicao
        GoogleMap.Center = posicao
        GoogleMap.Key = "YourGoogleMapKey"
        GoogleMap.EnableScrollWheelZoom = True
        GoogleMap.EnableMapTypeControl = True
        GoogleMap.Zoom = 15
    End Sub

End Class
Hope this help you.
Paulo Ricardo Ferreira
Rio de Janeiro - Brasil
Mar 5, 2013 at 5:23 PM
Edited Mar 5, 2013 at 5:24 PM
Sorry we misunderstood.
But The googleMap control is working..... alone.

And my custom javascript code (google autocompletion of addresses, on textbox) is working, alone.
("libraries=places" at the end, is important)

but when I put both together on the same page... nothing works anymore.
Mar 5, 2013 at 5:44 PM
Hi, Tgaud!

I'm not an expert in using this Artem:GoogleMap control. In fact I started using it last week.

But, as previously written, I don't believe you'll be able to use both in your page. I think you should dig a little more in Artem:GoogleMap control and verify wether there's already something to accomplish the things you have in your javascript code. Take a look at this link.

Hope this help.

Paulo Ricardo Ferreira
Rio de Janeiro - Brasil
Mar 5, 2013 at 5:48 PM
Edited Mar 5, 2013 at 5:48 PM
Hi pauloric!

No i checked, and there isn't :(
I tried to customize it, to include my JS code, but sadly , even after severals days, i'm not good enough to make it work, cuz i dont rlly understand how it works.
Mar 6, 2013 at 9:53 PM