B4J Question [ABmaterial] google map display error !?

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi

My project has a map display. In office net,It is correct from every computer.
It is display error as following when i copy project to my vps. Why .... !? ;)

My vps link is = http://vps.jinyistudio.tw:8010/fun!dajia/DajiaGmPage/
c40f771cedd1d1a6d72f812f49b3bf2b.png
 

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi
Thank's. following isn't API key !? what is it !?
page.UseGoogleAnalytics(ABMShared.TrackingID, Null)
 
Upvote 0

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi

I have key already but local is ok, from vps isn't OK ! form vps,I have common.js error. In local,I don't have this error ! :mad:

B4X:
Sub ConnectPage()
    ABMShared.ConnectNavigationBar(page)
    '
    page.GoogleMapsAPIExtras="key=AIza---ZaJXG---EMA---nCPsg0X------1zgu8"    
    Dim gm1 As ABMGoogleMap
    gm1.Initialize(page, "gm1", 24.344390, 120.626985,15, 350, ABM.GOOGLEMAPTYPE_ROADMAP)
    gm1.Draggable = True
    gm1.HasMapTypeControl = True
    gm1.HasStreetViewControl = True
    gm1.HasZoomControl = True
    gm1.AddMapType(ABM.GOOGLEMAPTYPE_ROADMAP)
    gm1.AddMapType(ABM.GOOGLEMAPTYPE_TERRAIN)
    gm1.AddMapType(ABM.GOOGLEMAPTYPE_HYBRID)
    gm1.AddMapType(ABM.GOOGLEMAPTYPE_SATELLITE)

    page.Cell(2,1).AddComponent(gm1)
    '
    page.FinishedLoading 'IMPORTANT
    page.Refresh
    page.RestoreNavigationBarPosition
End Sub
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Huummm, strange..

Works fine everywhere else EXCEPT your region.
Bigger controls may be at play. Google and China perhaps do not allow this.
We can only speculate what goes on beyond your (country) firewall.
You shall have to research, unless others can chime in here.

WWW may be reduced to (withrestrictions)WW.

Where is your VPS located?
 
Upvote 0

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi

my vps in https://www.hostwinds.com/windows.php

1. I login to vps. open project with browser in the remote.
the display result is incorrect too ! :mad:
2. In remote,I open google map in th firefox. location to my homw town taiwan,Dajia. It's OK :mad:

This error only in remote side !
70e588f529210d84d3e8b9d065786934.png
 
Last edited:
Upvote 0

Harris

Expert
Licensed User
Longtime User
All my vps 's are located there... ( 6 of them ).
They took over from the previous owner where I originally signed up. I have no issue with them - up 100 percent (and backed up).

You need to dig deeper, providing you have met the tasks outlined in the posts (which it seems you have).

Can't imagine what the problem is... However, WTF do I know? - basically NAFT...
 
Upvote 0

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi

Sorry ! I have try to saying clearly with my broken english ! :(
 
Upvote 0

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi
which api do i need to enable !?
921e167aa6f437f7e64bd9137d8f1d3c.png
 
Upvote 0

jinyistudio

Well-Known Member
Licensed User
Longtime User
HI
I copy this file to vps. I can show map and the API key is active but it for abmaterial project isn't OK ! :oops:
068d3b716b41fc930e5af89fa3f84221.png


vps.jinyistudio.tw/googlemap.html
B4X:
<!DOCTYPE html>
<html>
  <head>
    <title>Simple Map</title>
    <meta name="viewport" content="initial-scale=1.0">
    <meta charset="utf-8">
    <style>
      html, body {
        height: 100%;
        margin: 0;
        padding: 0;
      }
      #map {
        height: 100%;
      }
    </style>
  </head>
  <body>
    <div id="map"></div>
    <script>

var map;
function initMap() {
  map = new google.maps.Map(document.getElementById('map'), {
    center: {lat: -34.397, lng: 150.644},
    zoom: 8
  });
}

    </script>
    <script src="https://maps.googleapis.com/maps/api/js?key=A---SyALs8zp---N8IO0---tDSsR---BU1---Lo&callback=initMap"
        async defer></script>
  </body>
</html>
 
Last edited:
Upvote 0

Harris

Expert
Licensed User
Longtime User
Nice... Now you are on your way.

Google Maps required this last year (an API key).
All their stuff is requiring you get an API key - free or otherwise.
Such is life in a Googled world.
 
Upvote 0

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi

In office network is all right just in vps NG :mad::confused::(
 
Upvote 0
Top