good morning,
I have been doing this tutorial and does not show me the markers
https://developers.google.com/maps/articles/phpsqlajax_v3?hl=es
attached my file in case anyone can help me
http://pastebin.com/d7XhrZST archivo.html
The php is the same is the same as the article
Thank you
Javascript is case-sensitive. You have
var telefono = markers1[i].getAttribute("type");
Then you refer to it as
+ "<br/><b>Telefono:</b>" + Telefono
Notice the difference between telefono and Telefono - Javascript treats these as two separate variables, one of which doesn't exist.
Related
I am new to "Here" and I am using Here SDK Flutter 4.3.3.0. I want to fetch/search for places and get the Place's Photos/Image and or Place's Logo if the place is a business/company.
The place images place.details.internalimages are always empty when I search for any place. I tried for different countries like "Chipotle" a restaurant near Las Vegas, a restaurant in Canda, and a Shopping mall in India. All of these return 0 (zero) images. Does, Here API support to get places photos like Google Places or TomTom API?
Looks like this API has a method to get WebImage List but does not contain any data at all. Please advise, If I need to use any other method to get Place's photos.
Another question is, is there a way to get a company logo, if the place I am searching for is a business/company like Restaurant, Store, etc.
Below is the code, I use in my Flutter application. Note, I am able to get other field values like title, address, etc.
TextQuery textQuery = TextQuery.withAreaCenterInCountries('some partial place name', geoCoordinates, countryCodes);
searchEngine.suggest(textQuery, searchOptions, onHereSearchSuggestionCompleted);
In onHereSearchSuggestionCompleted functions, I have the following code:
if(suggestions.length > 0){
print('explore - onHereSearchSuggestionCompleted - suggestions count > 0');
for (Suggestion suggestion in suggestions) {
print('onHereSearchSuggestionCompleted - current count = ${(suggestions.indexOf(suggestion) + 1)}');
print('onHereSearchSuggestionCompleted - suggestion title = ${suggestion.title}');
print('onHereSearchSuggestionCompleted - place id = ${suggestion.place.id}');
print('onHereSearchSuggestionCompleted - place title = ${suggestion.place.title}');
print('onHereSearchSuggestionCompleted - place address = ${suggestion.place.address.addressText}');
print('onHereSearchSuggestionCompleted - place img length = ${suggestion.place.details.internalimages.length}');
}
}
Please note, you have been able to see this functionality being exposed in flutter SDK due to a bug exposing internal methods in flutter. In general this functionality is not yet public (not in native android and iOS).
We plan to expose this functionality soon, however even when we do, only certain eligible customers would have access to the image content. There should be contractual agreement to be able to see this functionality
I'm developing an app in xamarin forms supposed to works on android and ios.
The problem is that IOS maps displays a wrong location.
IOS Location (WRONG)
Android Location (RIGHT)
Code:
switch (Device.RuntimePlatform)
{
case Device.iOS:
uri = new Uri(string.Format("http://maps.apple.com/?ll={0}", x + ',' + y));
System.Diagnostics.Debug.WriteLine(uri);
Device.OpenUri(uri);
break;
case Device.Android:
uri = new Uri("https://www.google.com/maps/search/?api=1&query=" + x + ',' + y);
System.Diagnostics.Debug.WriteLine(uri);
Device.OpenUri(uri);
break;
}
In this example x="39.7301803" and y="-8.8438668"
UPDATE
Replacing the code above with ExternalMaps plugin
var success = CrossExternalMaps.Current.NavigateTo(Store.Name, Double.Parse(x), Double.Parse(y));
Exactly the same result :(
Both of your links (manually put together) open in the right app and point to the same location
Google-maps
Apple-maps
But when I set the y param to "0" I end up in the exact area of your wrong screenshot. Could it be that there is a problem in your code? Like y not being set (prior to the snippet)
Could you share more of your code?
The difference between both platforms is how you build the string. I would suggest to change the iOS part to:
uri = new Uri("http://maps.apple.com/?ll="+ x + ',' + y));
I can not comment that is why I am answering your question. I do not know why you are executing url to Device browser. I suggest better you use the "Map" control from Xamarin.Forms name space. I think it will full fill your requirement for set position on the exact point on the map.
Here is the good sample of Xamarin.Forms.Map
UPDATE-1
I am not sure weather you want to use plugin or not. I found one good plug which can open external maps to a specific geolocation or address in your Xamarin.iOS, Xamarin.Android, Windows, and Xamarin.Forms projects.
For more details and information please check this.
Just found and tested code here as well not sure if it is helpful to you. You might got the same earlier as well.
I have and APP. Many customers use this APP.
I'd like to have an Google Trackingid for any Costumer.
Now i'd write my tracking id into my Analytics.xml
I use
xmlns="http://googleanalyticssdk.codeplex.com/ns/easytracker"
When in my code write
GoogleAnalytics.EasyTracker.GetTracker().SetCustomDimension(1, "Title")
GoogleAnalytics.EasyTracker.GetTracker().SetCustomDimension(2, "ID")
GoogleAnalytics.EasyTracker.GetTracker().SendView("Book")
I can't change TrackingId ...is possible to do this ?
Thanks
So, i had to change SDK
Now i use UWP.SDKforGoogleAnalytics.managed and i had wrote these rows
Dim _TrakerId As String = "UA-XXXX0-0"
Dim MyTraker As GoogleAnalytics.Tracker = GoogleAnalytics.AnalyticsManager.Current.CreateTracker(_TrakerId)
MyTraker.ScreenName = "Images"
Dim Hit = GoogleAnalytics.HitBuilder.CreateScreenView.Build
MyTraker.Send(Hit)
All work good... BUT... now i'd like to use Custom dimensions.
Can anyone hel me ??
I have an application where the user will click a button and map an address on the native google map API. I can find lots of examples of how to do this with lat + long, but nothing about how to pass an address. I can do the following, where homeLoc.text is a latitude and longitude: navigateToURL(new URLRequest("http://maps.google.com/?q=" + homeLoc.text));
It is hard to believe this would be difficult, but I can not find any examples using a street address.
Anybody out there done something like this? Must be a pretty common use case.
Thanks,
Mark
Right. The problem with using an address directly is that it doesn't know how many possible outcomes there can be. It could be 1, or it can be millions.
Because of this, google insists that you use their Geocoding API to get a LatLong from an Address. If only one result is returned, you can handle opening google maps at the correct location, but if more than one (or none) is returned, you can handle it yourself in the app before continuing.
Alert.show("Open new tab to search in Google Maps?", "No places found", Alert.YES |
Alert.NO, null, alertListener, null, Alert.NO);
function alertListener(eventObj:CloseEvent):void {
// Open Google in new tab.
if (eventObj.detail==Alert.YES)
{
var url:String = "http://maps.google.com.au/maps?q=" + onelineaddress.text;
var urlReq:URLRequest = new URLRequest(url);
navigateToURL(urlReq, "_blank");
}
}
This works for me.
Is it possible to get the longitude and latitude value from IP address in asp.net?
If it is possible, please let me know how can I get this.
MaxMind Geolite city is free. If it is not good enough, you can apparently upgrade to a more accurate paid-version. I can't speak for the quality of the paid version, as I have never used it.
If you like your SQL, download the CSV version. Load it into your database of choice, and query away.
The faster and space-efficient option is to download the file binary blob version of the same database, and then use the C# class to query it.
Alternatively, I have found ipinfodb.com to be useful. Query is by simple HTTP GET. For example, to geolocate stackoverflow.com try:
http://ipinfodb.com/ip_query.php?timezone=false&ip=69.59.196.211
This will return an XML file containing latitude and longitude, that looks like:
<Response>
<Ip>69.59.196.211</Ip>
<Status>OK</Status>
<CountryCode>US</CountryCode>
<CountryName>United States</CountryName>
<RegionCode>41</RegionCode>
<RegionName>Oregon</RegionName>
<City>Corvallis</City>
<ZipPostalCode>97333</ZipPostalCode>
<Latitude>44.4698</Latitude>
<Longitude>-123.343</Longitude>
</Response>
Some VB.NET sample code is available at http://forum.ipinfodb.com/viewtopic.php?f=7&t=269
You can use a service such as:
http://freegeoip.appspot.com/
It will not be completely accurate.
Here is a tutorial on consuming the service using ASP.Net.
Try IPInfoDB which, as far as I know, is free.
They provide downloadable databases, but the easiest solution seems to be the XML api. Examples provided are for php, but I'm sure it's equally accessible with ASP.Net.
http://www.iptolatlng.com/ works well for me because it gives me JSON output raw which I need for this app I'm working on.
There is another one as well: http://www.hostip.info/index.html
It has an api, might be interesting for you to have a look at.
If you are trying to access your location via a javascript client, then the geo location API available with HTML 5 is very very helpful.
if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(geoLocationSuccess, geoLocationError);
}
geoLocationSuccess and geoLocationError are the callbacks for success and error, respectively.
function geoLocationSuccess(position){
alert('lat: ' + position.coords.latitude + ', lon: ' + position.coords.longitude);
}