POST
|
Zj_zou thnk you so much to help me, but I could not do... see my code and the attachment I pass the latitude and longitude as param by the url like (url of attachments is a example that I'm doing home, the real at job with java) What is missing? <html> <head> <title>MAPA</title> <link href="https://community.esri.com/visual/trs/padrao_portal.css" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css"> <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <META name="GENERATOR" content="IBM WebSphere Studio"> <style> html,body,#map{ padding:0; margin:0; height:100%; width:100%; } #map #basemaps_bar{ position:absolute; right:10px; top:5px; z-Index:99; } #basemaps_bar input{ width: 67px; height: 19px; background: #fff; color: #777; border: 1px solid #666; border-radius: 1px; font-family: arial; font-size: 11px; font-weight: bold; cursor: pointer; } </style> <script>var dojoConfig = { parseOnLoad: true };</script> <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/"></script> <script> dojo.require("esri.map"); dojo.require("esri.dijit.BasemapGallery"); var map; var basemapGallery; var baseMapImagem = false; function init() { map = new esri.Map("map", { zoom: 3 }); createBaseMap(); dojo.connect(map, "onExtentChange", test); } function test(extent,delta,levelChange,lod){ if(baseMapImagem){ if(lod.level > 17){ map.setLevel(17); } } } function createBaseMap(){ //Definir as camadas que serão utilizados para cada base do mapa var streetLayer = new esri.dijit.BasemapLayer({ //Rua url: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" }); var imageLayer = new esri.dijit.BasemapLayer({ //Imagem url: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer" }); var transportLayer = new esri.dijit.BasemapLayer({ //Híbrido url: "https://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer" }); //Cria as bases do mapa var streets = new esri.dijit.Basemap({ layers: [streetLayer], title: "Ruas" }); var topo = new esri.dijit.Basemap({ layers: [imageLayer], title: "Imagem" }); var hybrid = new esri.dijit.Basemap({ layers: [transportLayer, imageLayer], title: "Híbrido" }); var basemaps = [streets,topo,hybrid]; basemapGallery = new esri.dijit.BasemapGallery({ showArcGISBasemaps: false, basemaps: basemaps, map: map }); //adicionar botão para cada base do mapa dojo.forEach(basemapGallery.basemaps, function(basemap) { dojo.create("input", { type: "button", value: basemap.title, onclick: dojo.hitch(this, function(){ var baseMap = map.getBasemap(); if(basemap.id != "basemap_0"){ alert("Para este nível de detalhamento podem existir regiões onde a imagem de satélite não estará disponível,\n"+ "nestes casos aplique menos zoom para visualizar mais de longe."); baseMapImagem = true; if(map.getLevel() > 17){ map.setLevel(17); } }else{ baseMapImagem = false; } this.basemapGallery.select(basemap.id); }) },"basemaps_bar"); }); } dojo.ready(init); </script> </head> <body> <!-- <body class="claro" onload="initialize();">--> <form action="" name="mapaForm"> <html:hidden name="mapaForm" property="latitude"/> <html:hidden name="mapaForm" property="longitude"/> <table class="tabela_dados"> <tr> <th width="10%">Latitude/Longitude:</th> <td colspan="3" width="90%"> <input name="latitude" type="text" class="entradadisable" id="latitude" style="text-align: center" size="12" readonly="readonly " value="<bean:write name="mapaForm" property="latitude"/>"> / <input name="longitude" type="text" class="entradadisable" id="longitude" style="text-align: center" size="12" readonly="readonly" value="<bean:write name="mapaForm" property="longitude"/>"> </td> </tr> </table> <div id="map" style="width: 570px; height: 360px"> <div id="basemaps_bar" style="width: 790px; height: 20px"></div> <div> </form> </body> </html>
... View more
08-22-2013
05:31 PM
|
0
|
0
|
507
|
POST
|
I have the latitude and longitude of the place through this information open the map with location Like the example (attachment)
... View more
08-21-2013
05:07 PM
|
0
|
0
|
507
|
POST
|
Hi guys, I need to do a search on the map, the search should be made by the latitude and longitude (values ??????that already have the database). I do not know which map to use or is more appropriate. Can anyone help me
... View more
08-21-2013
08:44 AM
|
0
|
7
|
1509
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|